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.
This commit is contained in:
Sebastian Dröge 2013-05-30 14:48:42 +02:00
parent 5223868caa
commit e2e1d1a158

View 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)
{