Question regarding use of interleaved and deinterleaved elements in processing chain

Hauke Krüger hk at javox-solutions.com
Sun Aug 21 16:44:15 UTC 2016


Hi everyone,

I have a processing chain in which interleaved audio channels are 
transformed into mono streams and afterwards
transformed into a single interleaved stream with a different number of 
channels.


I understood that using a deinterleaver followed by an interleaver is 
the way to follow for this.


audiosrc --> deinterleaver     --[channel0]-->    interleaver -> audiosink
                                                --[channel1]->
                                                --[channel2]->
                                                --[channel3]->


Hence, i add both interleaver and deinterleaver to the pipeline. When 
trying to link the pads, however,
there are no output src pads on the deinterleaver and no sink pads on 
the interleaver since those are of type
"sometimes". By playing around, I found that the pipeline must be set 
into state PLAYING to ask the deinterleaver to actually
allocate the src pads (one for each channel, the number of which being 
specified by transferring the caps to the sink pad of it).

So, if I keep deinterleaver and interleaver disconnected when switching 
into state PLAYING, the pipeline reports an
"internat data flow error" and is switched into PAUSED since there is a 
connection gap. Now, the newly created pads of the
deinterleaver are reported and I could connect those in the matching 
callback and set the state to PLAYING again. The
interleaver, however, never exposes the "sometimes" sink pads.

Here is the question: is that really the way it is supposed to work or 
may I somehow trigger interleaver and deinterleaver
to produce source and sink pads before actually switching to PLAYING 
state? And if that is the way, how may I achieve the
generation of the interleaver sink pads? The creation of the processing 
chain is aways from src to sink which implies that the
interleaver must have the sink pads connected first which are not available.

Thank you and best regards

Hauke


More information about the gstreamer-devel mailing list