[Live-devel] Detecting a connection loss with openRTSP

Ross Finlayson finlayson at live555.com
Wed Feb 18 15:30:02 PST 2009


>i wrote a client application to receive a mjpeg stream from a camera 
>basing on the openRtsp sample. It works fine, but i don't know how 
>to detect a loss of the network connection. Is there a possibility 
>to set a timeout and to get something like a callback?

I assume you're talking about the loss of the RTSP TCP connection, 
rather than just a normal end of stream (which we detect by listening 
for a RTCP "BYE" packet from the server).

Unfortunately there's no easy way in the current code to do this. 
You would need to write your own "TaskScheduler" subclass (and use 
this instead of "BasicTaskScheduler") that adds a 'socket error' 
handler to the "select()" call.
-- 

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


More information about the live-devel mailing list