From 6f09a619cca412f029c124cff8bbf1647d3d68cf Mon Sep 17 00:00:00 2001 From: Umang Jain Date: Wed, 9 Sep 2020 16:44:45 +0530 Subject: android: jpeg: Support an initial set of EXIF metadata tags Create a Exif object with various metadata tags set, just before the encoder starts to encode the frame. The object is passed directly as libcamera::Span<> to make sure EXIF tags can be set in a single place i.e. in CameraDevice and the encoder only has the job to write the data in the final output. Signed-off-by: Kieran Bingham Signed-off-by: Umang Jain Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/android/jpeg/exif.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/android/jpeg/exif.h') diff --git a/src/android/jpeg/exif.h b/src/android/jpeg/exif.h index 8dfc3245..622de4cf 100644 --- a/src/android/jpeg/exif.h +++ b/src/android/jpeg/exif.h @@ -12,6 +12,7 @@ #include +#include #include class Exif @@ -20,6 +21,13 @@ public: Exif(); ~Exif(); + void setMake(const std::string &make); + void setModel(const std::string &model); + + void setOrientation(int orientation); + void setSize(const libcamera::Size &size); + void setTimestamp(time_t timestamp); + libcamera::Span data() const { return { exifData_, size_ }; } [[nodiscard]] int generate(); -- cgit v1.2.1