[Webkit-unassigned] [Bug 135972] [GStreamer] unrelated codecs required to play videos

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Aug 8 00:11:39 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=135972

--- Comment #11 from Michael Catanzaro <mcatanzaro at igalia.com> ---
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 ("video/x-h264");
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);

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150808/db06eb14/attachment-0001.html>


More information about the webkit-unassigned mailing list