diff options
author | Umang Jain <email@uajain.com> | 2020-06-16 19:45:36 +0000 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-06-17 00:27:51 +0300 |
commit | dd21ededd0fe9dede5942b0b68c45d43f1d671bd (patch) | |
tree | 87ccac84cfc1e42f56f01de565bc81e92d3a1b03 /src/libcamera/camera_manager.cpp | |
parent | c6f8ec7d8afdf6352fdbf6363052d7fa8370d1da (diff) |
libcamera: device_enumerator: Emit a signal when new devices are added
Emit a signal whenever new MediaDevices are added to the
DeviceEnumerator. This will allow CameraManager to be notified
about the new devices and it can re-emumerate all the devices
currently present on the system.
Device enumeration by the CameraManger is an expensive operation hence,
we want one signal emission per 'x' milliseconds to notify multiple
devices additions as a single batch, by the DeviceEnumerator.
Add a \todo to investigate the support for that.
Signed-off-by: Umang Jain <email@uajain.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/camera_manager.cpp')
-rw-r--r-- | src/libcamera/camera_manager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp index de6d5d82..30827976 100644 --- a/src/libcamera/camera_manager.cpp +++ b/src/libcamera/camera_manager.cpp @@ -155,12 +155,12 @@ void CameraManager::Private::createPipelineHandlers() } } - /* \todo Register hot-plug callback here */ + enumerator_->devicesAdded.connect(this, &Private::createPipelineHandlers); } void CameraManager::Private::cleanup() { - /* \todo Unregister hot-plug callback here */ + enumerator_->devicesAdded.disconnect(this, &Private::createPipelineHandlers); /* * Release all references to cameras to ensure they all get destroyed |