[libcamera-devel] [PATCH 3/6] andrdid: camera_device: Store const templates
Jacopo Mondi
jacopo at jmondi.org
Fri Jul 24 16:21:17 CEST 2020
The request capture templates stored in the
CameraDevice::requestTemplates_ should not be modified once created.
Store a const reference to the request templates in the class member
map.
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
src/android/camera_device.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/android/camera_device.h b/src/android/camera_device.h
index 5b8b9c3e26e2..af1b58ab6b4e 100644
--- a/src/android/camera_device.h
+++ b/src/android/camera_device.h
@@ -95,7 +95,7 @@ private:
std::unique_ptr<libcamera::CameraConfiguration> config_;
CameraMetadata *staticMetadata_;
- std::map<unsigned int, CameraMetadata *> requestTemplates_;
+ std::map<unsigned int, const CameraMetadata *> requestTemplates_;
const camera3_callback_ops_t *callbacks_;
std::vector<Camera3StreamConfiguration> streamConfigurations_;
--
2.27.0
More information about the libcamera-devel
mailing list