[2/2] libcamera: camera: Report the pipeline handler name
diff mbox series

Message ID 20260330-kbingham-pipeline-handler-property-v1-2-fdab13d5d263@ideasonboard.com
State Accepted
Headers show
Series
  • libcamera: Pipeline handler name property
Related show

Commit Message

Kieran Bingham March 30, 2026, 11:40 a.m. UTC
Add the Pipeline handler name to the Camera Properties when a camera is
constructed.

This helps support and identify how the camera is being managed
internally and what configuration has taken effect, especially as the
pipeline handler chosen can be impacted by both environment variables
and configuration files.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/libcamera/camera.cpp | 1 +
 1 file changed, 1 insertion(+)

Comments

Jacopo Mondi April 2, 2026, 10:07 a.m. UTC | #1
Hi Kieran

On Mon, Mar 30, 2026 at 12:40:25PM +0100, Kieran Bingham wrote:
> Add the Pipeline handler name to the Camera Properties when a camera is
> constructed.
>
> This helps support and identify how the camera is being managed
> internally and what configuration has taken effect, especially as the
> pipeline handler chosen can be impacted by both environment variables
> and configuration files.
>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

> ---
>  src/libcamera/camera.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
> index f724a1be5e3d..93b9e603dd57 100644
> --- a/src/libcamera/camera.cpp
> +++ b/src/libcamera/camera.cpp
> @@ -931,6 +931,7 @@ Camera::Camera(std::unique_ptr<Private> d, const std::string &id,
>  	: Extensible(std::move(d))
>  {
>  	_d()->id_ = id;
> +	_d()->properties_.set(properties::PipelineHandler, _d()->pipe_->name());
>  	_d()->streams_ = streams;
>  	_d()->validator_ = std::make_unique<CameraControlValidator>(this);
>  }
>
> --
> 2.52.0
>
Laurent Pinchart April 2, 2026, 11:55 a.m. UTC | #2
On Mon, Mar 30, 2026 at 12:40:25PM +0100, Kieran Bingham wrote:
> Add the Pipeline handler name to the Camera Properties when a camera is
> constructed.
> 
> This helps support and identify how the camera is being managed
> internally and what configuration has taken effect, especially as the
> pipeline handler chosen can be impacted by both environment variables
> and configuration files.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
>  src/libcamera/camera.cpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
> index f724a1be5e3d..93b9e603dd57 100644
> --- a/src/libcamera/camera.cpp
> +++ b/src/libcamera/camera.cpp
> @@ -931,6 +931,7 @@ Camera::Camera(std::unique_ptr<Private> d, const std::string &id,
>  	: Extensible(std::move(d))
>  {
>  	_d()->id_ = id;
> +	_d()->properties_.set(properties::PipelineHandler, _d()->pipe_->name());

Seems easy.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  	_d()->streams_ = streams;
>  	_d()->validator_ = std::make_unique<CameraControlValidator>(this);
>  }
>

Patch
diff mbox series

diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index f724a1be5e3d..93b9e603dd57 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -931,6 +931,7 @@  Camera::Camera(std::unique_ptr<Private> d, const std::string &id,
 	: Extensible(std::move(d))
 {
 	_d()->id_ = id;
+	_d()->properties_.set(properties::PipelineHandler, _d()->pipe_->name());
 	_d()->streams_ = streams;
 	_d()->validator_ = std::make_unique<CameraControlValidator>(this);
 }