Rather than trying to detect when the RTSP connection closes (which isn't 
reliable, and might not happen for a long time after the server disappears), a 
better solution is to arrange for a timer to expire if no data arrives within a 
certain period of time (e.g., 1 second).  This will also detect situations 
where the camera server remains alive, but has stopped streaming data for some 
reason.

On way to do this is the create a delayed event - using 
"TaskScheduler::scheduleDelayedTask()" - for (e.g.) 1 second, after you've 
received the response to the RTSP "PLAY" command, and then reschedule the event 
- using "TaskScheduler::rescheduleDelayedTask()" - each time new data arrives.  
If the delayed event gets called, then you know that no new data has arrived 
within the delay period (e.g., 1 second).


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

_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to