From 3a3f6ae22e88c592425a4374734cd17df76d7db2 Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Thu, 21 Jan 2021 17:40:35 +0900 Subject: android: jpeg: exif: Add functions for setting various values Add functions for setting the following EXIF fields: - GPSDatestamp - GPSTimestamp - GPSLocation - GPSLatitudeRef - GPSLatitude - GPSLongitudeRef - GPSLongitude - GPSAltitudeRef - GPSAltitude - GPSProcessingMethod - FocalLength - ExposureTime - FNumber - ISO - Flash - WhiteBalance - SubsecTime - SubsecTimeOriginal - SubsecTimeDigitized These are in preparation for fixing the following CTS tests: - android.hardware.camera2.cts.StillCaptureTest#testFocalLengths - android.hardware.camera2.cts.StillCaptureTest#testJpegExif Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- src/android/jpeg/post_processor_jpeg.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/android/jpeg/post_processor_jpeg.cpp') diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp index 436a50f8..aa0f783d 100644 --- a/src/android/jpeg/post_processor_jpeg.cpp +++ b/src/android/jpeg/post_processor_jpeg.cpp @@ -7,6 +7,8 @@ #include "post_processor_jpeg.h" +#include + #include "../camera_device.h" #include "../camera_metadata.h" #include "encoder_libjpeg.h" @@ -17,6 +19,7 @@ #include "libcamera/internal/log.h" using namespace libcamera; +using namespace std::chrono_literals; LOG_DEFINE_CATEGORY(JPEG) @@ -97,7 +100,7 @@ int PostProcessorJpeg::process(const FrameBuffer &source, * Since the precision we need for EXIF timestamp is only one * second, it is good enough. */ - exif.setTimestamp(std::time(nullptr)); + exif.setTimestamp(std::time(nullptr), 0ms); std::vector thumbnail; generateThumbnail(source, &thumbnail); -- cgit v1.2.1