[PATCH v1 0/2] libcamera: controls: String controls as `std::string_view`

Barnabás Pőcze barnabas.pocze at ideasonboard.com
Tue Apr 22 14:47:49 CEST 2025


This change brings string controls in line with other controls in that
no non-trivial copies will be made when a value is retrieved from a
`ControlValue` instance.

https://bugs.libcamera.org/show_bug.cgi?id=256

Barnabás Pőcze (2):
  apps: cam: capture_script: Disallow arrays of strings
  libcamera: controls: Expose string controls as `std::string_view`

 include/libcamera/control_ids.h.in  |  1 +
 include/libcamera/controls.h        | 15 ++++++++-------
 src/apps/cam/capture_script.cpp     |  6 +-----
 src/apps/cam/main.cpp               |  2 +-
 src/apps/common/dng_writer.cpp      |  2 +-
 src/apps/qcam/cam_select_dialog.cpp |  6 +++---
 src/py/libcamera/py_helpers.cpp     |  4 ++--
 test/controls/control_value.cpp     |  4 ++--
 utils/codegen/controls.py           |  2 +-
 9 files changed, 20 insertions(+), 22 deletions(-)

--
2.49.0


More information about the libcamera-devel mailing list