[libcamera-devel] [RFC PATCH v3 09/16] android: Plumb AeLock control
Paul Elder
paul.elder at ideasonboard.com
Fri Jul 2 12:37:53 CEST 2021
Plumb the AeLock control into the HAL for
CONTROL_AE_LOCK_AVAILABLE_MODES for static metadata.
Bug: https://bugs.libcamera.org/show_bug.cgi?id=43
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
Changes in v3:
- use new setMetadata
- rebase on camera capabilities refactor
TODO: plumb result metadata
---
src/android/camera_capabilities.cpp | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
index 21ba791a..5896d61d 100644
--- a/src/android/camera_capabilities.cpp
+++ b/src/android/camera_capabilities.cpp
@@ -686,9 +686,17 @@ int CameraCapabilities::initializeStaticMetadata()
staticMetadata_->addEntry(ANDROID_CONTROL_SCENE_MODE_OVERRIDES,
sceneModesOverride);
- uint8_t aeLockAvailable = ANDROID_CONTROL_AE_LOCK_AVAILABLE_FALSE;
- staticMetadata_->addEntry(ANDROID_CONTROL_AE_LOCK_AVAILABLE,
- aeLockAvailable);
+ uint8_t aeLockAvailable = setMetadata<uint8_t, bool>(
+ staticMetadata_.get(),
+ ANDROID_CONTROL_AE_LOCK_AVAILABLE,
+ controlsInfo, &controls::AeLock,
+ ControlRange::Max,
+ (uint8_t)ANDROID_CONTROL_AE_LOCK_AVAILABLE_FALSE);
+ if (aeLockAvailable != ANDROID_CONTROL_AE_LOCK_AVAILABLE_TRUE) {
+ LOG(HAL, Info) << "AE lock is unavailable";
+ capabilities.erase(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE);
+ capabilities.erase(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR);
+ }
uint8_t awbLockAvailable = ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE;
staticMetadata_->addEntry(ANDROID_CONTROL_AWB_LOCK_AVAILABLE,
--
2.27.0
More information about the libcamera-devel
mailing list