summaryrefslogtreecommitdiff
path: root/src/android/jpeg/post_processor_jpeg.h
diff options
context:
space:
mode:
authorUmang Jain <email@uajain.com>2020-10-28 02:54:47 +0530
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-10-28 15:52:51 +0000
commitb053384ffab467ed016019bbcf8121a6f9e48fed (patch)
treea2e1910dcdf2bd9fd6d24c21325971842d38916d /src/android/jpeg/post_processor_jpeg.h
parentf0421988dc7d91fbd221e2282f839cb51e1a3f8c (diff)
android: jpeg: post_processor_jpeg: Embed thumbnail into Exif metadata
Embed a Jpeg-encoded thumbnail into Exif metadata using the Thumbnailer class that got introduced. Introduce a helper function in Exif class for setting the thumbnail data. Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> [Kieran: Add todo comment, and Compression enum] Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/android/jpeg/post_processor_jpeg.h')
-rw-r--r--src/android/jpeg/post_processor_jpeg.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/android/jpeg/post_processor_jpeg.h b/src/android/jpeg/post_processor_jpeg.h
index 3706cec2..5afa831c 100644
--- a/src/android/jpeg/post_processor_jpeg.h
+++ b/src/android/jpeg/post_processor_jpeg.h
@@ -8,12 +8,13 @@
#define __ANDROID_POST_PROCESSOR_JPEG_H__
#include "../post_processor.h"
+#include "encoder_libjpeg.h"
+#include "thumbnailer.h"
#include <libcamera/geometry.h>
#include "libcamera/internal/buffer.h"
-class Encoder;
class CameraDevice;
class PostProcessorJpeg : public PostProcessor
@@ -28,9 +29,14 @@ public:
CameraMetadata *metadata) override;
private:
+ void generateThumbnail(const libcamera::FrameBuffer &source,
+ std::vector<unsigned char> *thumbnail);
+
CameraDevice *const cameraDevice_;
std::unique_ptr<Encoder> encoder_;
libcamera::Size streamSize_;
+ EncoderLibJpeg thumbnailEncoder_;
+ Thumbnailer thumbnailer_;
};
#endif /* __ANDROID_POST_PROCESSOR_JPEG_H__ */