<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16437"></HEAD>
<BODY
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV dir=ltr align=left><SPAN class=514120913-08122011><FONT color=#005080
face="Trebuchet MS">Hi Ross,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=514120913-08122011><FONT color=#005080
face="Trebuchet MS"></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=514120913-08122011><FONT color=#005080
face="Trebuchet MS">Thanks for the reply.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=514120913-08122011><FONT color=#005080
face="Trebuchet MS"></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=514120913-08122011><FONT color=#005080
face="Trebuchet MS">The part that I don't understand that if I only have one
doEventLoop for any number of streams, how can I stop that event loop without
stopping all of the streams? Surely if I stop my one and only eventLoop,
then none of the streams will work.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=514120913-08122011></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=514120913-08122011><FONT color=#005080
face="Trebuchet MS">I have been experimenting will closing the desired
ServerMediaSession and the OnDemandMediaSession but so far no
success.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=514120913-08122011><FONT color=#005080
face="Trebuchet MS"></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=514120913-08122011><FONT color=#005080
face="Trebuchet MS">Any advise would be appreciated.</FONT></SPAN></DIV>
<DIV><FONT color=#005080
face="Trebuchet MS"><STRONG></STRONG></FONT> </DIV>
<DIV> </DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> live-devel-bounces@ns.live555.com
[mailto:live-devel-bounces@ns.live555.com] <B>On Behalf Of </B>Ross
Finlayson<BR><B>Sent:</B> 08 December 2011 10:46 AM<BR><B>To:</B> LIVE555
Streaming Media - development & use<BR><B>Subject:</B> Re: [Live-devel] Stop
specific streams.<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>
<BLOCKQUOTE type="cite">
<DIV
style="Z-INDEX: auto; POSITION: static; BACKGROUND-COLOR: rgb(224,224,224); FONT-FAMILY: Arial; COLOR: rgb(0,0,0); FONT-SIZE: 10pt"
bgcolor="#e0e0e0" background="">
<DIV><FONT color=#005080 size=3 face="Trebuchet MS"><SPAN
class=664024207-08122011>Let me first let you how I am creating these multiple
streams:</SPAN></FONT></DIV>
<DIV><FONT color=#005080 size=3 face="Trebuchet MS"><SPAN
class=664024207-08122011></SPAN></FONT> </DIV>
<DIV><FONT color=#005080 size=3 face="Trebuchet MS"><SPAN
class=664024207-08122011>1. Create an RTSPServer, if none exists. I make
use of only 1 RTSP server.</SPAN></FONT></DIV>
<DIV><FONT color=#005080 size=3 face="Trebuchet MS"><SPAN
class=664024207-08122011>2. Create a new ServerMediaSession for each
stream. This ServerMediaSession is saved in a map with a unique
identifier for the stream.</SPAN></FONT></DIV>
<DIV><FONT color=#005080 size=3 face="Trebuchet MS"><SPAN
class=664024207-08122011>3. Create a new OnDemandMediaSubsession of each
stream, depending on the type of media.</SPAN></FONT></DIV>
<DIV><FONT color=#005080 size=3 face="Trebuchet MS"><SPAN
class=664024207-08122011>4. Add the OnDemandMediaSubsession to the
ServerMediaSession.</SPAN></FONT></DIV>
<DIV><FONT color=#005080 size=3 face="Trebuchet MS"><SPAN
class=664024207-08122011>5. Add the ServerMediaSession to the RTSP
Server.</SPAN></FONT></DIV>
<DIV><FONT color=#005080 size=3 face="Trebuchet MS"><SPAN
class=664024207-08122011>6. Run the doEventLoop if it has not been started
yet. If it has, do nothing.</SPAN></FONT></DIV>
<DIV><FONT color=#005080 size=3 face="Trebuchet MS"><SPAN
class=664024207-08122011></SPAN></FONT> </DIV>
<DIV><FONT color=#005080 size=3 face="Trebuchet MS"><SPAN
class=664024207-08122011>Note that I have only one RTSP server and one
doEventLoop, regardless of how many streams run.</SPAN></FONT></DIV>
<DIV><FONT color=#005080 size=3 face="Trebuchet MS"><SPAN
class=664024207-08122011></SPAN></FONT> </DIV>
<DIV><FONT color=#005080 size=3 face="Trebuchet MS"><SPAN
class=664024207-08122011>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.
</SPAN></FONT></DIV></DIV></BLOCKQUOTE>
<DIV><BR></DIV>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'.)</DIV>
<DIV><BR></DIV>
<DIV>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'.</DIV><BR><BR>
<DIV apple-content-edited="true"><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; FONT: medium Helvetica; WHITE-SPACE: normal; ORPHANS: 2; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; FONT: medium Helvetica; WHITE-SPACE: normal; ORPHANS: 2; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>Ross Finlayson<BR>Live Networks, Inc.<BR><A
href="http://www.live555.com/">http://www.live555.com/</A></SPAN></SPAN>
</DIV><BR></BODY></HTML>