[libcamera-devel] [RFC PATCH v2 0/9] Libcamera Controls

Kieran Bingham kieran.bingham at ideasonboard.com
Fri Jun 21 18:13:52 CEST 2019


V2 of LibCamera controls, now with extracted Value class and a long list of
undocumented todos.

This series is based upon Jacopo's v5 of V4L2Controls.

 - ControlValue class is now in it's own reusable Value class.
   This should be re-usable somewhat like a QT QVariant ...

 - ControlList
   Controls are now simply an association of a ControlInfo (or ID) and a Value.
   The ControlList is a custom wrapper of an unordered_map to pass these around.


Known todos / issues:
 - I still need to look at querying ControlInfo attributes

 - Currently I think a ControlInfo structure is created everytime an entry is
   added to the ControlList, and this likely isn't as efficient as I'd like
 - Min/Max values in ControlInfo are currently unset and un-used - but that
   should change.

 - I feel like it would be nice to have a better representation of a single
   control, rather than just a ControlInfo,Value pair. I have a custom Control
   class to experiment with but that is not utilsed by this series.
   I'm not sure how I'd change the iterators to use this anyway yet.

 - This series does not aim to represent MetaData as such yet. That might be
   similar and might be possible to use a 'ControlList' but it's not clear yet.

 - As yet there is not a facility to obtain a list of all controls from the
   V4L2 layer, and as such I have not yet implemented any means of finding
   a complete set of controls aavilable to a particular Camera.

 
 
Kieran Bingham (9):
  libcamera: Value: Provide abstract value class
  libcamera: test: Add Value tests
  libcamera: controls: Introduce Control structures
  libcamera: test: Add ControlInfo tests
  libcamera: Implement a ControlList
  libcamera: request: Add a ControlList
  libcamera: test: Add ControlList tests
  [PoC] UVCPipelineHandler: Set Controls
  [PoC] QCam: Control demo: A SineWave Brightness

 include/libcamera/controls.h        |  99 ++++++++++
 include/libcamera/meson.build       |   2 +
 include/libcamera/request.h         |   3 +
 include/libcamera/value.h           |  63 ++++++
 src/libcamera/controls.cpp          | 288 ++++++++++++++++++++++++++++
 src/libcamera/meson.build           |   2 +
 src/libcamera/pipeline/uvcvideo.cpp |  43 ++++-
 src/libcamera/request.cpp           |  10 +
 src/libcamera/value.cpp             | 226 ++++++++++++++++++++++
 src/qcam/main_window.cpp            |  16 ++
 test/controls.cpp                   | 139 ++++++++++++++
 test/meson.build                    |   2 +
 test/value.cpp                      |  82 ++++++++
 13 files changed, 974 insertions(+), 1 deletion(-)
 create mode 100644 include/libcamera/controls.h
 create mode 100644 include/libcamera/value.h
 create mode 100644 src/libcamera/controls.cpp
 create mode 100644 src/libcamera/value.cpp
 create mode 100644 test/controls.cpp
 create mode 100644 test/value.cpp

-- 
2.20.1



More information about the libcamera-devel mailing list