<br>Hi!<br>I have already had a look at tee, but at first sight it didn't seem so simple. Then I will give a second look.<br><br>I ran into a problem.<br><br style="font-family: times new roman,serif;"><span style="font-family: courier new,monospace;">static GstStaticPadTemplate hikvision_src_template = GST_STATIC_PAD_TEMPLATE ("src%d",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> GST_PAD_SRC,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> GST_PAD_REQUEST,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> GST_STATIC_CAPS_ANY);</span><br><br>base_init:<br><span style="font-family: courier new,monospace;">gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&hikvision_src_template));</span><br>
<br>class_init:<br><span style="font-family: courier new,monospace;">gstelement_class->request_new_pad = GST_DEBUG_FUNCPTR (gst_hikvision_src_request_new_pad);</span><br><br><span style="font-family: courier new,monospace;">static GstPad *</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">gst_hikvision_src_request_new_pad (GstElement * element, GstPadTemplate * templ,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> const gchar * unused)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">{</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> GstPad *srcpad;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> gchar *name;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> GstHikvisionSrc *hiksrc;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> GstElementClass *klass;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> //g_return_val_if_fail (templ != NULL, NULL);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> //g_return_val_if_fail (GST_HIKVISION_SRC (element), NULL);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> hiksrc = GST_HIKVISION_SRC (element);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> klass = GST_ELEMENT_GET_CLASS (element);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> name = g_strdup_printf ("src%d", hiksrc->pad_counter++);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> fprintf(stderr, "name: %s", name);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> srcpad = gst_pad_new_from_template (templ, name);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> g_free (name);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> gst_element_add_pad (element, srcpad);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> return srcpad; </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">}</span><br><br>If I do the request pad creation, I am given the following error message:<br><br><span style="font-family: courier new,monospace;">** (gst-launch-0.10:24734): CRITICAL **: gst_base_src_init: assertion `pad_template != NULL' failed</span><br>
<br>Although GST_DEBUG says that src0 is created and was succesfully linked with the sinkpad of the next element in the pipeline.<br><br><br>If I define the pad template like this:<br><br><span style="font-family: courier new,monospace;">static GstStaticPadTemplate hikvision_src_template = GST_STATIC_PAD_TEMPLATE ("src",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">
GST_PAD_SRC,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
GST_PAD_REQUEST,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
GST_STATIC_CAPS_ANY);</span><br><br>And use it in the new_request_pad function like this:<br><br><span style="font-family: courier new,monospace;">srcpad = gst_pad_new_from_template (templ, "src");</span><br>
<br>In this case, there is no problem, but I need more pads with specific names. What can be the solution?<br><br>Thanks,<br>Zoli<br>