tracker r3168 - in trunk: . src/tracker-extract



Author: mottela
Date: Fri Apr  3 12:38:50 2009
New Revision: 3168
URL: http://svn.gnome.org/viewvc/tracker?rev=3168&view=rev

Log:
Watch for DURATION messages in the bus to stop extraction, plugged a leak

Modified:
   trunk/ChangeLog
   trunk/src/tracker-extract/tracker-extract-gstreamer.c

Modified: trunk/src/tracker-extract/tracker-extract-gstreamer.c
==============================================================================
--- trunk/src/tracker-extract/tracker-extract-gstreamer.c	(original)
+++ trunk/src/tracker-extract/tracker-extract-gstreamer.c	Fri Apr  3 12:38:50 2009
@@ -370,7 +370,7 @@
 	fsink = gst_element_factory_make ("fakesink", NULL);
 	
 	g_value_init (&val, G_TYPE_INT);
-	g_value_set_int (&val, 15);
+	g_value_set_int (&val, 50);
 
 	g_object_set_property (G_OBJECT (fsink), "preroll-queue-len", &val);
 
@@ -616,6 +616,12 @@
 				}
 			}
 		}
+		break;
+	case GST_MESSAGE_DURATION:
+		/* The reasoning here is that if we already got duration we should have also
+		   all the other data we need since getting the duration should take the longest */
+		stop = TRUE;
+		break;
         default:
 		break;
 	}
@@ -759,6 +765,15 @@
 
 	gst_element_set_state (extractor->pipeline, GST_STATE_NULL);
 	gst_object_unref (extractor->bus);
+
+	if (extractor->audiotags) {
+		gst_tag_list_free (extractor->audiotags);
+	}
+
+	if (extractor->videotags) {
+		gst_tag_list_free (extractor->videotags);
+	}
+
 	gst_object_unref (GST_OBJECT (extractor->pipeline));
 	g_main_loop_unref (extractor->loop);
 	g_slice_free (MetadataExtractor, extractor);



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