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

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

Message

Paul Elder Nov. 27, 2024, 8:50 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.

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 ++++++++++++-
 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/controls.cpp           | 43 +++++++++++++++++++++++++--
 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 +-
 11 files changed, 158 insertions(+), 11 deletions(-)