videomixer: Add FIXME comment about the DURATION query from adder
authorSebastian Dröge <slomo@circular-chaos.org>
Thu, 30 May 2013 12:48:42 +0000 (14:48 +0200)
committerSebastian Dröge <slomo@circular-chaos.org>
Thu, 30 May 2013 21:56:38 +0000 (23:56 +0200)
Currently the code just takes with maximum upstream duration, which
is wrong. It should be the maximum upstream duration in running time.

gst/videomixer/videomixer2.c

index a03cf27..78034b3 100644 (file)
@@ -1119,6 +1119,22 @@ gst_videomixer2_query_caps (GstPad * pad, GstObject * parent, GstQuery * query)
   return TRUE;
 }
 
+/* FIXME, the duration query should reflect how long you will produce
+ * data, that is the amount of stream time until you will emit EOS.
+ *
+ * For synchronized mixing this is always the max of all the durations
+ * of upstream since we emit EOS when all of them finished.
+ *
+ * We don't do synchronized mixing so this really depends on where the
+ * streams where punched in and what their relative offsets are against
+ * eachother which we can get from the first timestamps we see.
+ *
+ * When we add a new stream (or remove a stream) the duration might
+ * also become invalid again and we need to post a new DURATION
+ * message to notify this fact to the parent.
+ * For now we take the max of all the upstream elements so the simple
+ * cases work at least somewhat.
+ */
 static gboolean
 gst_videomixer2_query_duration (GstVideoMixer2 * mix, GstQuery * query)
 {