[libcamera-devel] [PATCH v2 00/17] Support v4l2-compliance
Paul Elder
paul.elder at ideasonboard.com
Fri Jun 19 07:41:06 CEST 2020
This patchset makes the V4L2 compatibility layer comply with
v4l2-compliance, and v4l2-compliance -s. I have gotten zero failues and
2 warnings with a uvcvideo libcamera camera. The two warnings are that
VIDIOC_S_FMT doesn't work from a second fd (after a different fd has
already called it), and that VIDIOC_CREATEBUFS is not supported, which I
think are fair to not support.
Note that there are a couple failues when using a vimc libcamera camera,
as these cameras doesn't support setting frame sizes that are not
multiples of 3.
Also, while trying to comply with v4l2-compliance I lost support for
firefox. I'll look into this. qv4l2 still works, though.
The biggest change in v2 was adding V4L2CameraFile to contain all the
information related to the open file instance, instead of containing
maps for them within V4L2CameraProxy. dup is handled solely in
V4L2CompatManager, by adding another fd -> V4L2CameraFile map. The
V4L2CameraFile recount is handled automatically by V4L2CompatManager
with shared pointers, while V4L2CameraProxy recount is handled manually,
since it is not constructed and deconstructed but rather is open()ed and
close()d.
The other changes are minor in comparison. One is consolidating the null
arg checks in the ioctl handlerrs. Another is splitting all the
v4l2-compliance streaming test fixes to their own patches.
Paul Elder (17):
v4l2: v4l2_camera_file: Add V4L2CameraFile to model the opened camera
file
v4l2: v4l2_compat: Support multiple open
v4l2: v4l2_camera_proxy: Check for null arg values in main ioctl
handler
v4l2: v4l2_camera_proxy: Fix v4l2-compliance support for extended
formats
v4l2: v4l2_camera_proxy: Implement VIDIOC_G/S_PRIORITY
v4l2: v4l2_camera_proxy: Implement VIDIOC_ENUMINPUT, VIDIOC_G/S_INPUT
v4l2: v4l2_camera_proxy: Implement VIDIOC_ENUM_FRAMESIZES
v4l2: v4l2_camera: Add isRunning()
v4l2: v4l2_camera_proxy: Disallow dqbuf when not streaming
v4l2: v4l2_camera_proxy: noop if streamon when stream is already on
v4l2: v4l2_camera_proxy: Reset buffer flags on reqbufs 0
v4l2: v4l2_camera: Don't use libcamera::Semaphore for available
buffers
v4l2: v4l2_camera: Clear pending requests on freeBuffers and streamOff
v4l2: v4l2_camera_proxy: Check arg->index bounds for querybuf, qbuf,
dqbuf
v4l2: v4l2_camera_proxy: Don't allow streamon if no buffers have been
requested
v4l2: v4l2_camera_proxy: Don't allow buffers to be freed if still
mmaped
v4l2: v4l2_camera_proxy: Fix buffer flags related to queueing
src/v4l2/meson.build | 1 +
src/v4l2/v4l2_camera.cpp | 44 +++-
src/v4l2/v4l2_camera.h | 10 +-
src/v4l2/v4l2_camera_file.cpp | 45 ++++
src/v4l2/v4l2_camera_file.h | 35 +++
src/v4l2/v4l2_camera_proxy.cpp | 402 +++++++++++++++++++++++++------
src/v4l2/v4l2_camera_proxy.h | 57 +++--
src/v4l2/v4l2_compat_manager.cpp | 71 +++---
src/v4l2/v4l2_compat_manager.h | 4 +-
9 files changed, 539 insertions(+), 130 deletions(-)
create mode 100644 src/v4l2/v4l2_camera_file.cpp
create mode 100644 src/v4l2/v4l2_camera_file.h
--
2.27.0
More information about the libcamera-devel
mailing list