<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 06/26/2013 01:37 PM, "Simon Krütt"
      wrote:<br>
    </div>
    <blockquote
cite="mid:trinity-9f2449f5-3869-4fd9-9d02-b39f16e512b1-1372275428265@3capp-webde-bs22"
      type="cite">  srcpad = gst_element_get_static_pad (demux,
      "video_%u");</blockquote>
    <br>
    According to gst-inspect-1.0 qtdemux:<br>
    <blockquote type="cite">  SRC template: 'video_%u'<br>
          Availability: <b>Sometimes</b><br>
          Capabilities:<br>
            ANY</blockquote>
    You can't use gst_element_get_static_pad on a dynamic pad.<br>
    <br>
    You should probably read <a
href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-pads.html">this</a>:<br>
    <blockquote type="cite">Some elements might not have all of their
      pads when the element is created. This can happen, for example,
      with an Ogg demuxer element. The element will read the Ogg stream
      and create dynamic pads for each contained elementary stream
      (vorbis, theora) when it detects such a stream in the Ogg stream.
      Likewise, it will delete the pad when the stream ends. This
      principle is very useful for demuxer elements, for example. </blockquote>
    I assume qtdemux works similarly to oggdemux.<br>
    <br>
    You should be able to use <a
href="https://developer.gnome.org/gobject/stable/gobject-Signals.html#g-signal-connect">g_signal_connect</a>
    to wait for the "pad-added" signal (its callback will give you the
    new pad, just make sure it's a video pad before connecting it).<br>
  </body>
</html>