[libcamera-devel,v4,4/5] android: camera_device: Add a getter to get libcamera::Camera pointer

Message ID 20200821144601.67860-5-email@uajain.com
State Accepted
Headers show
Series
  • android: Camera hotplug support
Related show

Commit Message

Umang Jain Aug. 21, 2020, 2:46 p.m. UTC
Add a public member function to get the libcamera::Camera pointer
associated with the CameraDevice. This will help to find the CameraDevice
object in CameraHalManager when the hotplug support is extended in the
Android layer.

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>
---
 src/android/camera_device.h | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/src/android/camera_device.h b/src/android/camera_device.h
index 3e472c7..3934f19 100644
--- a/src/android/camera_device.h
+++ b/src/android/camera_device.h
@@ -58,6 +58,7 @@  public:
 
 	unsigned int id() const { return id_; }
 	camera3_device_t *camera3Device() { return &camera3Device_; }
+	const libcamera::Camera *camera() const { return camera_.get(); }
 
 	int facing() const { return facing_; }
 	int orientation() const { return orientation_; }