summaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2021-01-21 18:21:28 +0100
committerJacopo Mondi <jacopo@jmondi.org>2021-03-09 08:57:53 +0100
commitd150860129c3bfee4a480da78fde4e5736a2e654 (patch)
tree770ed6d62946570425d53bb73a643caddc3828cd /src/android
parent238fb2791164f63e377836f67d849dc0c9bb4cfe (diff)
android: camera_device: Return AE FPS range
The result metadata reports an arbitrary {30, 30} FPS range for the AE algorithm. The actual FPS range should be returned in the Request::metadata, but as libcamera currently does not support that feature temporarily work around the issue and return the FPS range requested by the camera framework. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android')
-rw-r--r--src/android/camera_device.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 537d6617..970a8bf5 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -2070,9 +2070,14 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,
value = ANDROID_CONTROL_AE_MODE_ON;
resultMetadata->addEntry(ANDROID_CONTROL_AE_MODE, &value, 1);
- std::vector<int32_t> aeFpsTarget = { 30, 30 };
- resultMetadata->addEntry(ANDROID_CONTROL_AE_TARGET_FPS_RANGE,
- aeFpsTarget.data(), aeFpsTarget.size());
+ if (settings.getEntry(ANDROID_CONTROL_AE_TARGET_FPS_RANGE, &entry))
+ /*
+ * \todo Retrieve the AE FPS range from the libcamera metadata.
+ * As libcamera does not support that control, as a temporary
+ * workaround return what the framework asked.
+ */
+ resultMetadata->addEntry(ANDROID_CONTROL_AE_TARGET_FPS_RANGE,
+ entry.data.i32, 2);
value = ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE;
found = settings.getEntry(ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER, &entry);