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:
@@ -244,7 +244,7 @@ void CameraManager::stop()
|
||||
*
|
||||
* \return List of all available cameras
|
||||
*/
|
||||
const std::vector<std::shared_ptr<Camera>> &CameraManager::cameras() const
|
||||
std::vector<std::shared_ptr<Camera>> CameraManager::cameras() const
|
||||
{
|
||||
return p_->cameras_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user