summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/android/camera_device.cpp2
-rw-r--r--src/android/jpeg/post_processor_jpeg.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 741dc8cf..c1025e81 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -2058,7 +2058,7 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,
}
if (metadata.contains(controls::ExposureTime)) {
- int32_t exposure = metadata.get(controls::ExposureTime);
+ int64_t exposure = metadata.get(controls::ExposureTime) * 1000ULL;
resultMetadata->addEntry(ANDROID_SENSOR_EXPOSURE_TIME,
&exposure, 1);
}
diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp
index cac0087b..1cbab30c 100644
--- a/src/android/jpeg/post_processor_jpeg.cpp
+++ b/src/android/jpeg/post_processor_jpeg.cpp
@@ -112,8 +112,8 @@ int PostProcessorJpeg::process(const FrameBuffer &source,
*/
exif.setTimestamp(std::time(nullptr), 0ms);
- /* \todo Get this information from libcamera::Request::metadata */
- exif.setExposureTime(0);
+ ret = resultMetadata->getEntry(ANDROID_SENSOR_EXPOSURE_TIME, &entry);
+ exif.setExposureTime(ret ? *entry.data.i64 : 0);
ret = requestMetadata.getEntry(ANDROID_LENS_APERTURE, &entry);
if (ret)
exif.setAperture(*entry.data.f);