android: CameraHalManager: Hold CameraDevice with std::unique_ptr
CameraDevice is owned by CameraHalManager. The ownership of the object is not shared with other classes. So CameraHalManager should manage CameraDevice with std::unique_ptr. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
committed by
Laurent Pinchart
parent
1d8cc0a3ec
commit
212f410c7c
@@ -52,7 +52,7 @@ private:
|
||||
libcamera::CameraManager *cameraManager_;
|
||||
|
||||
const camera_module_callbacks_t *callbacks_;
|
||||
std::vector<std::shared_ptr<CameraDevice>> cameras_;
|
||||
std::vector<std::unique_ptr<CameraDevice>> cameras_;
|
||||
std::map<std::string, unsigned int> cameraIdsMap_;
|
||||
Mutex mutex_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user