Message ID | 20210624105054.51700-4-paul.elder@ideasonboard.com |
---|---|
State | Superseded |
Delegated to: | Paul Elder |
Headers | show |
Series |
|
Related | show |
Hi Paul, thank you for the patch. On Thu, Jun 24, 2021 at 7:51 PM Paul Elder <paul.elder@ideasonboard.com> wrote: > > Plumb the AwbLock control into the HAL for > CONTROL_AWB_LOCK_AVAILABLE_MODES for static metadata. > > Bug: https://bugs.libcamera.org/show_bug.cgi?id=45 > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> > > --- > Changes in v2: > - use new setMetadata > - rebase on camera capabilities refactor > > TODO: plumb result metadata > --- > src/android/camera_capabilities.cpp | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp > index 212d61d9..164006f2 100644 > --- a/src/android/camera_capabilities.cpp > +++ b/src/android/camera_capabilities.cpp > @@ -602,9 +602,14 @@ int CameraCapabilities::initializeStaticMetadata() > staticMetadata_->addEntry(ANDROID_CONTROL_AE_LOCK_AVAILABLE, > aeLockAvailable); > > - uint8_t awbLockAvailable = ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE; > - staticMetadata_->addEntry(ANDROID_CONTROL_AWB_LOCK_AVAILABLE, > - awbLockAvailable); > + uint8_t awbLockAvailable = > + setMetadata(staticMetadata_.get(), ANDROID_CONTROL_AWB_LOCK_AVAILABLE, > + controlsInfo, &controls::AwbLock, > + (uint8_t)ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE, Max); > + if (!awbLockAvailable) { awbLockAvailable == ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE or awbLockAvailable != ANDROID_CONTROL_AWB_LOCK_AVAILABLE_TRUE seems to be more right. > + capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE] = false; > + capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING] = false; > + } > > char availableControlModes = ANDROID_CONTROL_MODE_AUTO; > staticMetadata_->addEntry(ANDROID_CONTROL_AVAILABLE_MODES, > -- > 2.27.0 >
diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp index 212d61d9..164006f2 100644 --- a/src/android/camera_capabilities.cpp +++ b/src/android/camera_capabilities.cpp @@ -602,9 +602,14 @@ int CameraCapabilities::initializeStaticMetadata() staticMetadata_->addEntry(ANDROID_CONTROL_AE_LOCK_AVAILABLE, aeLockAvailable); - uint8_t awbLockAvailable = ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE; - staticMetadata_->addEntry(ANDROID_CONTROL_AWB_LOCK_AVAILABLE, - awbLockAvailable); + uint8_t awbLockAvailable = + setMetadata(staticMetadata_.get(), ANDROID_CONTROL_AWB_LOCK_AVAILABLE, + controlsInfo, &controls::AwbLock, + (uint8_t)ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE, Max); + if (!awbLockAvailable) { + capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE] = false; + capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING] = false; + } char availableControlModes = ANDROID_CONTROL_MODE_AUTO; staticMetadata_->addEntry(ANDROID_CONTROL_AVAILABLE_MODES,
Plumb the AwbLock control into the HAL for CONTROL_AWB_LOCK_AVAILABLE_MODES for static metadata. Bug: https://bugs.libcamera.org/show_bug.cgi?id=45 Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> --- Changes in v2: - use new setMetadata - rebase on camera capabilities refactor TODO: plumb result metadata --- src/android/camera_capabilities.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)