@@ -544,8 +544,18 @@ const camera_metadata_t *CameraDevice::constructDefaultRequestSettings(int type)
return nullptr;
}
- if (requestTemplate_)
+ if (requestTemplate_) {
+ camera_metadata_entry_t captureIntentEntry;
+
+ find_camera_metadata_entry(requestTemplate_,
+ ANDROID_CONTROL_CAPTURE_INTENT, &captureIntentEntry);
+ ret = update_camera_metadata_entry(requestTemplate_,
+ captureIntentEntry.index,
+ &captureIntent, 1, &captureIntentEntry);
+ METADATA_ASSERT(ret);
+
return requestTemplate_;
+ }
/* \todo Use correct sizes */
#define REQUEST_TEMPLATE_ENTRIES 30
The android control.CaptureIntent metadata tag which is returned as part of the constructed template shall depend on the template type provided to the construct_default_request_settings() HAL callback. Currently the libcamera HAL implementation fixes its value the first time the template is constructed and never updates it. Fix this by updating the metadata tag value using the provided template type. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> --- src/android/camera_device.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)