<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GStreamer] unrelated codecs required to play videos"
   href="https://bugs.webkit.org/show_bug.cgi?id=135972#c11">Comment # 11</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GStreamer] unrelated codecs required to play videos"
   href="https://bugs.webkit.org/show_bug.cgi?id=135972">bug 135972</a>
              from <span class="vcard"><a class="email" href="mailto:mcatanzaro&#64;igalia.com" title="Michael Catanzaro &lt;mcatanzaro&#64;igalia.com&gt;"> <span class="fn">Michael Catanzaro</span></a>
</span></b>
        <pre>Example code from Sebastian, for a non-terrible solution to this (I'm posting it here so that I don't lose it):

GList *decoder_factories, *h264_decoders;
GstCaps *caps;

decoder_factories = gst_element_factory_list_get_elements (GST_ELEMENT_FACTORY_TYPE_DECODER |
        GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO,
        GST_RANK_MARGINAL);

// Repeat this for all caps you care about

caps = gst_caps_new_empty_simple (&quot;video/x-h264&quot;);
h264_decoders = gst_element_factory_list_filter (decoder_factories, caps, GST_PAD_SINK, FALSE);
gst_caps_unref (caps);

if (h264_decoders != NULL) {
  // found h264 decoder
}

gst_plugin_feature_list_free (h264_decoders);

// end repeat

gst_plugin_feature_list_free (decoder_factories);</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>