Title: [294636] releases/WebKitGTK/webkit-2.36/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
Revision
294636
Author
[email protected]
Date
2022-05-23 06:24:03 -0700 (Mon, 23 May 2022)

Log Message

Merge r294540 - [GStreamer] Block legacy VAAPI plugin
https://bugs.webkit.org/show_bug.cgi?id=240664

Patch by Philippe Normand <[email protected]> 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

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.36/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp (294635 => 294636)


--- releases/WebKitGTK/webkit-2.36/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp	2022-05-23 13:23:56 UTC (rev 294635)
+++ releases/WebKitGTK/webkit-2.36/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp	2022-05-23 13:24:03 UTC (rev 294636)
@@ -367,6 +367,16 @@
                     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());
+        }
     });
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to