Skip to content
Permalink
Browse files
[GStreamer] Block legacy VAAPI plugin
https://bugs.webkit.org/show_bug.cgi?id=240664

Patch by Philippe Normand <philn@igalia.com> on 2022-05-20
Reviewed by Xabier Rodriguez-Calvar.

The VAAPI plugin is not much maintained anymore and prone to rendering issues. In the
mid-term we will leverage the new stateless VA decoders. Disable the legacy plugin,
unless the WEBKIT_GST_ENABLE_LEGACY_VAAPI environment variable is set to 1.

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

Canonical link: https://commits.webkit.org/250795@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
philn authored and webkit-commit-queue committed May 20, 2022
1 parent 04de798 commit 3f7cfbbfbb89e5b653e569a31a3dc1f666d60738
Showing 1 changed file with 10 additions and 0 deletions.
@@ -383,6 +383,16 @@ void registerWebKitGStreamerElements()
gst_plugin_feature_set_rank(GST_PLUGIN_FEATURE_CAST(factory.get()), GST_RANK_NONE);
}
}

// The VAAPI plugin is not much maintained anymore and prone to rendering issues. In the
// mid-term we will leverage the new stateless VA decoders. Disable the legacy plugin,
// unless the WEBKIT_GST_ENABLE_LEGACY_VAAPI environment variable is set to 1.
const char* enableLegacyVAAPIPlugin = getenv("WEBKIT_GST_ENABLE_LEGACY_VAAPI");
if (!enableLegacyVAAPIPlugin || !strcmp(enableLegacyVAAPIPlugin, "0")) {
auto* registry = gst_registry_get();
if (auto vaapiPlugin = adoptGRef(gst_registry_find_plugin(registry, "vaapi")))
gst_registry_remove_plugin(registry, vaapiPlugin.get());
}
});
}

0 comments on commit 3f7cfbb

Please sign in to comment.