summaryrefslogtreecommitdiff
path: root/src/android/jpeg/post_processor_jpeg.cpp
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2021-05-11 19:33:14 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2021-05-14 17:59:18 +0900
commit193ca8c353a42334f65ddfc988a105a47bca3547 (patch)
tree0482fcf6fc9f5c946204d2d195eb33bac508b1d0 /src/android/jpeg/post_processor_jpeg.cpp
parent0bc6ce8f67937e7c4de853908995c8538ccf1086 (diff)
android: jpeg: post_processor: Use the new metadata functions
Now that CameraMetadata supports more convenient functions, use those instead. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/android/jpeg/post_processor_jpeg.cpp')
-rw-r--r--src/android/jpeg/post_processor_jpeg.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp
index 3bf16996..058ccc99 100644
--- a/src/android/jpeg/post_processor_jpeg.cpp
+++ b/src/android/jpeg/post_processor_jpeg.cpp
@@ -103,7 +103,7 @@ int PostProcessorJpeg::process(const FrameBuffer &source,
ret = requestMetadata.getEntry(ANDROID_JPEG_ORIENTATION, &entry);
const uint32_t jpegOrientation = ret ? *entry.data.i32 : 0;
- resultMetadata->addEntry(ANDROID_JPEG_ORIENTATION, &jpegOrientation, 1);
+ resultMetadata->addEntry(ANDROID_JPEG_ORIENTATION, jpegOrientation);
exif.setOrientation(jpegOrientation);
exif.setSize(streamSize_);
@@ -129,7 +129,7 @@ int PostProcessorJpeg::process(const FrameBuffer &source,
if (ret) {
exif.setGPSDateTimestamp(*entry.data.i64);
resultMetadata->addEntry(ANDROID_JPEG_GPS_TIMESTAMP,
- entry.data.i64, 1);
+ *entry.data.i64);
}
ret = requestMetadata.getEntry(ANDROID_JPEG_THUMBNAIL_SIZE, &entry);
@@ -140,7 +140,7 @@ int PostProcessorJpeg::process(const FrameBuffer &source,
ret = requestMetadata.getEntry(ANDROID_JPEG_THUMBNAIL_QUALITY, &entry);
uint8_t quality = ret ? *entry.data.u8 : 95;
- resultMetadata->addEntry(ANDROID_JPEG_THUMBNAIL_QUALITY, &quality, 1);
+ resultMetadata->addEntry(ANDROID_JPEG_THUMBNAIL_QUALITY, quality);
if (thumbnailSize != Size(0, 0)) {
std::vector<unsigned char> thumbnail;
@@ -172,7 +172,7 @@ int PostProcessorJpeg::process(const FrameBuffer &source,
ret = requestMetadata.getEntry(ANDROID_JPEG_QUALITY, &entry);
const uint8_t quality = ret ? *entry.data.u8 : 95;
- resultMetadata->addEntry(ANDROID_JPEG_QUALITY, &quality, 1);
+ resultMetadata->addEntry(ANDROID_JPEG_QUALITY, quality);
int jpeg_size = encoder_->encode(source, destination->plane(0),
exif.data(), quality);
@@ -190,7 +190,7 @@ int PostProcessorJpeg::process(const FrameBuffer &source,
blob->jpeg_size = jpeg_size;
/* Update the JPEG result Metadata. */
- resultMetadata->addEntry(ANDROID_JPEG_SIZE, &jpeg_size, 1);
+ resultMetadata->addEntry(ANDROID_JPEG_SIZE, jpeg_size);
return 0;
}