[Live-devel] RTSPClient reconnection

Ross Finlayson finlayson at live555.com
Mon Dec 9 07:53:35 PST 2013


> I would like to handle the event, when the connection to RTSP server lost and the connection is restored. I can detect, when the connection is lost with sending a command to RSTP server and check the response result code.

Unfortunately, once the connection to the server is lost, the existing "RTSPClient" object - and its connection to the server - will no longer be useful.  In this case, you will need to close (i.e., destroy) the current "RTSPClient" object, along with the "MediaSession" object that it's using, and any "MediaSink" objects that it's outputting to.  Then you will need to create a new "RTSPClient" object all over again, and send new "DESCRIBE", "SETUP", PLAY" commands.

The easiest way to do this is to simply exit the current process (i.e., by calling "exit(0);"), and then create a new process (e.g., command) that creates a new "RTSPClient" object, etc.

But if you don't want to do this, then you'll need to explicitly call "Medium::close()" on the "MediaSession" object, "MediaSink" objects, and finally the "RTSPClient" object.


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/20131210/7fb2e078/attachment.html>


More information about the live-devel mailing list