[totem] thumbnailer: Blacklist GStreamer plugins rather than features



commit 5f0f049416df05b17926e45b0d54a30dc943588b
Author: Robert McQueen <rob endlessm com>
Date:   Wed Nov 15 17:23:57 2017 +0000

    thumbnailer: Blacklist GStreamer plugins rather than features
    
    This avoids the need to check multiple entries and changing feature
    names in upstream GStreamer.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=790491

 src/totem-video-thumbnailer.c |   28 ++++++++++------------------
 1 files changed, 10 insertions(+), 18 deletions(-)
---
diff --git a/src/totem-video-thumbnailer.c b/src/totem-video-thumbnailer.c
index 7d20f16..39d2d87 100644
--- a/src/totem-video-thumbnailer.c
+++ b/src/totem-video-thumbnailer.c
@@ -386,18 +386,11 @@ thumb_app_setup_play (ThumbApp *app)
        GstElement *play;
        GstElement *audio_sink, *video_sink;
        GstRegistry *registry;
-        const char *blacklisted_plugins[] = {
-          "vaapidecodebin",
-          "vaapidecode",
-          "vaapimpeg2dec",
-          "vaapih264dec",
-          "vaapivc1dec",
-          "vaapivp8dec",
-          "vaapivp9dec",
-          "vaapih265dec",
-          "bmcdec"
-        };
-        guint i;
+       const char *blacklisted_plugins[] = {
+         "bmcdec",
+         "vaapi"
+       };
+       guint i;
 
        play = gst_element_factory_make ("playbin", "play");
        audio_sink = gst_element_factory_make ("fakesink", "audio-fake-sink");
@@ -419,12 +412,11 @@ thumb_app_setup_play (ThumbApp *app)
        registry = gst_registry_get ();
 
        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);
+               GstPlugin *plugin =
+                       gst_registry_find_plugin (registry,
+                                                 blacklisted_plugins[i]);
+               if (plugin)
+                       gst_registry_remove_plugin (registry, plugin);
        }
 }
 


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