diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2019-09-04 16:18:23 +0200 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2019-09-05 23:27:36 +0200 |
commit | fcd5a4f335530605a94eb4d3e6e807ec5e5824f9 (patch) | |
tree | cb1c9fa242cc1394310eacc2c3f09b705afffa88 /src/android/camera_device.h | |
parent | 3986009cf14d94e2312a31d799c2e5d45d30a5b9 (diff) |
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 <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/android/camera_device.h')
-rw-r--r-- | src/android/camera_device.h | 2 |
1 files changed, 1 insertions, 1 deletions
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<libcamera::CameraConfiguration> config_; CameraMetadata *staticMetadata_; - CameraMetadata *requestTemplate_; + std::map<unsigned int, CameraMetadata *> requestTemplates_; const camera3_callback_ops_t *callbacks_; }; |