<div>
<p>Hi all,</p>
<p>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?</p>
<p>I used following code, but it failed.</p>
<p>----------------------------------<br>In player application: <br>----------------------------------<br>1. add video decoder into dec bin.<br>decbin = gst_bin_new(&quot;decbin&quot;);<br>gst_bin_add(GST_BIN(decbin), video_decoder);
</p>
<p>2. add ghost pads to dec bin.<br>gst_element_add_pad (decbin, gst_ghost_pad_new (&quot;sink&quot;, video_decoder_sinkpad));<br>gst_element_add_pad (decbin, gst_ghost_pad_new (&quot;src&quot;, video_decoder_sinkpad));</p>

<p>3. link the dec bin into pipeline.<br>gst_element_link(decbin, video_sink);<br>gst_element_link(demux, decbin);</p>
<p><br>-----------------------------------------------<br>In Plugin code of video decoder:<br>-----------------------------------------------<br>After debugging the src_link_function(GstPad *pad, GstPad *peer), I found the &quot;pad&quot; is the &quot;video decoder src pad&quot;, but the &quot;peer&quot; is proxy pad, not the &quot;video_sink sink pad&quot;, so I can&#39;t connect the pipeline properly.
</p>
<p><br>How can I solve this issue?<br>Thanks in advance!&nbsp; :-)</p>
<p><br>- Max</p></div>