[v4,0/4] Add direction field to ControlId
mbox series

Message ID 20241212052438.1547410-1-paul.elder@ideasonboard.com
Headers show
Series
  • Add direction field to ControlId
Related show

Message

Paul Elder Dec. 12, 2024, 5:24 a.m. UTC
This patch series add support for querying the ControlId for the
direction that it can be passed.

This used to only be mentioned in the control id definitions as "This
control can only be returned in metadata" so this codifies it and allows
this information to be queried by applications.

This is an ABI breaking change, so I really want to sneak it in before
the 0.4.0 release that's coming imminently...

Patches 1 and 2 prepare control definitions and parsing, while patch 3
adds the actual support. Patch 4 enables visualization via cam.

The main changes in v2 are that the direction field in controls
definitions yaml files are now required, and the code has been cleaned
up to take advantage of Flags.

v3 expands the v4l2 and local id control serializers so that we can
remove the default bidirectional parameter from ControlId and Control
constructors.

The main change in v4 is the addition of ControlId::direction(), to
simplify serialization/deserialization.

Paul Elder (4):
  libcamera: controls: Populate direction field in control definitions
  utils: codegen: controls.py: Parse direction information
  libcamera: controls: Add support for querying direction information
  apps: cam: Print control direction information

 include/libcamera/controls.h         | 20 +++++++++-
 include/libcamera/ipa/ipa_controls.h |  3 +-
 src/apps/cam/camera_session.cpp      | 10 ++++-
 src/libcamera/control_ids.cpp.in     |  4 +-
 src/libcamera/control_ids_core.yaml  | 44 ++++++++++++++++++++++
 src/libcamera/control_ids_draft.yaml | 15 ++++++++
 src/libcamera/control_ids_rpi.yaml   |  3 ++
 src/libcamera/control_serializer.cpp |  8 +++-
 src/libcamera/controls.cpp           | 56 ++++++++++++++++++++++++++--
 src/libcamera/v4l2_device.cpp        | 10 ++++-
 src/py/libcamera/gen-py-controls.py  |  2 +-
 utils/codegen/controls.py            | 24 +++++++++++-
 utils/codegen/gen-controls.py        |  2 +-
 utils/codegen/gen-gst-controls.py    |  2 +-
 14 files changed, 187 insertions(+), 16 deletions(-)