summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-22 21:25:05 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-23 22:36:30 +0200
commita0295fdaf854bb10c387255f10677d9b6f1554dc (patch)
tree85c82ea804c0f373566924435b3c165f7399ea69 /include
parentb6467bd9c67f69fe5023cb524391b8f1fc5c44c4 (diff)
libcamera: camera_manager: Return a copy of the vector from cameras()
Making CameraManager::cameras() thread-safe requires returning a copy of the cameras vector instead of a reference. This is also required for hot-plugging support and is thus desirable. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/camera_manager.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h
index 068afd58..079f848a 100644
--- a/include/libcamera/camera_manager.h
+++ b/include/libcamera/camera_manager.h
@@ -30,7 +30,7 @@ public:
int start();
void stop();
- const std::vector<std::shared_ptr<Camera>> &cameras() const;
+ std::vector<std::shared_ptr<Camera>> cameras() const;
std::shared_ptr<Camera> get(const std::string &name);
std::shared_ptr<Camera> get(dev_t devnum);