[totem/wip/hadess/disable-vaapi: 2/2] backend: Disable vaapi at the root



commit 6d40eb68dbc62ea2d19bf533e557218983028c48
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jul 23 17:46:33 2019 +0200

    backend: Disable vaapi at the root
    
    Changes in gst-vaapi, vaapi, and the vaapi driver, combined with
    clutter-gst's bad integration with those means that things regularly
    break, and totem isn't able to display anything properly.
    
    Until we switch the display sink away from clutter-gst and clutter-gtk
    we need to disable vaapi to get anything on screen.
    
    Fixes:
    Shader compilation failed:
    0:91(21): warning: `cogl_layer0' used uninitialized
    0:104(21): warning: `cogl_layer1' used uninitialized
    0:117(21): warning: `cogl_layer2' used uninitialized
    0:128(16): error: no function with name 'clutter_gst_sample_video3'
    Failed to link GLSL program:
    error: linking with uncompiled/unspecialized shader

 src/backend/bacon-video-widget.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 89674a9e8..45c4d0e66 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -1050,12 +1050,26 @@ bvw_boolean_handled_accumulator (GSignalInvocationHint * ihint,
   return continue_emission;
 }
 
+static void
+disable_vaapi (void)
+{
+  GstRegistry *registry;
+  GstPlugin *plugin;
+
+  registry = gst_registry_get ();
+  plugin = gst_registry_find_plugin (registry, "vaapi");
+  if (!plugin)
+    return;
+  gst_registry_remove_plugin (registry, plugin);
+}
+
 static void
 bacon_video_widget_class_init (BaconVideoWidgetClass * klass)
 {
   GObjectClass *object_class;
   GtkWidgetClass *widget_class;
 
+  disable_vaapi ();
   clutter_gst_init (NULL, NULL);
 
   object_class = (GObjectClass *) klass;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]