Request pads names
Sérgio Agostinho
sergio.r.agostinho at gmail.com
Fri May 1 01:01:45 PDT 2015
Thanks for the explanation and links.
I was trying this both on a tee and on an audiomixer element. So although I
wrote my example with the tee element, maybe it was just failing on the
audiomixer and I failed to notice that.
Cheers
2015-04-30 21:10 GMT+02:00 Tim Müller <tim at centricular.com>:
> On Thu, 2015-04-30 at 10:21 +0200, Sérgio Agostinho wrote:
>
> Hi Sérgio,
>
> > Come on guys, somebody must have faced this problem before. Is it
> > possible to do what I've mentioned.?
>
> Yes, this should be possible, just like you do, simply pass the template
> and the name you want. Whether this actually works or not depends a bit
> on the element in question. In tee's case this seems to have been fixed
> somewhere after 1.2 so it only works in version 1.4 or later:
>
>
> http://cgit.freedesktop.org/gstreamer/gstreamer/tree/plugins/elements/gsttee.c#n346
>
>
> http://cgit.freedesktop.org/gstreamer/gstreamer/commit/plugins/elements/gsttee.c?id=24a3102b2149663e1ba93c66b033ffb623832852
>
> Cheers
> -Tim
>
> >
> > 2015-04-28 11:05 GMT+02:00 Sérgio Agostinho
> > <sergio.r.agostinho at gmail.com>:
> > Hi everyone,
> >
> >
> > Normally when you request a pad from a tee, you specify the
> > name of the template 'src_%u' and then a new pads gets created
> > with a name
> >
> >
> > src_0
> > src_1
> > src_2
> > etc...
> >
> >
> > This time I was trying to specify the name of the pad myself,
> > i.e. I wanted the first request pad created to be named
> > 'src_1', the second one 'src_11', etc....
> >
> >
> > Is this possible? If so, how do I achieve this?
> >
> >
> > I've listed below all my unsuccessful attempts so far:
> >
> >
> > 1 -
> > gst_element_get_request_pad(tee, "src_1");
> >
> >
> > 2 -
> > tmpl = gst_element_class_get_pad_template
> > (GST_ELEMENT_GET_CLASS (tee), "src_%u");
> > gst_element_request_pad(tee, tmpl, "src_1", NULL);
> >
> >
> > 3 -
> > tmpl_gen = gst_element_class_get_pad_template
> > (GST_ELEMENT_GET_CLASS (tee), "src_%u");
> > caps = gst_pad_template_get_caps(tmpl_gen);
> > tmpl =
> > gst_pad_template_new(s,GST_PAD_TEMPLATE_DIRECTION(tmpl_gen),
> GST_PAD_TEMPLATE_PRESENCE(tmpl_gen), caps);
> > gst_element_request_pad(tee, tmpl, "src_1", NULL);
> >
> >
> >
> >
> > Cheers,
> > Sérgio
> >
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> --
> Tim Müller, Centricular Ltd - http://www.centricular.com
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150501/140cd5aa/attachment.html>
More information about the gstreamer-devel
mailing list