mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-23 16:45:07 +03:00
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>
This commit is contained in:
parent
b6467bd9c6
commit
a0295fdaf8
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue