android: camera_device: Make CameraDevice a shared object
CameraDevice needs to be wrapper into the std::shared_ptr instead of std::unique_ptr to enable refcounting. The refcounting will help us to support hotplug and hot-unplug CameraHalManager operations in the subsequent commit. Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
committed by
Laurent Pinchart
parent
7197fd9d67
commit
f8e2813ffe
@@ -36,7 +36,7 @@ private:
|
||||
libcamera::CameraManager *cameraManager_;
|
||||
|
||||
const camera_module_callbacks_t *callbacks_;
|
||||
std::vector<std::unique_ptr<CameraDevice>> cameras_;
|
||||
std::vector<std::shared_ptr<CameraDevice>> cameras_;
|
||||
};
|
||||
|
||||
#endif /* __ANDROID_CAMERA_MANAGER_H__ */
|
||||
|
||||
Reference in New Issue
Block a user