[Live-devel] multiple simultaneous sinks

Ross Finlayson finlayson at live555.com
Wed May 31 12:37:06 PDT 2006


>How do I create multiple sinks in a processing chain?
>
>                                               AAC encoder -> RTPSink
>                                            /
>RTPsource -> audio decoder  -- AMR encoder -> RTPSink
>                                           \
>                                              HE-AAC encoder -> RTPSink
>
>
>I want to decode the incoming audio only once.
>
>As per my current understanding, simply creating three encoders and
>RTPSinks and specifying a single instance of the decoder as their
>dependency should do the trick.

You won't be able to use just a single instance of the "audio 
decoder", because a "FramedSource" object can be read from only once 
at a time.  (And also, you want to deliver the *same* data to each of 
the downstream objects.)

Instead, you will need to restructure your "audio decoder" object to 
generate, on demand, *separate* "FramedSource" objects - one for each 
downstream object.  I'm not sure exactly how you would do this, but I 
suggest using the existing 
"MPEG1or2Demux"/"MPEG1or2DemuxedElementaryStream" classes as 
models.  (These classes are used to demultiplex audio and video data 
from a MPEG Program Stream.)

Sometime in the future we may add a new 'Duplicator' mechanism to the 
library.  For now, though, you will need to do this yourself.


	Ross Finlayson
	Live Networks, Inc. (LIVE555.COM)
	<http://www.live555.com/>



More information about the live-devel mailing list