mbox series

[v8,0/2] v4l2-compliance: Add tests for REMOVE_BUFS

Message ID 20240221155551.100156-1-benjamin.gaignard@collabora.com
Headers show
Series v4l2-compliance: Add tests for REMOVE_BUFS | expand

Message

Benjamin Gaignard Feb. 21, 2024, 3:55 p.m. UTC
This series add tests for this new field and VIDIOC_REMOVE_BUFS ioctl.

version 8:
- Rename structures, function and variables to use 'remove' instead of
  'delete.

version 7:
- Remove "v4l2-compliance: Test queue maximum buffers allocation"
  patches because they have been merged.
- Remove V4L2_BUF_CAP_SUPPORTS_DELETE_BUFS to be aligned with
  the v18 of the kernel patches
- v4l_queue_querybufs() take care of a range of buffers.

version 6:
- fix compilation issue in "v4l2-compliance: Test queue maximum buffers allocation"

version 5:
- change g_max_buffers() to g_max_num_buffers().
- change v4l_queue_g_max_buffers() to v4l_queue_g_max_num_buffers().
- rename struct v4l_queue max_buffers field to max_num_buffers.
- fix V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS name in bufcap_def array.
- add V4L2_BUF_CAP_SUPPORTS_DELETE_BUFS in bufcap_def array.
- only test MMAP streaming mode.
- rework test code.

Benjamin Gaignard (2):
  v4l2-utils: Add VIDIOC_REMOVE_BUFS ioctl
  v4l2-compliance: Add a test for REMOVE_BUFS ioctl

 include/linux/videodev2.h                   | 16 ++++
 utils/common/cv4l-helpers.h                 |  4 +
 utils/common/v4l-helpers.h                  | 27 ++++--
 utils/v4l2-compliance/v4l2-compliance.cpp   |  1 +
 utils/v4l2-compliance/v4l2-compliance.h     |  1 +
 utils/v4l2-compliance/v4l2-test-buffers.cpp | 99 +++++++++++++++++++++
 6 files changed, 143 insertions(+), 5 deletions(-)