[libcamera-devel] [PATCH] libcamera: pipeline: simple: Log pipeline topology

Laurent Pinchart laurent.pinchart at ideasonboard.com
Sun Jun 27 21:19:37 CEST 2021


Log the topology for each valid discovered pipeline to aid debugging.

Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
 src/libcamera/pipeline/simple/simple.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index 6ed3da423432..e214a7eb3a47 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -342,8 +342,15 @@ SimpleCameraData::SimpleCameraData(SimplePipelineHandler *pipe,
 	/* Finally also remember the sensor. */
 	sensor_ = std::make_unique<CameraSensor>(sensor);
 	ret = sensor_->init();
-	if (ret)
+	if (ret) {
 		sensor_.reset();
+		return;
+	}
+
+	LOG(SimplePipeline, Debug)
+		<< "Found pipeline: "
+		<< utils::join(entities_, " -> ",
+			       [](const Entity &e) { return e.entity->name(); });
 }
 
 int SimpleCameraData::init()
-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list