@@ -573,15 +573,16 @@ int CameraCapabilities::initializeStaticMetadata()
staticMetadata_->addEntry(ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES,
availableStabilizationModes);
- /*
- * \todo Inspect the camera capabilities to report the available
- * AWB modes. Default to AUTO as CTS tests require it.
- */
- std::vector<uint8_t> availableAwbModes = {
- ANDROID_CONTROL_AWB_MODE_AUTO,
- };
- staticMetadata_->addEntry(ANDROID_CONTROL_AWB_AVAILABLE_MODES,
- availableAwbModes);
+ std::vector<uint8_t> awbModes =
+ setMetadata(staticMetadata_.get(), ANDROID_CONTROL_AWB_AVAILABLE_MODES,
+ controlsInfo, &controls::AwbMode,
+ std::vector<uint8_t>({ ANDROID_CONTROL_AWB_MODE_AUTO }));
+ if (std::find(awbModes.begin(), awbModes.end(),
+ ANDROID_CONTROL_AWB_MODE_OFF) == awbModes.end()) {
+ fullSupport = false;
+ /* \todo Double check if this is the correct capability */
+ capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING] = false;
+ }
std::vector<int32_t> availableMaxRegions = {
0, 0, 0,
Plumb the AwbMode control into the HAL for CONTROL_AWB_AVAILABLE_MODES for static metadata. Bug: https://bugs.libcamera.org/show_bug.cgi?id=44 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 | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)