gst/playback/gstqueue2.c: Pause the timer to measure the input rate when we block because the queue is filled. See #5...

Original commit message from CVS:
* gst/playback/gstqueue2.c: (gst_queue_chain):
Pause the timer to measure the input rate when we block because the
queue is filled. See #503262.
This commit is contained in:
Wim Taymans 2007-12-14 09:24:55 +00:00
parent ba4bb0fa8c
commit 2da1bb2538
2 changed files with 17 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2007-12-14 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/playback/gstqueue2.c: (gst_queue_chain):
Pause the timer to measure the input rate when we block because the
queue is filled. See #503262.
2007-12-13 Wim Taymans <wim.taymans@collabora.co.uk>
Patch by: Peter Kjellerstedt <pkj at axis com>

View file

@ -1292,10 +1292,21 @@ gst_queue_chain (GstPad * pad, GstBuffer * buffer)
/* We make space available if we're "full" according to whatever
* the user defined as "full". */
while (gst_queue_is_filled (queue)) {
gboolean started;
/* pause the timer while we wait. The fact that we are waiting does not mean
* the byterate on the input pad is lower */
if ((started = queue->timer_started))
g_timer_stop (queue->timer);
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue,
"queue is full, waiting for free space");
/* Wait for space to be available, we could be unlocked because of a flush. */
GST_QUEUE_WAIT_DEL_CHECK (queue, out_flushing);
/* and continue if we were running before */
if (started)
g_timer_continue (queue->timer);
}
/* put buffer in queue now */