[libcamera-devel,v6,0/5] generate and use fixed-sized Span Control types
mbox series

Message ID 20220603220712.73673-1-Rauch.Christian@gmx.de
Headers show
Series
  • generate and use fixed-sized Span Control types
Related show

Message

Christian Rauch June 3, 2022, 10:07 p.m. UTC
Hello,

Thanks for all the feedback. This revision 1) fixes the "gen-controls.py" script for Python versions below 3.8 (e.g. for the Chrome OS SDK) and it 2) simplifies the optional value handling. Specifically, wherever a value was explicitly checked with "contains", I am now dereferencing the optional value directly (*prop.get()) without using "value()", which might throw an exception, and without the fallback "value_or(<default>)".

I am also attaching a minor patch to fix a whitespace error that was not discovered by the checker.

Best,

Christian Rauch (5):
  libcamera: controls: Use std::optional to handle invalid control
    values
  fix whitespace for indentation (replace spaces with tab)
  libcamera: controls: Define size of array controls as a shape vector
  libcamera: controls: Generate fixed- and variable-sized Span Controls
  libcamera: controls: Apply explicit fixed-sized Span type casts

 include/libcamera/controls.h                  |  7 ++--
 src/android/camera_capabilities.cpp           |  8 ++---
 src/android/camera_device.cpp                 | 21 ++++++------
 src/android/camera_hal_manager.cpp            |  2 +-
 src/cam/main.cpp                              |  4 +--
 src/ipa/raspberrypi/raspberrypi.cpp           | 21 ++++++------
 src/libcamera/control_ids.yaml                |  4 +--
 src/libcamera/pipeline/ipu3/ipu3.cpp          | 11 +++----
 .../pipeline/raspberrypi/raspberrypi.cpp      |  9 +++---
 src/libcamera/property_ids.yaml               |  4 +--
 src/qcam/dng_writer.cpp                       | 15 +++++----
 utils/gen-controls.py                         | 32 +++++++++++++------
 12 files changed, 77 insertions(+), 61 deletions(-)

--
2.34.1