[Live-devel] Stop specific streams.

Ross Finlayson finlayson at live555.com
Thu Dec 8 00:46:24 PST 2011


> Let me first let you how I am creating these multiple streams:
>  
> 1. Create an RTSPServer, if none exists.  I make use of only 1 RTSP server.
> 2. Create a new ServerMediaSession for each stream.  This ServerMediaSession is saved in a map with a unique identifier for the stream.
> 3. Create a new OnDemandMediaSubsession of each stream, depending on the type of media.
> 4.  Add the OnDemandMediaSubsession to the ServerMediaSession.
> 5. Add the ServerMediaSession to the RTSP Server.
> 6. Run the doEventLoop if it has not been started yet.  If it has, do nothing.
>  
> Note that I have only one RTSP server and one doEventLoop, regardless of how many streams run.
>  
> I am aware that in order to stop a stream, a watchVariable is used.  I am able to stop ALL streams using this method, but I cannot stop a specific stream. 

First, you may find it better to use the new "event trigger" mechanism - see "UsageEnvironment/include/UsageEnvironment.hh" - rather than the "watchVariable" mechanism.  (If you use "event triggers", then the "clientData" parameter to "triggerEvent()" could be used to (somehow) indicate a specific stream that you want to 'stop'.)

But alternatively, if you want to still use the "watchVariable" mechanism, the  you can do so by having your 'signalling' thread (i.e., the one that sets the 'watch variable', but does not otherwise access any LIVE555 objects) also set some global variable in such a way to indicate which specific stream you want to 'stop'.


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/20111208/197683fc/attachment.html>


More information about the live-devel mailing list