andrdid: camera_device: Store const templates

The request capture templates stored in the
CameraDevice::requestTemplates_ should not be modified once created.

Store a const pointer to the request templates in the class member
map.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Jacopo Mondi 2020-07-24 14:00:58 +02:00
parent f2d19266a4
commit 3efc7e8834

View file

@ -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_;