[gst-devel] Problems when using ghostpad

Diqing Zhong diqing.zhong at gmail.com
Sun Feb 25 10:15:36 CET 2007

Hi all,

I wrote a video decoder, the src and sink pad is customized, they are the
sub-class of GstPad. Can I encapsulate this decoder into a bin, then use
ghost pad to connect this bin into pipeline?

I used following code, but it failed.

In player application:
1. add video decoder into dec bin.
decbin = gst_bin_new("decbin");
gst_bin_add(GST_BIN(decbin), video_decoder);

2. add ghost pads to dec bin.
gst_element_add_pad (decbin, gst_ghost_pad_new ("sink",
gst_element_add_pad (decbin, gst_ghost_pad_new ("src",

3. link the dec bin into pipeline.
gst_element_link(decbin, video_sink);
gst_element_link(demux, decbin);

In Plugin code of video decoder:
After debugging the src_link_function(GstPad *pad, GstPad *peer), I found
the "pad" is the "video decoder src pad", but the "peer" is proxy pad, not
the "video_sink sink pad", so I can't connect the pipeline properly.

How can I solve this issue?
Thanks in advance!  :-)

- Max
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20070225/6f47c033/attachment.htm>

More information about the gstreamer-devel mailing list