Commit 26d1a22e authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

aggregator: Add a timeout parameter to ::aggregate()

When this is TRUE, we really have to produce output. This happens
in live mixing mode when we have to output something for the current
time, no matter if we have enough input or not.
parent e3541494
......@@ -1230,7 +1230,7 @@ gst_videoaggregator_get_next_time (GstAggregator * agg)
}
static GstFlowReturn
gst_videoaggregator_aggregate (GstAggregator * agg)
gst_videoaggregator_aggregate (GstAggregator * agg, gboolean timeout)
{
GstFlowReturn ret;
GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (agg);
......@@ -1275,7 +1275,7 @@ gst_videoaggregator_aggregate (GstAggregator * agg)
output_end_time);
}
if (res == GST_FLOW_NEEDS_DATA) {
if (res == GST_FLOW_NEEDS_DATA && !timeout) {
GST_DEBUG_OBJECT (vagg, "Need more data for decisions");
ret = GST_FLOW_OK;
goto done;
......
......@@ -280,6 +280,9 @@ gst_compositor_pad_prepare_frame (GstVideoAggregatorPad * pad,
static GstAllocationParams params = { 0, 15, 0, 0, };
gint width, height;
if (!pad->buffer)
return TRUE;
if (!gst_video_frame_map (frame, &pad->buffer_vinfo, pad->buffer,
GST_MAP_READ)) {
GST_WARNING_OBJECT (vagg, "Could not map input buffer");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment