From 07991ae4abeab42ed3ddec64df7d946b45bb701e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 22 Oct 2009 14:07:31 -0400 Subject: [PATCH] multiqueue: don't check visible items in buffering In buffering mode we want to ignore the max visible items to decide when the queue is filled. Instead, we only look at the number of bytes and/or time in the queue. --- plugins/elements/gstmultiqueue.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index 656b0357fd..88325ea512 100644 --- a/plugins/elements/gstmultiqueue.c +++ b/plugins/elements/gstmultiqueue.c @@ -1499,17 +1499,19 @@ single_queue_check_full (GstDataQueue * dataq, guint visible, guint bytes, guint64 time, GstSingleQueue * sq) { gboolean res; + GstMultiQueue *mq = sq->mqueue; - GST_DEBUG ("queue %d: visible %u/%u, bytes %u/%u, time %" G_GUINT64_FORMAT - "/%" G_GUINT64_FORMAT, sq->id, visible, sq->max_size.visible, bytes, + GST_DEBUG_OBJECT (mq, + "queue %d: visible %u/%u, bytes %u/%u, time %" G_GUINT64_FORMAT "/%" + G_GUINT64_FORMAT, sq->id, visible, sq->max_size.visible, bytes, sq->max_size.bytes, sq->cur_time, sq->max_size.time); /* we are always filled on EOS */ if (sq->is_eos) return TRUE; - /* we never go past the max visible items */ - if (IS_FILLED (sq, visible, visible)) + /* we never go past the max visible items unless we are in buffering mode */ + if (!mq->use_buffering && IS_FILLED (sq, visible, visible)) return TRUE; /* check time or bytes */