[totem] thumbnailer: blacklist new vaapi plugin names



commit 28bcfde30b7087c39dba3902885798fbdc888444
Author: Lionel Landwerlin <lionel g landwerlin intel com>
Date:   Sun Dec 25 23:02:55 2016 +0100

    thumbnailer: blacklist new vaapi plugin names
    
    It appears the vaapi decode plugin has been split into different
    plugins with names for each supported codecs.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776489

 src/totem-video-thumbnailer.c |   33 ++++++++++++++++++++-------------
 1 files changed, 20 insertions(+), 13 deletions(-)
---
diff --git a/src/totem-video-thumbnailer.c b/src/totem-video-thumbnailer.c
index 97eebcf..6670ab8 100644
--- a/src/totem-video-thumbnailer.c
+++ b/src/totem-video-thumbnailer.c
@@ -392,7 +392,17 @@ thumb_app_setup_play (ThumbApp *app)
        GstElement *play;
        GstElement *audio_sink, *video_sink;
        GstRegistry *registry;
-       GstPluginFeature *feature;
+        const char *blacklisted_plugins[] = {
+          "vaapidecodebin",
+          "vaapidecode",
+          "vaapimpeg2dec",
+          "vaapih264dec",
+          "vaapivc1dec",
+          "vaapivp8dec",
+          "vaapivp9dec",
+          "vaapih265dec"
+        };
+        guint i;
 
        play = gst_element_factory_make ("playbin", "play");
        audio_sink = gst_element_factory_make ("fakesink", "audio-fake-sink");
@@ -412,18 +422,15 @@ thumb_app_setup_play (ThumbApp *app)
         * See: https://bugzilla.gnome.org/show_bug.cgi?id=700186 and
         * https://bugzilla.gnome.org/show_bug.cgi?id=749605 */
        registry = gst_registry_get ();
-       feature = gst_registry_find_feature (registry,
-                                            "vaapidecodebin",
-                                            GST_TYPE_ELEMENT_FACTORY);
-       if (feature)
-               gst_registry_remove_feature (registry, feature);
-
-       feature = gst_registry_find_feature (registry,
-                                            "vaapidecode",
-                                            GST_TYPE_ELEMENT_FACTORY);
-       if (!feature)
-               return;
-       gst_registry_remove_feature (registry, feature);
+
+       for (i = 0; i < G_N_ELEMENTS (blacklisted_plugins); i++) {
+               GstPluginFeature *feature =
+                       gst_registry_find_feature (registry,
+                                                  blacklisted_plugins[i],
+                                                  GST_TYPE_ELEMENT_FACTORY);
+               if (feature)
+                       gst_registry_remove_feature (registry, feature);
+       }
 }
 
 static void


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