[Live-devel] Adding multiple sources

Stas Desyatnlkov stas at mer.co.il
Tue Apr 4 02:36:53 PDT 2006


Hi,

 

The problem with this solution is - when the doEventLoop is blocked on
select it will not react to the watch variable. So, if application needs
to add new sources/sinks it will never be able to do so if there will be
no data on already instantiated sources/sinks.

In case where message sink/source is created the new socket is added to
the read set of select and thus it will exit every time a message is
sent. 

 

Is there any way to break select wait except for specifying timeout and
poll for it ?

 

Regards,

Stas 

 

-----Original Message-----
From: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] On Behalf Of Ross Finlayson
Sent: Monday, April 03, 2006 4:41 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] Adding multiple sources

 

 

>I thought about overriding doEventLoop in a class derived from 

>BasicTaskScheduler. But someone gave me a better idea.

> 

>The idea is creating a socket that will serve as request sink. When 

>a new source or sink needs to be added a message is sent to the 

>socket (request sink) and the select called by NextStep exits 

>(because request sink is readable). When a message on the socket is 

>received it handles it and creates new sink or source according to 

>received message data.

> 

>The socket can be opened as UDP because it will receive messages 

>over local loop (so no chance data is lost).

> 

>Am I on the right track here ?

 

Yes, it's perfectly reasonable to use incoming data on a socket as a 

message 'event'.  This is supported directly within the "LIVE555 

Streaming Media" libraries (using 

"TaskScheduler::turnOnBackgroundReadHandling()").

 

However, a simpler solution - if the messages are to originate within 

the same address space (process) as the LIVE555 thread - is to use 

the 'watchVariable' feature, as illustrated in 

<http://lists.live555.com/pipermail/live-devel/2005-September/003276.htm
l>. 

Note that the 'watchVariable' is a char, giving you 255 non-zero 

values to use for messages.

 

 

      Ross Finlayson

      Live Networks, Inc. (LIVE555.COM)

      <http://www.live555.com/>

 

_______________________________________________

live-devel mailing list

live-devel at lists.live555.com

http://lists.live555.com/mailman/listinfo/live-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20060404/9c3a8491/attachment-0001.html 


More information about the live-devel mailing list