mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
audiomixer: Implement get_next_time()
This commit is contained in:
parent
852b08340e
commit
2764f2baf1
1 changed files with 11 additions and 0 deletions
|
@ -235,6 +235,15 @@ gst_audiomixer_do_clip (GstAggregator * agg,
|
||||||
GstAggregatorPad * bpad, GstBuffer * buffer, GstBuffer ** outbuf);
|
GstAggregatorPad * bpad, GstBuffer * buffer, GstBuffer ** outbuf);
|
||||||
static GstFlowReturn gst_audiomixer_aggregate (GstAggregator * agg);
|
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.
|
/* we can only accept caps that we and downstream can handle.
|
||||||
* if we have filtercaps set, use those to constrain the target caps.
|
* 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->start = gst_audiomixer_start;
|
||||||
agg_class->stop = gst_audiomixer_stop;
|
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_query = GST_DEBUG_FUNCPTR (gst_audiomixer_sink_query);
|
||||||
agg_class->sink_event = GST_DEBUG_FUNCPTR (gst_audiomixer_sink_event);
|
agg_class->sink_event = GST_DEBUG_FUNCPTR (gst_audiomixer_sink_event);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue