mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
v4l2allocator: Add a method to read number of allocated group
This commit is contained in:
parent
972cf80957
commit
7aed4a9806
2 changed files with 16 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -149,6 +149,8 @@ GstV4l2MemoryGroup* gst_v4l2_allocator_dqbuf (GstV4l2Allocator * alloc
|
|||
void gst_v4l2_allocator_reset_group (GstV4l2Allocator * allocator,
|
||||
GstV4l2MemoryGroup * group);
|
||||
|
||||
gsize gst_v4l2_allocator_num_allocated (GstV4l2Allocator * allocator);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_V4L2_ALLOCATOR_H__ */
|
||||
|
|
Loading…
Reference in a new issue