rgaufman / live555

A mirror of the live555 source code.
GNU Lesser General Public License v3.0
768 stars 370 forks source link

How to send RTSP Receiver Reports more frequently? #24

Open okdzhimiev opened 5 years ago

okdzhimiev commented 5 years ago

Hi,

I'm playing an rtsp stream (over UDP) from a network camera with vlc which uses live555 for receiving packets. And once in a while it sends out a Receiver Report (RR) with stats.

I would like to make live555 to send out RRs once every N packets (e.g. N=50) received from the sender. How can I do this?

In the network there can be switches with lower bandwidth (like wifi) than immediate camera or pc links. This results in congestions where UDP packets overflow some switch's buffer (128kB in my case) and get dropped. So, I'm thinking about having some sort of a flow control (with a short reaction time) on the sender side based on RRs from receiver but without resending lost packets (like TCP would do).

So, I've checked the code and liveMedia/MultiFramedRTPSource.cpp looks like a good place:

...
receptionStatsDB().noteIncomingPacket(...);
// code begin
if ((receptionStatsDB().totNumPacketsReceived()%50)==0){
    someRTCPInstance.sendReport();
}
// code end
...

Haven't figure out what that someRTCPInstance should be. Thanks.