[totem/gnome-3-4] backend: Make sure dvdreadsrc never gets used
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gnome-3-4] backend: Make sure dvdreadsrc never gets used
- Date: Thu, 12 Jul 2012 17:24:56 +0000 (UTC)
commit 8361297eab8beaa79660b16f8a79fde819608adf
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jul 12 18:11:51 2012 +0100
backend: Make sure dvdreadsrc never gets used
resindvd isn't ported to GStreamer 1.0 yet, and dvdreadsrc is
not something we want users to think is the DVD playback experience
of Totem.
Remove dvdreadsrc from the plugin registry so it's never auto-plugged
when looking for a dvd:// handler.
Conflicts:
src/backend/bacon-video-widget-gst-missing-plugins.c
.../bacon-video-widget-gst-missing-plugins.c | 25 ++++++++++++++++----
1 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/src/backend/bacon-video-widget-gst-missing-plugins.c b/src/backend/bacon-video-widget-gst-missing-plugins.c
index f91c58f..5a63b74 100644
--- a/src/backend/bacon-video-widget-gst-missing-plugins.c
+++ b/src/backend/bacon-video-widget-gst-missing-plugins.c
@@ -338,19 +338,34 @@ bacon_video_widget_gst_missing_plugins_setup (BaconVideoWidget *bvw)
#endif
}
-void
+void
bacon_video_widget_gst_missing_plugins_blacklist (void)
{
- const gchar *blacklisted_elements[] = { "ffdemux_flv" };
+ struct {
+ const char *name;
+ gboolean remove;
+ } blacklisted_elements[] = {
+ { "ffdemux_flv", 0 },
+ { "dvdreadsrc" , 1 }
+ };
+ GstRegistry *registry;
guint i;
+ registry = gst_registry_get_default ();
+
for (i = 0; i < G_N_ELEMENTS (blacklisted_elements); ++i) {
GstPluginFeature *feature;
- feature = gst_default_registry_find_feature (blacklisted_elements[i],
- GST_TYPE_ELEMENT_FACTORY);
+ feature = gst_registry_find_feature (registry,
+ blacklisted_elements[i].name,
+ GST_TYPE_ELEMENT_FACTORY);
+
+ if (!feature)
+ continue;
- if (feature)
+ if (blacklisted_elements[i].remove)
+ gst_registry_remove_feature (registry, feature);
+ else
gst_plugin_feature_set_rank (feature, GST_RANK_NONE);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]