diff options
author | Paul Elder <paul.elder@ideasonboard.com> | 2021-01-21 17:40:35 +0900 |
---|---|---|
committer | Paul Elder <paul.elder@ideasonboard.com> | 2021-01-27 12:06:59 +0900 |
commit | 3a3f6ae22e88c592425a4374734cd17df76d7db2 (patch) | |
tree | bf1ca191275b508e53d85461d463d67f3b4e2e12 /src/android/jpeg/post_processor_jpeg.cpp | |
parent | e5b6774422b66b4caee544b12c3aea14e3416ded (diff) |
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 <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android/jpeg/post_processor_jpeg.cpp')
-rw-r--r-- | src/android/jpeg/post_processor_jpeg.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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 <chrono> + #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<unsigned char> thumbnail; generateThumbnail(source, &thumbnail); |