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.
This commit is contained in:
Sebastian Dröge 2014-12-17 19:51:32 +01:00
parent 46f713c598
commit 06f6d3c65c

View file

@ -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;