[gst-devel] gst_parse_bin_from_description ghost pads

Luciana Fujii Pontello luciana at holoscopio.com
Mon Oct 4 21:18:15 CEST 2010


On Mon, 2010-10-04 at 20:06 +0200, José Luis Segura Lucas wrote:
> Hi,
> 
> I'm trying to use the gst_parse_bin_from_description function. I'm able
> to get it working if I put a full pipeline inside the description, but
> if I try something like thist:
> 
> gst_parse_bin_from_description("videotestsrc ! decodebin2", TRUE);
> 
> I can't connect the decodebin2 pad (when it's created) to a sink. I
> trying connecting the 'pad-added' signal of the Bin to a callback, but
> it's never invoked.
> 
> I suppose that I need to connect the decodebin2 'pad-added' signal
> instead the bin one, but I don't know how to get the decodebin2 element
> inside the bin.

You can use gst_bin_get_by_name (). Or you can create the bin using
other methods. I suggest creating the elements by hand and adding them
to the bin yourself.

> Furthermore, about the TRUE argument passed to the function, why is not
> created a ghost pad on the bin to connect the decodebin2 one to the
> "outside" bin world? Is it because the decodebin2 doesn't have a source
> pad at the bin creation time?

I believe it is. You should probably add the ghost pad to your Bin and
link the bin to your sink, and then set the ghost pad target inside the
callback from "new-decoded-pad" signal.

Regards,

Luciana Fujii




More information about the gstreamer-devel mailing list