[Live-devel] Proper way to stream several files with livelibraries?

Iñigo Lopez Barranco ilopez at albatros-sl.es
Tue Nov 23 18:31:49 PST 2004


Thanks a lot for the prompt answer.

>This is actually fairly easy to do.  Just use one of the existing 
>"test*Streamer" applications as a model, but modify it to have more than 
>one file source, and more than one "RTPSink" (with corresponding 
>"RTCPInstance") - one for each indended destination 'channel'.  You would 
>then call "startPlaying()" multiple times - once for each desired 
>source-destination pair.

I'll try this.

>>For streaming several files I've seen ByteStreamMultiFileSource class, 
>>which should be passed to a MPEG1or2VideoStreamFramer object, right?
>
>No, don't use "ByteStreamMultiFileSource".  You would use this only if you 
>were streaming multiple files - one after the other - to the *same* 
>destination.

That's what I want to do: stream a list of files to one chanel, and another list to the second channel. I dind't make me clear, sorry about that. Indeed, I did a little test based on testMPEG1or2VideoStreamer with ByteStreamMultiFileSource and 1 sink and works ok, thanks.

>>For having 2 different "channels", I thought of having two threads with 
>>different env, sink and source for each one.
>
>No, don't do this.  There's absolutely no need to use multiple threads 
>here.  Just use a single thread, with a single "UsageEnvironment", but with 
>multiple sources and sinks, and with "startPlaying()" called multiple times 
>- once for each desired source-sink pair.

So it would be for 2 sinks:
sink1->startPlaying();
sink2->startPlaying();
env1->taskScheduler().doEventLoop();

But how do I get to start again when the multifile source has ended? Do I have to reopen the source and call startPlaying() similar to what testMPEG1or2VideoStreamer does or there is something like a "loop" parameter?

Thanks again

Iñigo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3504 bytes
Desc: not available
Url : http://lists.live.com/pipermail/live-devel/attachments/20041123/c84b24b0/attachment.bin


More information about the live-devel mailing list