[PATCH v2] libcamera: camera_manager: Log info message to report camera creation
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Mar 3 14:45:18 CET 2025
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>
---
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