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

Umang Jain email at uajain.com
Mon Aug 17 22:26:40 CEST 2020


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

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



More information about the libcamera-devel mailing list