Hi Nicolai, actually as I said I already did it and ir didn&#39;t work. Here is my original message<br>&quot;I tryed to link avidemux - decodebin with on-pad event, and decodebin - queue as well. It didn&#39;t work.&quot;<br>
<br><br>I post the code:<br><br>// pad-event for avidemux<br>static void on_pad_added (GstElement *element, GstPad *pad, gpointer  data)<br>{<br>        g_debug (&quot;Signal: pad-added&quot;);<br>        GstCaps *caps;<br>
        GstStructure *str;<br><br>        GstElement *queue = (GstElement*)data;<br>        caps = gst_pad_get_caps (pad);<br>        g_assert (caps != NULL);<br>        str = gst_caps_get_structure (caps, 0);<br>        g_assert (str != NULL);<br>
<br>        cout &lt;&lt; &quot;enlazando enlazara pads&quot; &lt;&lt; endl &lt;&lt; endl;<br>        if (g_strrstr (gst_structure_get_name (str), &quot;video&quot;)) {<br>                g_debug (&quot;Linking video pad to dec_vd&quot;);<br>
                // Link it actually<br>                GstPad *targetsink = gst_element_get_pad (queue, &quot;sink&quot;);<br><br>                //GstCaps *capsV = gst_caps_from_string(&quot;video/x-raw-yuv;video/x-raw-rgb&quot;);<br>
                //GstPad *targetsink = gst_element_get_compatible_pad(data,pad,capsV);<br>                cout &lt;&lt; &quot;enlazando cola de video&quot; &lt;&lt; endl &lt;&lt; endl;<br>                g_assert (targetsink != NULL);<br>
                gst_pad_link (pad, targetsink);<br>                gst_object_unref (targetsink);<br>        }<br><br>        if (g_strrstr (gst_structure_get_name (str), &quot;audio&quot;)) {<br>                g_debug (&quot;Linking audio pad to dec_ad&quot;);<br>
                // Link it actually<br>                //GstPad *targetsink = gst_element_get_pad (decad, &quot;sink&quot;);<br>                GstPad *targetsink = gst_element_get_pad (queue, &quot;sink&quot;);<br>                cout &lt;&lt; &quot;enlazando cola de audio&quot; &lt;&lt; endl &lt;&lt; endl;<br>
                g_assert (targetsink != NULL);<br>                gst_pad_link (pad, targetsink);<br>                gst_object_unref (targetsink);<br>        }<br><br>        gst_caps_unref (caps);<br>        //gst_caps_unref (capsV);<br>
}<br><br>// pad event for decodebin2<br>static void cb_pad_added (GstElement *element, GstPad *pad, gpointer  data)<br>{<br>  GstPad *sinkpad = NULL;<br>  GstElement * queue = (GstElement *) data;<br><br>  /* Ahora linkeo el pad de comp con sink pad */<br>
  g_print (&quot;Dynamic pad created, linking queue\n&quot;);<br>  sinkpad = gst_element_get_static_pad (queue, &quot;sink&quot;);<br><br>  gst_pad_link (pad, sinkpad);<br><br>  gst_object_unref (sinkpad);<br><br>}<br><br>
<br><br><div class="gmail_quote">2012/1/5 Nicolai Hess <span dir="ltr">&lt;<a href="mailto:nicolaihess@web.de">nicolaihess@web.de</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br><div class="gmail_quote">2012/1/5 Rossana Guerra <span dir="ltr">&lt;<a href="mailto:guerra.rossana@gmail.com" target="_blank">guerra.rossana@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div class="h5">
Hi I am trying to play an avi file, for some reasons I don&#39;t want to do it with a playbin.<br>The fact is I had an avidemux and a mad decoder but not every avi file can play. Then I replaced it for the following pipeline, to get the most codecs.<br>


<br>                                decodebin ----- queue ------ audioconvert ---- audioresample ------ autoaudiosink<br>filescr --- avidemux ---<br>                                decodebin ----- queue ------ ffmpegcolorspace ----- videoscale ----autovideosink<br>


<br><br>I tryed to link avidemux - decodebin with on-pad event, and decodebin - queue as well. It didn&#39;t work.<br><br>I tryed to link avidemux - decodebin with the following code, but it didn&#39;t work either.<br><br>


// demuxer avidemux&#39;s name<br>// decvd a decodebin name for video, decad a decodebin name for audio.<br><br>GstPad *targetsrc = gst_element_get_pad(demuxer, &quot;video_%02&quot;);<br><br>GstPad *targetsrc2 = gst_element_get_pad(demuxer, &quot;audio_%02&quot;);<br>


<br>GstPad *padV = gst_element_get_static_pad(decvd,&quot;sink&quot;);<br><br>GstPad *padA = gst_element_get_static_pad(decad,&quot;sink&quot;);<br><br>gst_pad_link (targetsrc,padV);<br>gst_pad_link (targetsrc2,padA);<br>


<br>Any suggestion? Thanks a lot.<span><font color="#888888"><br><br>Rossana<br>
</font></span><br></div></div>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br>I think this is the same error I wrote about in <br>your last program. You can not get the srcpads from the<br>avidemux, as they are dynamic pads.<br>At this point, the demuxer can not know if there are audio and/or<br>

video streams at all. <br>You have to create a pad-added callback for the demuxer as well.<span class="HOEnZb"><font color="#888888"><br><br>nicolai<br>
</font></span><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br>