mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
multiqueue: Allow growing a queue if all other queues are not linked
See https://bugzilla.gnome.org/show_bug.cgi?id=719893
This commit is contained in:
parent
c80ea6895d
commit
c343ebd454
1 changed files with 14 additions and 6 deletions
|
@ -1900,6 +1900,7 @@ single_queue_overrun_cb (GstDataQueue * dq, GstSingleQueue * sq)
|
|||
GList *tmp;
|
||||
GstDataQueueSize size;
|
||||
gboolean filled = TRUE;
|
||||
gboolean all_not_linked = TRUE;
|
||||
|
||||
gst_data_queue_get_level (sq->queue, &size);
|
||||
|
||||
|
@ -1927,18 +1928,25 @@ single_queue_overrun_cb (GstDataQueue * dq, GstSingleQueue * sq)
|
|||
|
||||
if (oq->srcresult == GST_FLOW_NOT_LINKED) {
|
||||
GST_LOG_OBJECT (mq, "Queue %d is not-linked", oq->id);
|
||||
continue;
|
||||
if (!all_not_linked || tmp->next)
|
||||
continue;
|
||||
} else {
|
||||
all_not_linked = FALSE;
|
||||
GST_LOG_OBJECT (mq, "Checking Queue %d", oq->id);
|
||||
}
|
||||
|
||||
GST_LOG_OBJECT (mq, "Checking Queue %d", oq->id);
|
||||
if (gst_data_queue_is_empty (oq->queue)
|
||||
|| oq->srcresult == GST_FLOW_NOT_LINKED) {
|
||||
if (oq->srcresult == GST_FLOW_NOT_LINKED)
|
||||
GST_LOG_OBJECT (mq, "All other queues are not linked");
|
||||
else
|
||||
GST_LOG_OBJECT (mq, "Queue %d is empty", oq->id);
|
||||
|
||||
if (gst_data_queue_is_empty (oq->queue)) {
|
||||
GST_LOG_OBJECT (mq, "Queue %d is empty", oq->id);
|
||||
if (IS_FILLED (sq, visible, size.visible)) {
|
||||
sq->max_size.visible = size.visible + 1;
|
||||
GST_DEBUG_OBJECT (mq,
|
||||
"Queue %d is empty, bumping single queue %d max visible to %d",
|
||||
oq->id, sq->id, sq->max_size.visible);
|
||||
"Bumping single queue %d max visible to %d",
|
||||
sq->id, sq->max_size.visible);
|
||||
filled = FALSE;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue