diff options
author | Cho KyongHo <pullip.cho@samsung.com> | 2020-03-05 16:10:57 -0800 |
---|---|---|
committer | Cho KyongHo <pullip.cho@samsung.com> | 2020-03-05 16:16:19 -0800 |
commit | 13e9a5103916660f596727a68584b4d512158049 (patch) | |
tree | b0cdcc7fbaaee96a7de6591b81a15bd60fc2582a /libhwjpeg/ExynosJpegEncoderForCamera.cpp | |
parent | 8b10c41c0d3cb1522ba086d3eed6833f463e87f7 (diff) |
libhwjpeg: know earlier about thumbnail scaler
If thumbnail scaler is not available due to some problem with
configuration or file system, libhwjpeg handles the problem after
starting compression but we know that before compression. If it
is found before processing EXIF, we can gracefully handle the
exception.
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Change-Id: I7844216c672f7b3aafc790758088487a0a20a5b0
Diffstat (limited to 'libhwjpeg/ExynosJpegEncoderForCamera.cpp')
-rw-r--r-- | libhwjpeg/ExynosJpegEncoderForCamera.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libhwjpeg/ExynosJpegEncoderForCamera.cpp b/libhwjpeg/ExynosJpegEncoderForCamera.cpp index ed09cb8..272a577 100644 --- a/libhwjpeg/ExynosJpegEncoderForCamera.cpp +++ b/libhwjpeg/ExynosJpegEncoderForCamera.cpp @@ -373,6 +373,11 @@ int ExynosJpegEncoderForCamera::encode(int *size, exif_attribute_t *exifInfo, "Debugging information is not specified. Skipping writing APP4 marker"); ALOGD("Given stream buffer size: %d bytes", *size); + if (!mThumbnailScaler->available() && (exifInfo != nullptr)) { + exifInfo->enableThumb = false; + ALOGW("Thumbnail scaler is not available. No thumbnail is embedded"); + } + CStopWatch stopwatch(true); if (!ProcessExif(jpeg_base, m_nStreamSize, exifInfo, appInfo)) |