How can I check when the connection to the RTSP server has been broken due to network failure? I have a RTSP client streaming video and saving this to disk using a MediaSink. Is there a way to specify a timeout on the RTP socket and then have a callback on this timeout?

I suggest using "TaskScheduler::scheduleDelayedTask()" to set up a 'watchdog timer' immediately after you've gotten a response from the RTSP "PLAY" command, and reset this timer each time new data arrives in your 'sink' object. (You can do this by subclassing your sink class, and redefining the "continuePlaying()" virtual function to reset the watchdog timer (and then call the parent class's "continuePlaying()".)

This will check not only for 'network failure', but also for the server dying.

You can reset the watchdog timer using "TaskScheduler::rescheduleDelayedTask()".
--

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to