@@ -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,
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@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(-)