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

Umang Jain umang.jain at ideasonboard.com
Mon Jun 28 06:25:15 CEST 2021


Hi Laurent,

Thanks for the patch.

On 6/28/21 12:49 AM, Laurent Pinchart wrote:
> Log the topology for each valid discovered pipeline to aid debugging.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

Reviewed-by: Umang Jain <umang.jain 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(); });
Nice handy utility function that I learnt about it today. :-)
>   }
>   
>   int SimpleCameraData::init()


More information about the libcamera-devel mailing list