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

Jacopo Mondi jacopo at jmondi.org
Thu Dec 5 14:55:59 CET 2019


Hi Laurent,
   two minor notes on wording

On Wed, Dec 04, 2019 at 06:20:37PM +0200, Laurent Pinchart wrote:
> Hi Jacopo,
>
> Thank you for the patch.
>
> On Wed, Dec 04, 2019 at 02:21:04PM +0100, Jacopo Mondi wrote:
> > Add an operation to the Camera class to retrive the Camera properties
>
> s/an operation/a method/

I thought we stabilizd on 'operation' instead of 'method'

> s/retrive/retrieve/
>
> > registered by the pipeline handler.
> >
> > While at it, rewords the Camera::controls() operation documentation to
>
> s/rewords/reword/
>
> > 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.
> >
> > 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..44031ffdb4b3 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.
>
> Maybe s/camera/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 remain constant through the
> > + * lifetime of the camera.
>
> How about
>
>  * Camera properties are static information that describe the capabilities of
>  * the camera. They remain constant through the lifetime of the Camera object.

I thought we use '$class instance' instead of 'object' as object is a
Java terminology

Thanks
   j

>
> > + *
> > + * \return A ControlList of properties supported by the camera
> > + */
> > +const ControlList &Camera::properties()
> > +{
> > +	return pipe_->properties(this);
>
> I think it would make sense at some point to let the Camera access
> CameraData, at which point we can short-circuit the pipeline handler for
> this. It's out of scope for this patch series anyway.
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> > +}
> > +
> >  /**
> >   * \brief Retrieve all the camera's stream information
> >   *
>
> --
> Regards,
>
> Laurent Pinchart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20191205/d25b17f9/attachment.sig>


More information about the libcamera-devel mailing list