From fcd5a4f335530605a94eb4d3e6e807ec5e5824f9 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Wed, 4 Sep 2019 16:18:23 +0200 Subject: android: camera_device: Fix handling of request template According to the Android camera HALv3 documentation, the request template metadata pack should not be modified after it is returned to the camera stack from the HAL. Currently, the same metadata pack is used for all types of template request, without updating the capture intent there contained to match the requested template type, as correctly reported by the cros_camera_test test application. In order to avoid modifying the single request template already returned to the camera stack in order to update the capture intent it contains, create a map that associates a dedicated template to each supported capture type. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/android/camera_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/android/camera_device.h') diff --git a/src/android/camera_device.h b/src/android/camera_device.h index 65ba877a..d5d136a7 100644 --- a/src/android/camera_device.h +++ b/src/android/camera_device.h @@ -61,7 +61,7 @@ private: std::unique_ptr config_; CameraMetadata *staticMetadata_; - CameraMetadata *requestTemplate_; + std::map requestTemplates_; const camera3_callback_ops_t *callbacks_; }; -- cgit v1.2.1