summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/android/camera_capabilities.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
index e92bca42..edeb6943 100644
--- a/src/android/camera_capabilities.cpp
+++ b/src/android/camera_capabilities.cpp
@@ -1340,8 +1340,12 @@ std::unique_ptr<CameraMetadata> CameraCapabilities::requestTemplateManual() cons
std::unique_ptr<CameraMetadata> CameraCapabilities::requestTemplatePreview() const
{
/*
- * \todo Keep this in sync with the actual number of entries.
- * Currently: 20 entries, 35 bytes
+ * Give initial hint of entries and number of bytes to be allocated.
+ * It is deliberate that the hint is slightly larger than required, to
+ * avoid resizing the container.
+ *
+ * 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);
if (!requestTemplate->isValid()) {