From 06f6d3c65ce15ee659192dc83b374bd14a5b6928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 17 Dec 2014 19:51:32 +0100 Subject: [PATCH] aggregator: Add function to allow subclasses to set their own latency For audiomixer this is one blocksize, for videoaggregator this should be the duration of one output frame. --- gst/audiomixer/gstaudiomixer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst/audiomixer/gstaudiomixer.c b/gst/audiomixer/gstaudiomixer.c index d04e29ebab..3559750343 100644 --- a/gst/audiomixer/gstaudiomixer.c +++ b/gst/audiomixer/gstaudiomixer.c @@ -1378,6 +1378,9 @@ gst_audiomixer_aggregate (GstAggregator * agg, gboolean timeout) if (audiomixer->send_caps) { gst_aggregator_set_src_caps (agg, audiomixer->current_caps); + gst_aggregator_set_latency (agg, + gst_util_uint64_scale (audiomixer->blocksize, GST_SECOND, + GST_AUDIO_INFO_RATE (&audiomixer->info)), GST_CLOCK_TIME_NONE); if (agg->segment.rate > 0.0) agg->segment.position = agg->segment.start;