summaryrefslogtreecommitdiff
path: root/src/android/camera_device.cpp
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2021-05-19 19:46:45 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2021-05-27 17:05:29 +0900
commit3beb1accac1d9eff6cc36681915b943413081593 (patch)
tree8abcaa0db6d1c148b9f294bc113b721b9a7e85cf /src/android/camera_device.cpp
parent19772ffe102ab2e72d0f9f1403e0c02fcca4424d (diff)
android: camera_device: Fix sensor frame duration
The sensor frame duration should be set by IPA. Get the information for the result metadata from libcamera. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Diffstat (limited to 'src/android/camera_device.cpp')
-rw-r--r--src/android/camera_device.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index ee6ba28a..946ddc7a 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -2306,6 +2306,12 @@ CameraDevice::getResultMetadata(const Camera3RequestDescriptor &descriptor) cons
resultMetadata->addEntry(ANDROID_SENSOR_EXPOSURE_TIME, exposure);
}
+ if (metadata.contains(controls::FrameDuration)) {
+ int64_t duration = metadata.get(controls::FrameDuration) * 1000;
+ resultMetadata->addEntry(ANDROID_SENSOR_FRAME_DURATION,
+ duration);
+ }
+
if (metadata.contains(controls::ScalerCrop)) {
Rectangle crop = metadata.get(controls::ScalerCrop);
int32_t cropRect[] = {