From 1d32f21136c641318e78b1ba6f075d8865cd51c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Sun, 27 Oct 2019 21:20:10 +0100 Subject: cam: Store camera as shared pointer everywhere MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do not store the camera raw pointer in the capture class, this will prevent forwarding the shared pointer in the future. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- src/cam/capture.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cam/capture.h') diff --git a/src/cam/capture.h b/src/cam/capture.h index 4d396afb..c692d489 100644 --- a/src/cam/capture.h +++ b/src/cam/capture.h @@ -21,7 +21,7 @@ class Capture { public: - Capture(libcamera::Camera *camera, + Capture(std::shared_ptr camera, libcamera::CameraConfiguration *config); int run(EventLoop *loop, const OptionsParser::Options &options); @@ -30,7 +30,7 @@ private: void requestComplete(libcamera::Request *request); - libcamera::Camera *camera_; + std::shared_ptr camera_; libcamera::CameraConfiguration *config_; std::map streamName_; -- cgit v1.2.1