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 <kieran.bingham@ideasonboard.com>
Signed-off-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Umang Jain 2020-09-09 16:44:45 +05:30 committed by Laurent Pinchart
parent c3d1329b93
commit 6f09a619cc
6 changed files with 88 additions and 4 deletions

View file

@ -12,6 +12,7 @@
#include <libexif/exif-data.h>
#include <libcamera/geometry.h>
#include <libcamera/span.h>
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<const uint8_t> data() const { return { exifData_, size_ }; }
[[nodiscard]] int generate();