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>
This commit is contained in:
committed by
Kieran Bingham
parent
f0421988dc
commit
b053384ffa
@@ -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__ */
|
||||
|
||||
Reference in New Issue
Block a user