summaryrefslogtreecommitdiff
path: root/src/android/camera_capabilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/camera_capabilities.cpp')
-rw-r--r--src/android/camera_capabilities.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
index edeb6943..87a6e1c6 100644
--- a/src/android/camera_capabilities.cpp
+++ b/src/android/camera_capabilities.cpp
@@ -1347,7 +1347,7 @@ std::unique_ptr<CameraMetadata> CameraCapabilities::requestTemplatePreview() con
* CameraMetadata is capable of resizing the container on the fly, if
* adding a new entry will exceed its capacity.
*/
- auto requestTemplate = std::make_unique<CameraMetadata>(21, 36);
+ auto requestTemplate = std::make_unique<CameraMetadata>(22, 38);
if (!requestTemplate->isValid()) {
return nullptr;
}
@@ -1368,6 +1368,16 @@ std::unique_ptr<CameraMetadata> CameraCapabilities::requestTemplatePreview() con
requestTemplate->addEntry(ANDROID_CONTROL_AE_TARGET_FPS_RANGE,
entry.data.i32, 2);
+ /*
+ * Get thumbnail sizes from static metadata and add the first non-zero
+ * size to the template.
+ */
+ found = staticMetadata_->getEntry(ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES,
+ &entry);
+ ASSERT(found && entry.count >= 4);
+ requestTemplate->addEntry(ANDROID_JPEG_THUMBNAIL_SIZE,
+ entry.data.i32 + 2, 2);
+
uint8_t aeMode = ANDROID_CONTROL_AE_MODE_ON;
requestTemplate->addEntry(ANDROID_CONTROL_AE_MODE, aeMode);