projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10f038d
)
queue2: Count the number of buffers in a buffer list for updating the current levels
author
Sebastian Dröge
<sebastian@centricular.com>
Tue, 17 Feb 2015 09:41:50 +0000
(11:41 +0200)
committer
Sebastian Dröge
<sebastian@centricular.com>
Wed, 18 Feb 2015 09:03:08 +0000
(11:03 +0200)
instead of just assuming one buffer.
plugins/elements/gstqueue2.c
patch
|
blob
|
history
diff --git
a/plugins/elements/gstqueue2.c
b/plugins/elements/gstqueue2.c
index
dd862a3
..
19c9ce3
100644
(file)
--- a/
plugins/elements/gstqueue2.c
+++ b/
plugins/elements/gstqueue2.c
@@
-2029,7
+2029,7
@@
gst_queue2_locked_enqueue (GstQueue2 * queue, gpointer item,
/* add buffer to the statistics */
if (QUEUE_IS_USING_QUEUE (queue)) {
- queue->cur_level.buffers
++
;
+ queue->cur_level.buffers
+= gst_buffer_list_length (buffer_list)
;
queue->cur_level.bytes += size;
}
queue->bytes_in += size;
@@
-2222,7
+2222,7
@@
gst_queue2_locked_dequeue (GstQueue2 * queue, GstQueue2ItemType * item_type)
"retrieved buffer list %p from queue", buffer_list);
if (QUEUE_IS_USING_QUEUE (queue)) {
- queue->cur_level.buffers
--
;
+ queue->cur_level.buffers
-= gst_buffer_list_length (buffer_list)
;
queue->cur_level.bytes -= size;
}
queue->bytes_out += size;