[Live-devel] Query regarding- detection of client disconnection from RTSP server
Ross Finlayson
finlayson at live555.com
Fri Jul 3 06:24:40 PDT 2015
> I am using Live555 library for hosting RTSP url to multiple RTSP clients.
>
> In case all Clients for particular RTSP url (server session) go out of network due to any reasons, how RTSP server will know about “no client is accessing the stream”.
This will happen automatically (assuming that you used a non-zero value (e.g., the default value of 65) for the “reclamationTestSeconds” parameter in “RTSPServer::createNew()”).
If the server sees no activity (RTSP commands or RTCP “RR” packets) from the client in “reclamationTestSeconds” seconds, it will automatically stop streaming to that client.
When the *final* client goes away, then (assuming that you set “reuseFirstSource” to “True” in your “ OnDemandServerMediaSubsession” subclass’s constructor, when it called the “OnDemandServerMediaSubsession” constructor) the server will automatically close the input source - i.e., it will automatically call “Medium::close()” - and thus the destructor of - whatever ‘input source’ object you created in your implementation of the “createNewStreamSource()” virtual function.
I.e., if you defined your own “FramedSource” subclass for your ‘input data source’, and create an object of this subclass in your implementation of the “createNewStreamSource()” virtual function, the you should make sure that this subclass's destructor shuts down the input data source.
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/20150703/b9c572e0/attachment.html>
More information about the live-devel
mailing list