diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2014-05-05 12:06:44 -0400 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2014-05-08 15:56:37 -0400 |
commit | 7aed4a98061478aa2a75b8ab5630ac693ef3ce80 (patch) | |
tree | 3f88ef6e09e5ea01265d9ad3693cafd4cf5cc772 /sys/v4l2/gstv4l2allocator.c | |
parent | 972cf80957ebbc724d843f18f2f52e7756314600 (diff) | |
download | gstreamer-plugins-good-7aed4a98061478aa2a75b8ab5630ac693ef3ce80.tar.gz |
v4l2allocator: Add a method to read number of allocated group
Diffstat (limited to 'sys/v4l2/gstv4l2allocator.c')
-rw-r--r-- | sys/v4l2/gstv4l2allocator.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/v4l2/gstv4l2allocator.c b/sys/v4l2/gstv4l2allocator.c index 2057b17dd..6f1487166 100644 --- a/sys/v4l2/gstv4l2allocator.c +++ b/sys/v4l2/gstv4l2allocator.c @@ -1361,3 +1361,17 @@ gst_v4l2_allocator_reset_group (GstV4l2Allocator * allocator, break; } } + +gsize +gst_v4l2_allocator_num_allocated (GstV4l2Allocator * allocator) +{ + gsize num_allocated; + + GST_OBJECT_LOCK (allocator); + + num_allocated = allocator->count; + + GST_OBJECT_UNLOCK (allocator); + + return num_allocated; +} |