[libcamera-devel] [PATCH v2 08/10] libcamera: camera: Add Camera properties

Niklas Söderlund niklas.soderlund at ragnatech.se
Fri Dec 6 23:30:04 CET 2019


Hi Jacopo,

Thanks for your patch.

On 2019-12-05 21:43:48 +0100, Jacopo Mondi wrote:
> Add a method to the Camera class to retrieve the Camera properties
> registered by the pipeline handler.
> 
> While at it, reword the Camera::controls() operation documentation to
> specify that the camera control information are constant during the
> camera lifetime not their value, while the camera properties value are
> the actually static information.
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> ---
>  include/libcamera/camera.h |  1 +
>  src/libcamera/camera.cpp   | 16 +++++++++++++++-
>  2 files changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h
> index ef6a37bb142c..72d5d62cc902 100644
> --- a/include/libcamera/camera.h
> +++ b/include/libcamera/camera.h
> @@ -85,6 +85,7 @@ public:
>  	int release();
>  
>  	const ControlInfoMap &controls();
> +	const ControlList &properties();
>  
>  	const std::set<Stream *> &streams() const;
>  	std::unique_ptr<CameraConfiguration> generateConfiguration(const StreamRoles &roles);
> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
> index e810fb725d81..5cbee0feeb96 100644
> --- a/src/libcamera/camera.cpp
> +++ b/src/libcamera/camera.cpp
> @@ -551,7 +551,8 @@ int Camera::release()
>  /**
>   * \brief Retrieve the list of controls supported by the camera
>   *
> - * Camera controls remain constant through the lifetime of the camera.
> + * The list of controls supported by the camera and their associated
> + * constraints remain constant through the lifetime of the Camera object.
>   *
>   * \return A ControlInfoMap listing the controls supported by the camera
>   */
> @@ -560,6 +561,19 @@ const ControlInfoMap &Camera::controls()
>  	return pipe_->controls(this);
>  }
>  
> +/**
> + * \brief Retrieve the list of properties of the camera
> + *
> + * * Camera properties are static information that describe the capabilities of

s/ * * / * /

With this fixed,

Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>

> + * the camera. They remain constant through the lifetime of the Camera object.
> + *
> + * \return A ControlList of properties supported by the camera
> + */
> +const ControlList &Camera::properties()
> +{
> +	return pipe_->properties(this);
> +}
> +
>  /**
>   * \brief Retrieve all the camera's stream information
>   *
> -- 
> 2.23.0
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

-- 
Regards,
Niklas Söderlund


More information about the libcamera-devel mailing list