[gst-devel] Can I use decodebin as a sink?

Fabrice Triboix gstdbg at yahoo.com
Mon Jul 2 17:11:44 CEST 2007


Hi all,

Here is my situation: I have an element which is both
a decoder and a sink. It takes MP3 frames as input and
plays that directly to the hardware.

I am trying to use decodebin to automatically select
this element to play an MP3 stream.

If I write the whole pipeline manually, it works very
well:
gst-launch <MP3 src> ! <my element>

If I try to use decodebin like this:
gst-launch <MP3 src> ! decodebin
it fails.

To cut a long story short, I essentially investigated
the debug traces and found that in the second case,
gstreamer blocks in GST_PAD_PREROLL_WAIT(), which is
called from the basesink element. My element is
derived from GstBaseSink.

Incidentally, I found that decodebin creates a
fakesink element and normally destroys it afterwards.
But in this case the created fakesink is not deleted.
My element is correctly detected as the element to use
to decode the MP3 stream, though. It is apparently
correctly created and initialized.

Could this come from the fact that decodebin is the
last element of the gst-launch pipeline, and that I do
not specify a sink element?

I thought that this may be the problem, so I modified
my element and added a fake "always" source pad that
never send anything. I use then a pipeline like that:
gst-launch <MP3 src> ! decodebin ! fakesink
However, the debug traces are almost exactly the same
and I have the same blocking problem in the same
place...

Could anybody help me?

Thanks a lot for any help!

  Fabrice



       
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/




More information about the gstreamer-devel mailing list