summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2021-01-05 19:30:48 +0100
committerJacopo Mondi <jacopo@jmondi.org>2021-01-25 14:55:45 +0100
commitc9705a5e4be202c67e1329a0b50ecc698d352c41 (patch)
tree7a3710c5509eadde58c6151ddcfc295d2cf0d335
parent753d7536b73156eefd4647bfda4b39cb49e4bef4 (diff)
android: camera_device: Report EXPOSURE_TIME
Instead of reporting a fake value in the dynamic metadata for the EXPOSURE_TIME control, use the value provided by the pipeline. The metadata is only meaningfull in FULL mode. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
-rw-r--r--src/android/camera_device.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 4ddc489e..49d567a9 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -1863,11 +1863,6 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,
resultMetadata->addEntry(ANDROID_SENSOR_ROLLING_SHUTTER_SKEW,
&rolling_shutter_skew, 1);
- /* 16.6 msec */
- const int64_t exposure_time = 16600000;
- resultMetadata->addEntry(ANDROID_SENSOR_EXPOSURE_TIME,
- &exposure_time, 1);
-
const uint8_t lens_shading_map_mode =
ANDROID_STATISTICS_LENS_SHADING_MAP_MODE_OFF;
resultMetadata->addEntry(ANDROID_STATISTICS_LENS_SHADING_MAP_MODE,
@@ -1885,6 +1880,12 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,
&pipeline_depth, 1);
}
+ if (metadata.contains(controls::ExposureTime)) {
+ int32_t exposure = metadata.get(controls::ExposureTime);
+ resultMetadata->addEntry(ANDROID_SENSOR_EXPOSURE_TIME,
+ &exposure, 1);
+ }
+
/*
* Return the result metadata pack even is not valid: get() will return
* nullptr.