Some help with ghost pads please

gstream at ccc2.com gstream at ccc2.com
Fri Mar 30 22:49:14 PDT 2012


Hi Stefan,

Thx for the info, it looks like the problem is having a static sink ghost
of a dynamic sink pad.

If i bring the FFMPG element fwd (ie make that the first element in the
bin)it works fine,

videobox -> videomixer2 |>bin   > ffmpegcs ......
              static -> static -> static
      Pad src_1a = vidmix.getRequestPad("sink_%d");
      videobox1.getStaticPad("src").link(src_1a);
      ffcs99.getStaticPad("sink");
      vidmix_out.addPad(new GhostPad("vgstPad",
ffcs99.getStaticPad("sink")));
      Pad src_1b = vidmix_out.getStaticPad("vgstPad");
      vidmix.getStaticPad("src").link(src_1b);


going with a dynamic pad I have no errors but the pipeline stalls at with
the ghostpad Static

videobox -> |>bin  -> videomixer2 ->  ffmpegcs ......
  static -> static -> dynamic
      vidmix.getRequestPad("sink_%d");
      vidmix_out.addPad(new GhostPad("vgstPad",    
vidmix.getRequestPad("sink_%d")));
      Pad src_1a = vidmix_out.getRequestPad("vgstPad");
      videobox1.getStaticPad("src").link(src_1a);

I think the 3rd line is not ghosting the sink to sink_%d.
For example how would you attached a 2nd input if you were not using _%d?


again your advice would be great.
thx
Art

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