mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-13 10:55:34 +00:00
videoaggregator: support unresponsive pads
Render unresponsive pads with the last video frame received.
This commit is contained in:
parent
1e84482f36
commit
9aa89185ed
1 changed files with 7 additions and 3 deletions
|
@ -824,6 +824,8 @@ gst_videoaggregator_fill_queues (GstVideoAggregator * vagg,
|
|||
bpad = GST_AGGREGATOR_PAD (pad);
|
||||
segment = &bpad->segment;
|
||||
is_eos = bpad->eos;
|
||||
if (!is_eos)
|
||||
eos = FALSE;
|
||||
buf = gst_aggregator_pad_get_buffer (bpad);
|
||||
if (buf) {
|
||||
GstClockTime start_time, end_time;
|
||||
|
@ -897,7 +899,8 @@ gst_videoaggregator_fill_queues (GstVideoAggregator * vagg,
|
|||
end_time *= ABS (agg->segment.rate);
|
||||
}
|
||||
|
||||
if (pad->end_time != -1 && pad->end_time > end_time) {
|
||||
if (pad->end_time != -1 && pad->end_time > end_time
|
||||
&& !bpad->unresponsive) {
|
||||
GST_DEBUG_OBJECT (pad, "Buffer from the past, dropping");
|
||||
gst_buffer_unref (buf);
|
||||
buf = gst_aggregator_pad_steal_buffer (bpad);
|
||||
|
@ -939,9 +942,8 @@ gst_videoaggregator_fill_queues (GstVideoAggregator * vagg,
|
|||
continue;
|
||||
}
|
||||
} else {
|
||||
if (pad->end_time != -1) {
|
||||
if (!bpad->unresponsive && pad->end_time != -1) {
|
||||
if (pad->end_time <= output_start_time) {
|
||||
gst_buffer_replace (&pad->buffer, NULL);
|
||||
pad->start_time = pad->end_time = -1;
|
||||
if (is_eos) {
|
||||
GST_DEBUG ("I just need more data");
|
||||
|
@ -950,6 +952,8 @@ gst_videoaggregator_fill_queues (GstVideoAggregator * vagg,
|
|||
} else if (is_eos) {
|
||||
eos = FALSE;
|
||||
}
|
||||
} else if (is_eos) {
|
||||
gst_buffer_replace (&pad->buffer, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue