Play 2 mp3 file at same time.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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




[Index of Archives]     [Linux Embedded]     [Linux ARM Kernel]     [Linux for ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux Media]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux