[totem] thumbnailer: Fix thumbnailer not working when VAAPI is enabled



commit bd2b876f13aa97e9c4faa917b1b2e0a51c2da8ac
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jul 25 16:43:25 2013 +0200

    thumbnailer: Fix thumbnailer not working when VAAPI is enabled
    
    The vaapidecode plugin doesn't like our fake video sink, so disable
    it completely.

 src/totem-video-thumbnailer.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/totem-video-thumbnailer.c b/src/totem-video-thumbnailer.c
index 3a04d45..59f5682 100644
--- a/src/totem-video-thumbnailer.c
+++ b/src/totem-video-thumbnailer.c
@@ -312,6 +312,8 @@ thumb_app_setup_play (ThumbApp *app)
 {
        GstElement *play;
        GstElement *audio_sink, *video_sink;
+       GstRegistry *registry;
+       GstPluginFeature *feature;
 
        play = gst_element_factory_make ("playbin", "play");
        audio_sink = gst_element_factory_make ("fakesink", "audio-fake-sink");
@@ -325,6 +327,17 @@ thumb_app_setup_play (ThumbApp *app)
                      NULL);
 
        app->play = play;
+
+       /* Disable the vaapi plugin as it will not work with the
+        * fakesink we use:
+        * See: https://bugzilla.gnome.org/show_bug.cgi?id=700186 */
+       registry = gst_registry_get ();
+       feature = gst_registry_find_feature (registry,
+                                            "vaapidecode",
+                                            GST_TYPE_ELEMENT_FACTORY);
+       if (!feature)
+               return;
+       gst_registry_remove_feature (registry, feature);
 }
 
 static void


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