[gst-embedded] Play 2 mp3 file at same time.
Paul Fleischer
paul at xpg.dk
Tue Apr 20 06:51:07 PDT 2010
2010/4/20 Giorgio Marinangeli <giorgio at marinangeli.name>:
> //
> // link the elements together
> //
>
> gst_element_link_many (source1, decoder1, conv1, source2, decoder2,
> conv2, adder, sink, NULL);
> I can compile the program but I can't play any one mp3 file with this
> pipeline.
>
> How Can I link the element in my code to add an ADDER element before the
> sink element?
You need to link the elements properly. gst_element_link_many connects
the elements like a chain. In your example the following pipeline will
be created:
source1 -> decoder1 -> conv1 -> source2 -> decoder2 -> conv2 -> adder -> sink
That does obviously not work. I would think that using two link calls
should do the trick:
gst_element_link_many (source1, decoder1, conv1, adder, sink, NULL);
gst_element_link_many(source2, decoder2, conv2, adder, NULL);
The first call builds the following pipeline:
source1 -> decoder1 -> conv1 -> adder ->sink
While the second call results in the following pipeline:
source1 -> decoder1 -> conv1 ->
adder -> sink
source2 -> decoder2 -> conv2 ->
Which is the pipeline you are expecting.
Hope it works.
Cheers,
Paul
More information about the Gstreamer-embedded
mailing list