[gst-devel] Problems when using ghostpad

Edward Hervey bilboed at gmail.com
Mon Feb 26 21:16:47 CET 2007


On 2/25/07, Diqing Zhong <diqing.zhong at gmail.com> wrote:
>
>
> 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",
> video_decoder_sinkpad));
> gst_element_add_pad (decbin, gst_ghost_pad_new ("src",
> video_decoder_sinkpad));

  This is invalid, you are saying that BOTH the "src" ghostpad AND the
"sink" ghostpad are ghosting your video decoder sinkpad. Maybe that's
the source of your problems.

>
> 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.

  What do you mean you can't connect the pipeline properly ? Do the
gst_*_link functions return TRUE or FALSE ? If they returned TRUE,
then your pipeline IS properly connected.

>
>
> How can I solve this issue?
> Thanks in advance!  :-)
>
>
> - Max
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>


-- 
Edward Hervey
Multimedia editing developer / Fluendo S.A.
http://www.pitivi.org/




More information about the gstreamer-devel mailing list