[Live-devel] Help required to identify the RTSP connection closed status

Ross Finlayson finlayson at live555.com
Thu Jun 21 13:27:19 PDT 2012


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/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120621/b7e1e99a/attachment.html>


More information about the live-devel mailing list