[libcamera-devel] [PATCH 0/9] Use ControlList for both libcamera and V4L2 controls
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Oct 8 00:46:33 CEST 2019
Hello,
This patch series generalises usage of ControlList for all controls,
both libcamera and V4L2.
The rationale is that using a single container to store controls allows
better sharing of code, especially when we will implement serialisation
and deserialisation. Additionally, a single container type will simplify
the IPA API.
Patch 1/9 restores the global list of libcamera controls that used to be
auto-generated. It isn't strictly required by the rest of the series,
but has been developed with it, so I've included it.
Patches 2/9 to 4/9 then extend ControlList and ControlId with features
required for V4L2 controls. Patch 5/9 is a drive-by optimisation, and is
followed by patch 6/9 that adds a V4L2ControlId class specialising
ControlId. Patch 7/9 is the bulk of the work, and patch 8/9 is a
follow-up cleanup.
Patch 9/9 adds a V4L2 controls validator that has been developed with
the series but isn't strictly required either. We can thus leave it out
for now if desired until we have a use case.
Laurent Pinchart (9):
libcamera: control_ids: Generate map of all supported controls
libcamera: controls: Support getting and setting controls by ControlId
libcamera: controls: Store control name in ControlId
libcamera: controls: Make ControlList::find() protected
libcamera: v4l2_device: Avoid copy of V4L2ControlInfo
libcamera: v4l2_controls: Add V4L2ControlId
libcamera: v4l2_device: Replace V4L2ControlList with ControlList
libcamera: v4l2_controls: Remove V4L2ControlInfo type field
libcamera: v4l2_controls: Add control validator
include/libcamera/control_ids.h.in | 3 +
include/libcamera/controls.h | 12 +-
src/libcamera/camera_sensor.cpp | 4 +-
src/libcamera/control_ids.cpp.in | 7 +
src/libcamera/controls.cpp | 62 ++++-
src/libcamera/gen-controls.py | 7 +-
src/libcamera/include/camera_sensor.h | 5 +-
src/libcamera/include/v4l2_controls.h | 55 ++---
src/libcamera/include/v4l2_device.h | 8 +-
src/libcamera/pipeline/ipu3/ipu3.cpp | 9 +-
src/libcamera/pipeline/uvcvideo.cpp | 24 +-
src/libcamera/pipeline/vimc.cpp | 25 +-
src/libcamera/v4l2_controls.cpp | 323 ++++++++++++--------------
src/libcamera/v4l2_device.cpp | 67 +++---
14 files changed, 326 insertions(+), 285 deletions(-)
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list