[Live-devel] Stop specific streams.

Marlon Reid Marlon at scansoft.co.za
Fri Dec 9 01:04:45 PST 2011


Hi,
 
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:
 
void killStream() {};
taskSched->createEventTrigger(&killstream);
 
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.
 
Thanks
 

________________________________

From: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] On Behalf Of Ross Finlayson
Sent: 08 December 2011 05:43 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] Stop specific streams.



	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.


Yes, but the way that programmers typically use "doEventLoop()" with a
'watch variable' is inside a loop - e.g.
while (1) {
env.taskScheduler().doEventLoop(&watchVariable);
// handle the setting of the 'watch variable', then reenter the event
loop
}

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.)


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/20111209/998a78df/attachment-0001.html>


More information about the live-devel mailing list