[Live-devel] separating source and sink objects

Ross Finlayson finlayson at live.com
Tue Mar 30 16:05:50 PST 2004


>I had asked earlier if I would be able to stream and receive more than one
>mpeg-2 video elementary or program streams simultaneously using the live
>software and your answer was a yes.  In addition you had said to use
>separate source and sink objects for each stream.  Can you elaborate on this
>please?  How would I be able to separate source and sink objects?

Look at the existing test programs (especially the "test*Streamer" test 
programs - e.g., testMPEG1or2VideoStreamer), and note how they use 'source' 
and 'sink' objects to send a single stream.

To send multiple (independent) streams, you would simply create a pair of 
source and sink objects for each stream, and then call "startPlaying()" on 
each sink.  E.g., to send 3 separate streams:
         - create source1
         - create sink1
         - create source2
         - create sink2
         - create source3
         - create sink3
         - sink1->startPlaying(*source1, ...)
         - sink2->startPlaying(*source2, ...)
         - sink3->startPlaying(*source3, ...)
         - env->taskScheduler().doEventLoop()





More information about the live-devel mailing list