mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
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:
parent
2b5653dd82
commit
3fb28dfc90
1 changed files with 11 additions and 0 deletions
|
@ -1292,10 +1292,21 @@ gst_queue_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
/* We make space available if we're "full" according to whatever
|
/* We make space available if we're "full" according to whatever
|
||||||
* the user defined as "full". */
|
* the user defined as "full". */
|
||||||
while (gst_queue_is_filled (queue)) {
|
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,
|
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue,
|
||||||
"queue is full, waiting for free space");
|
"queue is full, waiting for free space");
|
||||||
/* Wait for space to be available, we could be unlocked because of a flush. */
|
/* Wait for space to be available, we could be unlocked because of a flush. */
|
||||||
GST_QUEUE_WAIT_DEL_CHECK (queue, out_flushing);
|
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 */
|
/* put buffer in queue now */
|
||||||
|
|
Loading…
Reference in a new issue