Commit 7aed4a98 authored by Nicolas Dufresne's avatar Nicolas Dufresne Committed by Nicolas Dufresne
Browse files

v4l2allocator: Add a method to read number of allocated group

parent 972cf809
...@@ -1361,3 +1361,17 @@ gst_v4l2_allocator_reset_group (GstV4l2Allocator * allocator, ...@@ -1361,3 +1361,17 @@ gst_v4l2_allocator_reset_group (GstV4l2Allocator * allocator,
break; 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;
}
...@@ -149,6 +149,8 @@ GstV4l2MemoryGroup* gst_v4l2_allocator_dqbuf (GstV4l2Allocator * alloc ...@@ -149,6 +149,8 @@ GstV4l2MemoryGroup* gst_v4l2_allocator_dqbuf (GstV4l2Allocator * alloc
void gst_v4l2_allocator_reset_group (GstV4l2Allocator * allocator, void gst_v4l2_allocator_reset_group (GstV4l2Allocator * allocator,
GstV4l2MemoryGroup * group); GstV4l2MemoryGroup * group);
gsize gst_v4l2_allocator_num_allocated (GstV4l2Allocator * allocator);
G_END_DECLS G_END_DECLS
#endif /* __GST_V4L2_ALLOCATOR_H__ */ #endif /* __GST_V4L2_ALLOCATOR_H__ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment