Skip to content
Permalink
Browse files
[GStreamer] Disable new demuxers based on adaptivedemux2
https://bugs.webkit.org/show_bug.cgi?id=239701

Patch by Philippe Normand <pnormand@igalia.com> on 2022-04-25
Reviewed by Xabier Rodriguez-Calvar.

The new demuxers based on adaptivedemux2 cannot be used in WebKit yet because this new base
class does not abstract away network access. They can't work in a sandboxed media process,
so demote their rank in order to prevent decodebin3 from auto-plugging them.

* platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::registerWebKitGStreamerElements):

Canonical link: https://commits.webkit.org/249942@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
philn authored and webkit-commit-queue committed Apr 25, 2022
1 parent ef06f57 commit 9b272bcfce5b852f1f34b11cd23a1958f714a0a7
Showing 2 changed files with 25 additions and 0 deletions.
@@ -1,3 +1,17 @@
2022-04-24 Philippe Normand <philn@igalia.com>

[GStreamer] Disable new demuxers based on adaptivedemux2
https://bugs.webkit.org/show_bug.cgi?id=239701

Reviewed by Xabier Rodriguez-Calvar.

The new demuxers based on adaptivedemux2 cannot be used in WebKit yet because this new base
class does not abstract away network access. They can't work in a sandboxed media process,
so demote their rank in order to prevent decodebin3 from auto-plugging them.

* platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::registerWebKitGStreamerElements):

2022-04-24 Youenn Fablet <youenn@apple.com>

TextTrackLoader should use SameOrigin mode by default
@@ -372,6 +372,17 @@ void registerWebKitGStreamerElements()
gst_plugin_feature_set_rank(GST_PLUGIN_FEATURE_CAST(avAACDecoderFactory.get()), GST_RANK_MARGINAL);
}
}

// The new demuxers based on adaptivedemux2 cannot be used in WebKit yet because this new
// base class does not abstract away network access. They can't work in a sandboxed
// media process, so demote their rank in order to prevent decodebin3 from auto-plugging them.
if (webkitGstCheckVersion(1, 21, 0)) {
const char* const elementNames[] = { "dashdemux2", "hlsdemux2", "mssdemux2" };
for (unsigned i = 0; i < G_N_ELEMENTS(elementNames); i++) {
if (auto factory = adoptGRef(gst_element_factory_find(elementNames[i])))
gst_plugin_feature_set_rank(GST_PLUGIN_FEATURE_CAST(factory.get()), GST_RANK_NONE);
}
}
});
}

0 comments on commit 9b272bc

Please sign in to comment.