[totem/wip/hadess/ignore-vcds: 18/19] main: Ignore VCDs



commit e27facc4c8e333a7c94da046cbf987f5dfacf720
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Feb 18 16:20:36 2019 +0100

    main: Ignore VCDs
    
    They're not supported in GStreamer:
    https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/203
    
    Note that this will only work with a new enough grilo-plugins, but will
    not throw errors with older ones.

 src/totem-grilo.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/totem-grilo.c b/src/totem-grilo.c
index 6456d28dc..b6aa50d2f 100644
--- a/src/totem-grilo.c
+++ b/src/totem-grilo.c
@@ -1426,6 +1426,7 @@ load_grilo_plugins (TotemGrilo *self)
        GError *error = NULL;
        GSettings *settings;
        char **configs;
+       GrlConfig *config;
        guint i;
        const char *required_plugins[] = {
                "grl-lua-factory",
@@ -1442,7 +1443,6 @@ load_grilo_plugins (TotemGrilo *self)
        g_object_unref (settings);
 
        for (i = 0; configs[i] != NULL; i++) {
-               GrlConfig *config;
 
                config = grl_config_new ("grl-filesystem", NULL);
                grl_config_set_string (config, "base-uri", configs[i]);
@@ -1451,6 +1451,12 @@ load_grilo_plugins (TotemGrilo *self)
        }
        g_strfreev (configs);
 
+       /* GStreamer does not support VCDs:
+        * https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/203 */
+       config = grl_config_new ("grl-optical-media", NULL);
+       grl_config_set_string (config, "ignored-scheme", "vcd");
+       grl_registry_add_config (registry, config, NULL);
+
        g_signal_connect (registry, "source-added",
                          G_CALLBACK (source_added_cb), self);
        g_signal_connect (registry, "source-removed",


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