Closed Bug 1215579 Opened 6 years ago Closed 6 years ago

Version-check the gstreamer element blocklist


(Core :: Audio/Video: Playback, enhancement, P5)




Tracking Status
firefox44 --- affected


(Reporter: rillian, Assigned: slomo)




(2 files, 1 obsolete file)

It would be nice if the block list in GstreamerFormatHelper could check for and allow a minimum version, so we could re-enable elements as known issues are addressed.

I tried to do this by calling gst_plugin_feature_check_version inside GStreamerFormatHelper::IsPluginFeatureBlacklisted() but there's a race with calling this inside the feature filter callback which causes a hang.

Perhaps we can check and reject bad versions in a separate loop.
Example of the check which doesn't work. Hangs with a deadlock with this backtrace on fedora 23, checking flump3dec.

#0  0x00007ffff6e5bd89 in syscall ()
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007ffff2050edc in g_mutex_lock_slowpath (mutex=0x7fffb7465308)
    at gthread-posix.c:1315
#2  0x00007ffff2051722 in g_mutex_lock (mutex=<optimized out>)
    at gthread-posix.c:1339
#3  0x00007fffb4d5edc9 in gst_registry_plugin_filter (registry=registry@entry=0x7fffbf9ad970 [GstRegistry], filter=0x7fffb4d54150 <gst_plugin_name_filter>, first=first@entry=1, user_data=user_data@entry=0x7fffc1f673a2) at gstregistry.c:633
#4  0x00007fffb4d5ef94 in gst_registry_find_plugin (registry=0x7fffbf9ad970 [GstRegistry], name=0x7fffc1f673a2 "flump3dec") at gstregistry.c:828
#5  0x00007fffb4d55209 in gst_plugin_feature_check_version (feature=0x7fffb72a5600 [GstElementFactory], min_major=0, min_minor=10, min_micro=15)
    at gstpluginfeature.c:362
#6  0x00007fffe3ed3389 in mozilla::GStreamerFormatHelper::IsPluginFeatureBlocked(_GstPluginFeature*) (aFeature=0x7fffb72a5600 [GstElementFactory])
    at /home/giles/mozilla/firefox/dom/media/gstreamer/GStreamerFormatHelper.cpp:246
#7  0x00007fffe3ed34e3 in mozilla::FactoryFilter(GstPluginFeature*, gpointer) (aFeature=0x7fffb72a5600 [GstElementFactory])
    at /home/giles/mozilla/firefox/dom/media/gstreamer/GStreamerFormatHelper.cpp:273
#8  0x00007fffb4d5eed8 in gst_registry_feature_filter (registry=0x7fffbf9ad970 [GstRegistry], filter=0x7fffe3ed33f1 <mozilla::FactoryFilter(GstPluginFeature*, gpointer)>, first=0, user_data=0x0) at gstregistry.c:793
#9  0x00007fffe3ed3865 in mozilla::GStreamerFormatHelper::GetFactories() (this=0x7fffb6fad020)
    at /home/giles/mozilla/firefox/dom/media/gstreamer/GStreamerFormatHelper.cpp:366
#10 0x00007fffe3ed360d in mozilla::GStreamerFormatHelper::HaveElementsToProcessCaps(_GstCaps*) (this=0x7fffb6fad020, aCaps=0x7fffc37da6c0)
    at /home/giles/mozilla/firefox/dom/media/gstreamer/GStreamerFormatHelper.cpp:308
#11 0x00007fffe3ed30dc in mozilla::GStreamerFormatHelper::CanHandleMediaType(nsACString_internal const&, nsAString_internal const*) (this=0x7fffb6fad020, aMIMEType=..., aCodecs=0x0)
    at /home/giles/mozilla/firefox/dom/media/gstreamer/GStreamerFormatHelper.cpp:172
#12 0x00007fffe3ed2b50 in mozilla::GStreamerDecoder::CanHandleMediaType(nsACString_internal const&, nsAString_internal const*) (aMIMEType=..., aCodecs=0x0)
    at /home/giles/mozilla/firefox/dom/media/gstreamer/GStreamerDecoder.cpp:24
#13 0x00007fffe3be9b2e in mozilla::IsGStreamerSupportedType(nsACString_internal const&) (aMimeType=...)
    at /home/giles/mozilla/firefox/dom/media/DecoderTraits.cpp:212
Attachment #8674972 - Flags: feedback-
I'll send a patch tomorrow, just needs someone to populate the version list then.
At some point elements are going to be fixed and we don't want to blacklist
them forever.
At some point elements are going to be fixed and we don't want to blacklist
them forever.
Attachment #8675232 - Attachment is obsolete: true
Something like the attached patch should do, someone just needs to update the versions in the table. This is completely untested!
gstreamer is going in bug 1234092
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.