libcamera/include
Umang Jain e9b47217b4 libcamera: camera_manager: Introduce signals when a camera is added or removed
Emit 'cameraAdded' and 'cameraRemoved' from CameraManager to enable
hotplug and hot-unplug support in application like QCam.

To avoid use-after-free race between the CameraManager and the
application, emit the 'cameraRemoved' with the shared_ptr version
of <Camera *>. This requires to change the function signature of
CameraManager::removeCamera() API.

Also, until now, CameraManager::Private::addCamera() transfers the
entire ownership of camera shared_ptr to CameraManager using
std::move(). This patch changes the signature of Private::addCamera to
accept pass-by-value camera parameter. It is done to make it clear from
the caller point of view that the pointer within the caller will still
be valid after this function returns. With this change in, we can emit
the camera pointer via 'cameraAdded' signal without hitting a segfault.

Signed-off-by: Umang Jain <email@uajain.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-17 00:27:54 +03:00
..
android licenses: License all meson files under CC0-1.0 2020-05-13 16:46:24 +03:00
libcamera libcamera: camera_manager: Introduce signals when a camera is added or removed 2020-06-17 00:27:54 +03:00
linux libcamera: Add missing SPDX headers to miscellaneous small files 2020-06-09 23:26:13 +03:00
meson.build libcamera: Move IPA headers from include/ipa/ to include/libcamera/ipa/ 2020-05-16 03:38:47 +03:00