[Live-devel] What is the preferred way of terminating an RTSP server connection

Wim Bekker w.bekker at vdgsecurity.com
Wed Dec 11 00:27:22 PST 2013


2013/11/22 Ross Finlayson <finlayson at live555.com>

> There's no easy way to terminate (from the server) just 'some'
>> connections.  (What criterion would you use to decide which connections you
>> want to terminate??)
>>
>> However, you can terminate *all* connections for a given stream by calling
>> RTSPServer::closeAllClientSessionsForServerMediaSession()
>>
>> Plus, of course, if you delete the entire "RTSPServer" object - by
>> calling "Medium::close(pointer-to-your-RTSPServer-object);" - then *all*
>> connections to the server (and all resources used by the server) will be
>> reclaimed.
>>
>
> Ok thanks. What about stopGettingFrames in FramedSource? I'll try that one
> because I have easy access to that object.
>
>
> (I assume that you're referring to the data source object for your
> stream?)  Calling "stopGettingFrames()" on that object will stop data (and
> thus RTP packets) from flowing, but it won't tear down any connections to
> clients.
>
> You haven't said anything about *which* connections you want to terminate,
> and why.  If you're worried only about terminating connections to 'dead'
> clients (i.e., clients that just disappear, without sending a RTSP
> "TEARDOWN"), then you don't need to worry.  The server will automatically
> close (and reclaim resources for) those connections after a period of time
> (by default, 65 seconds).
>

Tx, I've been away for a while, see if I can pick this up again.

The given setup is this: I have a video server and an rstp server. Clients
request a particular video stream from the rtsp server. The rtsp server
then request that stream from the video server and sends incoming frames to
the client. There's also a controller application. This application gets
information from the rtsp server and uses that to instruct the client
application to get particular video. If the client should not retrieve
video anymore, the controller instructs the client for that. If the
controller can not reach the client to stop streaming it needs to tell the
server to stop streaming. Although this is not normal usage it is very
important that the video stream is stopped.

It's easy to stop the stream, but it would be nice to close the connection
also.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20131211/ebfe8be9/attachment.html>


More information about the live-devel mailing list