[PATCH v2] libcamera: camera_manager: Log info message to report camera creation
Kieran Bingham
kieran.bingham at ideasonboard.com
Mon Mar 3 15:33:07 CET 2025
Quoting Laurent Pinchart (2025-03-03 13:45:18)
> Camera creation is one of the most important events generated by
> libcamera, but we are completely silent about it. The lack of a log
> message makes it more difficult to identify problems and provide
> support. Fix it by adding an Info message that reports the camera id and
> its pipeline handler when the camera is added.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
I think you could have kept tags...
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> ---
> Changes since v1:
>
> - Move message to CameraManager class
> ---
> src/libcamera/camera_manager.cpp | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp
> index 87e6717ece91..942a72dcfc96 100644
> --- a/src/libcamera/camera_manager.cpp
> +++ b/src/libcamera/camera_manager.cpp
> @@ -217,6 +217,10 @@ void CameraManager::Private::addCamera(std::shared_ptr<Camera> camera)
>
> unsigned int index = cameras_.size() - 1;
>
> + LOG(Camera, Info)
> + << "Adding camera '" << camera->id() << "' for pipeline handler "
> + << camera->_d()->pipe()->name();
> +
> /* Report the addition to the public signal */
> CameraManager *const o = LIBCAMERA_O_PTR();
> o->cameraAdded.emit(cameras_[index]);
>
> base-commit: c0a58b97989f7d529f1469b2c2f8705ff55d3af4
> --
> Regards,
>
> Laurent Pinchart
>
More information about the libcamera-devel
mailing list