[tracker/gstreamer-with-dlna-0.10] tracker-extract, gstreamer: if possible, use Tagreadbin backend in the Discoverer



commit 146c3641d92917a5fa4235f3d2c206385286da1e
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Tue Sep 6 10:45:09 2011 +0200

    tracker-extract,gstreamer: if possible, use Tagreadbin backend in the Discoverer
    
    By default, the GUPnP-DLNA and GStreamer discoverers use Decodebin2 backend to
    read tags. But, if Tagreadbin is available, we should really use it instead.
    
    See:
     https://bugzilla.gnome.org/show_bug.cgi?id=564749
     https://bugzilla.gnome.org/show_bug.cgi?id=656345

 src/tracker-extract/tracker-extract-gstreamer.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 9eb5c48..c598903 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -940,6 +940,16 @@ discoverer_init_and_run (MetadataExtractor *extractor,
 #if defined(GSTREAMER_BACKEND_GUPNP_DLNA)
 	extractor->discoverer = gupnp_dlna_discoverer_new (5 * GST_SECOND, TRUE, FALSE);
 
+#if defined(GST_TYPE_DISCOVERER_FLAGS)
+	/* Tell the discoverer to use *only* Tagreadbin backend.
+	 *  See https://bugzilla.gnome.org/show_bug.cgi?id=656345
+	 */
+	g_debug ("Using Tagreadbin backend in the GUPnP-DLNA discoverer...");
+	g_object_set (extractor->discoverer,
+	              "flags", GST_DISCOVERER_FLAGS_EXTRACT_TAGS,
+	              NULL);
+#endif
+
 	/* Uri is const, the API should be const, but it isn't and it
 	 * calls gst_discoverer_discover_uri()
 	 */
@@ -971,6 +981,16 @@ discoverer_init_and_run (MetadataExtractor *extractor,
 		return FALSE;
 	}
 
+#if defined(GST_TYPE_DISCOVERER_FLAGS)
+	/* Tell the discoverer to use *only* Tagreadbin backend.
+	 *  See https://bugzilla.gnome.org/show_bug.cgi?id=656345
+	 */
+	g_debug ("Using Tagreadbin backend in the GStreamer discoverer...");
+	g_object_set (extractor->discoverer,
+	              "flags", GST_DISCOVERER_FLAGS_EXTRACT_TAGS,
+	              NULL);
+#endif
+
 	info = gst_discoverer_discover_uri (extractor->discoverer,
 	                                    uri,
 	                                    &error);



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