<br>Hi!<br>I have already had a look at tee, but at first sight it didn&#39;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 (&quot;src%d&quot;,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; GST_PAD_SRC,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; GST_PAD_REQUEST,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; 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 (&amp;hikvision_src_template));</span><br>
<br>class_init:<br><span style="font-family: courier new,monospace;">gstelement_class-&gt;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;">&nbsp;&nbsp;&nbsp; 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;">&nbsp;&nbsp;&nbsp; GstPad *srcpad;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; gchar *name;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; GstHikvisionSrc *hiksrc;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; GstElementClass *klass;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; //g_return_val_if_fail (templ != NULL, NULL);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; //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;">&nbsp;&nbsp;&nbsp; </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; hiksrc = GST_HIKVISION_SRC (element);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; 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;">&nbsp;&nbsp;&nbsp; name = g_strdup_printf (&quot;src%d&quot;, hiksrc-&gt;pad_counter++);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; fprintf(stderr, &quot;name: %s&quot;, name);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; srcpad = gst_pad_new_from_template (templ, name);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; 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;">&nbsp;&nbsp;&nbsp; gst_element_add_pad (element, srcpad);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; return srcpad;&nbsp; &nbsp; </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&#39; 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 (&quot;src&quot;,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">
&nbsp;&nbsp;&nbsp; GST_PAD_SRC,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
&nbsp;&nbsp;&nbsp; GST_PAD_REQUEST,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
&nbsp;&nbsp;&nbsp; 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, &quot;src&quot;);</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>