[Live-devel] Problem handling multiple MPEG streams.

curt curt at showandtell.com
Fri Aug 12 12:19:54 PDT 2005


>
>>>>  Is there a way to handle multiple RTP streams safely?
>>>
>>>Note that you *don't* need to use multiple threads to receive multiple RTP 
>>>streams.  Instead, you can just use a single thread (and UsageEnvironment and 
>>>TaskScheduler and event loop).
>>
>>That sounds perfect!  Is there a sample that illustrates how one would do 
>>this? I cannot figure out how to use more than one RTP source with MediaSink. 
>>MediaSink::startPlaying takes a single MediaSource.   Is there another way to 
>>startPlay before running the eventloop?
>
> No, but to handle several incoming sources, you create several different 
> "MediaSink" objects - one for each source.  Then, call "startPlaying()" on 
> each one, then call "doEventLoop()" to enter the event loop.
>

I tried the above with 2 MediaSinks (2 seperate MPEG1or2VideoRTPSources).  I am 
finding that the MediaSink object who's startPlaying() is last called is the 
only one that gets processed by the event loop.  More accurately, its the only 
one who's MediaSink::continuePlaying gets called from within EventLoop 
processing.  Does anybody have any suggestions?

Also, concerning calling startPlaying() on each MediaSink object, does live 
support adding MediaSink objects (through startPlaying()) after the 
"doEventLoop()" has been started?

Thanks,
Curt 




More information about the live-devel mailing list