summaryrefslogtreecommitdiff
path: root/src/android/jpeg/thumbnailer.h
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2021-01-23 13:56:01 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2021-01-27 12:07:14 +0900
commit1264628d3c92dedfcee32caed776e2beaad74a2a (patch)
tree18f1b28fec856099287efb22fae67361de9f61f5 /src/android/jpeg/thumbnailer.h
parentabfabdd6e769a58ccd9ff1e884528211904888d8 (diff)
android: jpeg: Configure thumbnailer based on request metadata
Configure the thumbnailer based on the thumbnail parameters given by the android request metadata. Only the thumbnail encoder needs to be configured, and since it is only used at post-processing time, move the configuration out of the post-processor constructor and into the processing step. Also set the following android result metadata tags: - ANDROID_JPEG_THUMBNAIL_SIZE - ANDROID_JPEG_THUMBNAIL_QUALITY Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/android/jpeg/thumbnailer.h')
-rw-r--r--src/android/jpeg/thumbnailer.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/android/jpeg/thumbnailer.h b/src/android/jpeg/thumbnailer.h
index 98f11833..4e9226c3 100644
--- a/src/android/jpeg/thumbnailer.h
+++ b/src/android/jpeg/thumbnailer.h
@@ -20,15 +20,13 @@ public:
void configure(const libcamera::Size &sourceSize,
libcamera::PixelFormat pixelFormat);
void createThumbnail(const libcamera::FrameBuffer &source,
+ const libcamera::Size &targetSize,
std::vector<unsigned char> *dest);
- const libcamera::Size &size() const { return targetSize_; }
+ const libcamera::PixelFormat &pixelFormat() const { return pixelFormat_; }
private:
- libcamera::Size computeThumbnailSize() const;
-
libcamera::PixelFormat pixelFormat_;
libcamera::Size sourceSize_;
- libcamera::Size targetSize_;
bool valid_;
};