summaryrefslogtreecommitdiff
path: root/include/libcamera/camera_manager.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-01-18 01:49:17 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-01-21 11:13:45 +0200
commit32bf7ef239c1310fba638f35046b0f7eb13b32bf (patch)
tree9a3134f5b3b255c47d3e4d3520af983fab1873d0 /include/libcamera/camera_manager.h
parent0908669834c459bca0c52ac951ede84126f2546d (diff)
libcamera: camera_manager: Use std::unique_ptr to store event dispatcher
The CameraManager takes ownership of the dispatcher passed to the setEventDispatcher() function. Enforces this by using std::unique_ptr<>. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include/libcamera/camera_manager.h')
-rw-r--r--include/libcamera/camera_manager.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h
index 6cfcba3c..b82a8ce9 100644
--- a/include/libcamera/camera_manager.h
+++ b/include/libcamera/camera_manager.h
@@ -29,7 +29,7 @@ public:
static CameraManager *instance();
- void setEventDispatcher(EventDispatcher *dispatcher);
+ void setEventDispatcher(std::unique_ptr<EventDispatcher> dispatcher);
EventDispatcher *eventDispatcher();
private:
@@ -41,7 +41,7 @@ private:
std::unique_ptr<DeviceEnumerator> enumerator_;
std::vector<PipelineHandler *> pipes_;
- EventDispatcher *dispatcher_;
+ std::unique_ptr<EventDispatcher> dispatcher_;
};
} /* namespace libcamera */