libcamera: fix compilation errors for libcamera v0.5.0 (#169)

* libcamera: add support for ControlTypePoint

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* libcamera: fix compile error on missing ControlType

This adds a runtime error for missing ControlTypes to fix compilation errors if there are new ControlTypes that are not implemented yet.

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* chore: remove whitespaces

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* libcamera: only use ControlTypePoint for libcamera>=0.3.2

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* fix: add version check to second switch case

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* fix: add version check to libcamera_parse_point

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* Add AeState to stable LIBCAMERA_CONTROL block

Moved AeState from the draft control list to the stable control block for better alignment with finalized controls.

* fix: fix backwards compatibility

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

---------

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>
Co-authored-by: Surion79 <102791900+Surion79@users.noreply.github.com>
This commit is contained in:
Patrick Gehrsitz 2025-06-08 17:34:59 +02:00 committed by GitHub
parent 68de1189df
commit 4e466057e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,10 +50,14 @@ static std::map<unsigned, libcamera_control_id_t> libcamera_control_ids =
LIBCAMERA_CONTROL(AfSpeed, "AfSpeed"),
LIBCAMERA_CONTROL(AfTrigger, "AfTrigger"),
LIBCAMERA_CONTROL(AfState, "AfState"),
#if LIBCAMERA_VERSION_MAJOR == 0 && LIBCAMERA_VERSION_MINOR >= 5 // Support for older libcamera versions
LIBCAMERA_CONTROL(AeState, "AeState"),
#else
LIBCAMERA_DRAFT_CONTROL(AeState),
#endif
LIBCAMERA_DRAFT_CONTROL(AePrecaptureTrigger),
LIBCAMERA_DRAFT_CONTROL(NoiseReductionMode),
LIBCAMERA_DRAFT_CONTROL(ColorCorrectionAberrationMode),
LIBCAMERA_DRAFT_CONTROL(AeState),
LIBCAMERA_DRAFT_CONTROL(AwbState),
LIBCAMERA_DRAFT_CONTROL(LensShadingMapMode),
#if LIBCAMERA_VERSION_MAJOR == 0 && LIBCAMERA_VERSION_MINOR < 1 // Support RasPI bullseye