Request pads names

Sérgio Agostinho sergio.r.agostinho at gmail.com
Tue Apr 28 02:05:51 PDT 2015


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150428/9fbfaf07/attachment-0001.html>


More information about the gstreamer-devel mailing list