Some help with ghost pads please

Stefan Sauer ensonic at hora-obscura.de
Fri Mar 30 11:22:17 PDT 2012


On 03/30/2012 01:37 PM, gstream at ccc2.com wrote:
> Hi All,
>
> I know this is in java but hopefully you may be able to point out my error
> below,
>
> I have been trying to modify a working pipeline,
> I connect vidmix request pad to videobox1 with
>
> Element videobox1 = ElementFactory.make("videobox", "videobox1");
> Element vidmix = ElementFactory.make("videomixer2", "vidmix");
>
> Pad src_1a_2 = vidmix.getRequestPad("sink_%d");
> videobox1.getStaticPad("src").link(src_1a_2);
>
>
> If I try wrapping some of the elements in a bin, however I get
>
> gst_pad_link_full: assertion `GST_IS_PAD (sinkpad)' failed
>
> BIN CODE
>
> vidmix_out = new Bin("vidmix_out");
> Element vidmix = ElementFactory.make("videomixer2", "vidmix");
> Element ffcs99 = ElementFactory.make("ffmpegcolorspace", "ffcs99");
> Element vidsc99 = ElementFactory.make("videoscale", "vidsc99");
> Element caps99 = ElementFactory.make("capsfilter", "caps99");
> caps99.setCaps(Caps.fromString("  CAPS goses here ");
> Element sinky = ElementFactory.make("filesink", "sinky");
>
> vidmix_out.addMany(vidmix, ffcs99, vidsc99, caps99, sinky);
> Element.linkMany(vidmix, ffcs99, vidsc99, caps99, sinky);
> vidmix_out.addPad(new GhostPad("sink", vidmix.getRequestPad("sink_%d")));
> pipe.add(vidmix_out);
>
> Pad src_1a_2 = vidmix_out.getRequestPad("sink_%d");
Pad src_1a_2 = vidmix_out.getStaticPad("sink");

The ghostpad uses the request-pad from the videomixer as a target. You will link to the ghostpad, when you want to link to the bin.

Stefan

> videobox1.getStaticPad("src").link(src_1a_2);
>
> I have tried replacing
> new GhostPad("sink"
> with
> new GhostPad("sink_%d"
> with no luck
>
> any advice you could give would be great
> thx
> Art
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list