<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Yes, a few actually. One is to connect to the autoplug-select signal
    from the application:<br>
<a class="moz-txt-link-freetext" href="https://gstreamer.freedesktop.org/documentation/playback/decodebin.html?gi-language=c#decodebin::autoplug-select">https://gstreamer.freedesktop.org/documentation/playback/decodebin.html?gi-language=c#decodebin::autoplug-select</a><br>
    <br>
    Another approach is to set the ranks of the potential factories
    ahead of time,<br>
    using gst_plugin_feature_set_rank:<br>
    <br>
<a class="moz-txt-link-freetext" href="https://gstreamer.freedesktop.org/documentation/gstreamer/gstpluginfeature.html?gi-language=c#gst_plugin_feature_set_rank">https://gstreamer.freedesktop.org/documentation/gstreamer/gstpluginfeature.html?gi-language=c#gst_plugin_feature_set_rank</a><br>
    <br>
    <div class="moz-cite-prefix">On 3/25/20 7:58 PM, Frederic Turmel
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAGWvTvq5GUniyeONi5Wb+vLeD_ch=cwy=LPWELBmmnVtisy5UQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Sounds good. Is there a way to use a preferred
        decoder when multiples are available?
        <div><br>
        </div>
        <div>Thanks<br>
          FredT</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Wed, Mar 25, 2020 at 10:40
          AM Mathieu Duponchelle <<a
            href="mailto:mathieu@centricular.com" moz-do-not-send="true">mathieu@centricular.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div> 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>On 3/25/20 6:19 PM, Frederic Turmel wrote:<br>
            </div>
            <blockquote type="cite">
              <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></fieldset>
              <pre>_______________________________________________
gstreamer-devel mailing list
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" moz-do-not-send="true">gstreamer-devel@lists.freedesktop.org</a>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank" moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
            </blockquote>
          </div>
        </blockquote>
      </div>
    </blockquote>
  </body>
</html>