From 45bed69a604ab97445cb3b5e6eff91c630d50370 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 28 Jun 2007 11:25:17 +0000 Subject: [PATCH] plugins/elements/gstmultiqueue.c: When figuring out when a queue is filled, use our internal time estimate based on s... Original commit message from CVS: * plugins/elements/gstmultiqueue.c: (apply_buffer), (single_queue_overrun_cb): When figuring out when a queue is filled, use our internal time estimate based on segments, just like check_full does. --- ChangeLog | 7 +++++++ plugins/elements/gstmultiqueue.c | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 586b6e1..d29a8b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-06-28 Wim Taymans + + * plugins/elements/gstmultiqueue.c: (apply_buffer), + (single_queue_overrun_cb): + When figuring out when a queue is filled, use our internal time estimate + based on segments, just like check_full does. + 2007-06-27 Stefan Kost * gst/gstminiobject.c: (gst_mini_object_get_type): diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index f795f96..9c43b23 100644 --- a/plugins/elements/gstmultiqueue.c +++ b/plugins/elements/gstmultiqueue.c @@ -1126,7 +1126,10 @@ single_queue_overrun_cb (GstDataQueue * dq, GstSingleQueue * sq) GstSingleQueue *ssq = (GstSingleQueue *) tmp->data; GstDataQueueSize ssize; + GST_LOG_OBJECT (mq, "Checking Queue %d", ssq->id); + if (gst_data_queue_is_empty (ssq->queue)) { + GST_LOG_OBJECT (mq, "Queue %d is empty", ssq->id); if (IS_FILLED (visible, size.visible)) { sq->max_size.visible++; GST_DEBUG_OBJECT (mq, @@ -1139,8 +1142,14 @@ single_queue_overrun_cb (GstDataQueue * dq, GstSingleQueue * sq) /* check if we reached the hard time/bytes limits */ gst_data_queue_get_level (ssq->queue, &ssize); + GST_DEBUG_OBJECT (mq, + "queue %d: visible %u/%u, bytes %u/%u, time %" G_GUINT64_FORMAT "/%" + G_GUINT64_FORMAT, ssq->id, ssize.visible, sq->max_size.visible, + ssize.bytes, sq->max_size.bytes, sq->cur_time, sq->max_size.time); + /* if this queue is filled completely we must signal overrun */ - if (IS_FILLED (bytes, ssize.bytes) || IS_FILLED (time, ssize.time)) { + if (IS_FILLED (bytes, ssize.bytes) || IS_FILLED (time, sq->cur_time)) { + GST_LOG_OBJECT (mq, "Queue %d is filled", ssq->id); filled = TRUE; } } -- 2.7.4