[Live-devel] How to flush/clear UDP buffer

Ross Finlayson finlayson at live555.com
Fri Nov 27 07:51:40 PST 2015


> I have a decoding pipeline for RTSP cameras. There are times in my application in which I do not want to decode, because images are not displayed. However I want to keep the connection open. I have a subclass of RTSPClient that is constantly receiving from the network.

Why don’t you send a RTSP “PAUSE” command when you don’t want the server to send you RTP packets (and then send another RTSP “PLAY” command afterwards)?


> I have noticed that after I start decoding again there are several seconds of video buffered. Is there a way to clear the UDP packets on demand? How can I minimize the work my RTSPClient is doing while not decoding?

No, you'll need to receive each ‘frame’ that arrives on your “RTPSource” (and also handle each RTCP packet that arrives on your “RTCPInstance”, though that will happen automatically).  However, if you’re not processing (i.e., decoding) the frames, then there’s not a lot of ‘work’ that gets done when each frame arrives; it just gets copied into memory.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list