<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Hey Frederic,<br>
    <br>
    Unless I'm missing something, you should be able to use decodebin as
    such:<br>
    <br>
    your_source_element ! decodebin ! sink<br>
    <br>
    When your source element pushes "audio/x-raw" caps, decodebin will
    simply<br>
    pass through the buffers that follow. When it pushes non-raw caps,
    decodebin<br>
    will take care of selecting the appropriate parser / decoder.<br>
    <br>
    Does that answer your question?<br>
    <br>
    <div class="moz-cite-prefix">On 3/25/20 6:19 PM, Frederic Turmel
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAGWvTvq6nE1mgvytAWK=XgM_AzkAOx4tkL+cgSm5tCP-mvse2Q@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi, I have a source audio element that can send PCM
        or iec60958/61937. The src element update its output caps so the
        downstream will know.
        <div><br>
        </div>
        <div>An example case:</div>
        <div>When src is PCM:     PCM -> sink</div>
        <div>When src is iec60958/:    iec60958 -> parser -> audio
          decoder -> PCM<br>
        </div>
        <div><br>
        </div>
        <div>Ideally would like this to be totally transparent to my top
          level application that creates the pipeline. In other words I
          don't want my top level app updating the pipeline.</div>
        <div><br>
        </div>
        <div>Note the IEC60958/61937 I need to build also.<br>
        </div>
        <div><br>
        </div>
        <div>What would be the best options?</div>
        <div>1-If I create the parser with proper pads/caps can
          decodebin leverage it automatically?<br>
        </div>
        <div>2-Should I create a specific bin for my needs?</div>
        <div><br>
        </div>
        <div>Any suggestions?<br>
        </div>
        <div><br>
        </div>
        <div>Thanks</div>
        <div>FredT</div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote>
  </body>
</html>