From cf90f534f1aaeed433192d35c05e95b7e0916d1c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 16 Dec 2014 17:37:12 +0100 Subject: [PATCH] audiomixer: Implement get_next_time() --- gst/audiomixer/gstaudiomixer.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gst/audiomixer/gstaudiomixer.c b/gst/audiomixer/gstaudiomixer.c index 2c56d7e..9cac2d7 100644 --- a/gst/audiomixer/gstaudiomixer.c +++ b/gst/audiomixer/gstaudiomixer.c @@ -235,6 +235,15 @@ gst_audiomixer_do_clip (GstAggregator * agg, GstAggregatorPad * bpad, GstBuffer * buffer, GstBuffer ** outbuf); static GstFlowReturn gst_audiomixer_aggregate (GstAggregator * agg); +static GstClockTime +gst_audiomixer_get_next_time (GstAggregator * agg) +{ + if (agg->segment.position == -1) + return agg->segment.start; + else + return agg->segment.position; +} + /* we can only accept caps that we and downstream can handle. * if we have filtercaps set, use those to constrain the target caps. */ @@ -815,6 +824,8 @@ gst_audiomixer_class_init (GstAudioMixerClass * klass) agg_class->start = gst_audiomixer_start; agg_class->stop = gst_audiomixer_stop; + agg_class->get_next_time = gst_audiomixer_get_next_time; + agg_class->sink_query = GST_DEBUG_FUNCPTR (gst_audiomixer_sink_query); agg_class->sink_event = GST_DEBUG_FUNCPTR (gst_audiomixer_sink_event); -- 2.7.4