android: camera_device: Return Camera as shared_ptr
Return the Camera wrapped by the CameraDevice as a shared_ptr. This will be required to construct the FrameBuffer allocator in the CameraStream class. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
e3393f147e
commit
fc1fcb5bc9
2 changed files with 2 additions and 2 deletions
|
@ -49,7 +49,7 @@ public:
|
|||
|
||||
unsigned int id() const { return id_; }
|
||||
camera3_device_t *camera3Device() { return &camera3Device_; }
|
||||
const libcamera::Camera *camera() const { return camera_.get(); }
|
||||
std::shared_ptr<libcamera::Camera> camera() const { return camera_; }
|
||||
libcamera::CameraConfiguration *cameraConfiguration() const
|
||||
{
|
||||
return config_.get();
|
||||
|
|
|
@ -155,7 +155,7 @@ void CameraHalManager::cameraRemoved(std::shared_ptr<Camera> cam)
|
|||
|
||||
auto iter = std::find_if(cameras_.begin(), cameras_.end(),
|
||||
[&cam](std::shared_ptr<CameraDevice> &camera) {
|
||||
return cam.get() == camera->camera();
|
||||
return cam == camera->camera();
|
||||
});
|
||||
if (iter == cameras_.end())
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue