<!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>
<DIV dir=ltr align=left><SPAN class=356164408-09122011><FONT color=#005080
face="Trebuchet MS">Hi,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=356164408-09122011><FONT color=#005080
face="Trebuchet MS"></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=356164408-09122011><FONT color=#005080
face="Trebuchet MS"></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=356164408-09122011><FONT color=#005080
face="Trebuchet MS">So I am trying to create a event trigger, but I am unsure on
how to proceed. The taskScheduler->createEventTrigger() function expects a
taskFunc object and I am not sure what this is. Is it similar to a callback? If
so, how do I cast my function do a taskFunc object? I currently having something
like this, which is way off:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=356164408-09122011><FONT color=#005080
face="Trebuchet MS"></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=356164408-09122011><FONT color=#005080
face="Trebuchet MS"></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=356164408-09122011><FONT color=#005080
face="Trebuchet MS">void killStream() {};</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=356164408-09122011><FONT color=#005080
face="Trebuchet MS">taskSched->createEventTrigger(&killstream);</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=356164408-09122011><FONT color=#005080
face="Trebuchet MS"></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=356164408-09122011><FONT color=#005080
face="Trebuchet MS"></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=356164408-09122011><FONT color=#005080
face="Trebuchet MS">I am also still unsure about the mechanisms for actually
stopping the streams. In the past killing the eventLoop was fine, but if I want
to stop a single stream and leave the eventLoop running, how do I do it? Do I
medium::close() the appropriate servermediasubsession? Do I remove it from the
rtspServer? I tried these things but none seem to work.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=356164408-09122011><FONT color=#005080
face="Trebuchet MS"></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=356164408-09122011><FONT color=#005080
face="Trebuchet MS"></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=356164408-09122011><FONT color=#005080
face="Trebuchet MS">Thanks</FONT></SPAN></DIV></DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"></FONT> </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 05:43 PM<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="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">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></BLOCKQUOTE>
<DIV><BR></DIV>Yes, but the way that programmers typically use "doEventLoop()"
with a 'watch variable' is inside a loop - e.g.</DIV>
<DIV><SPAN style="WHITE-SPACE: pre" class=Apple-tab-span></SPAN>while (1)
{</DIV>
<DIV><SPAN style="WHITE-SPACE: pre"
class=Apple-tab-span>env.taskScheduler().doEventLoop(&watchVariable);</SPAN></DIV>
<DIV><SPAN style="WHITE-SPACE: pre" class=Apple-tab-span></SPAN>// handle the
setting of the 'watch variable', then reenter the event loop</DIV>
<DIV><SPAN style="WHITE-SPACE: pre" class=Apple-tab-span></SPAN>}</DIV>
<DIV><BR></DIV>
<DIV>This is why it's better to use the new "event trigger" mechanism.
That way, you can call "doEventlLoop()" just once, and never leave it.
(In this case, the 'trigger handler' routines are all called from within
the event loop.)</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>