From e2e1d1a158b00c2dd95e08337eaf6f3cda8ee4f0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 30 May 2013 14:48:42 +0200 Subject: [PATCH] videomixer: Add FIXME comment about the DURATION query from adder 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 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gst/videomixer/videomixer2.c b/gst/videomixer/videomixer2.c index a03cf27..78034b3 100644 --- a/gst/videomixer/videomixer2.c +++ b/gst/videomixer/videomixer2.c @@ -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) { -- 2.7.4