[libcamera-devel] [PATCH 2/2] README: Add short testing instructions with cam

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Jun 22 09:39:24 CEST 2022


On Wed, Jun 22, 2022 at 09:20:16AM +0200, Jacopo Mondi wrote:
> On Wed, Jun 22, 2022 at 12:23:02AM +0100, Kieran Bingham via libcamera-devel wrote:
> > Quoting Laurent Pinchart via libcamera-devel (2022-06-22 00:08:26)
> > > The README.rst file contains the getting started instructions, but lacks
> > > a simple way to test libcamera. Add a short section about basic cam
> > > usage.
> > >
> > > Suggested-by: Pavel Machek <pavel at ucw.cz>
> > > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > > ---
> > >  Documentation/environment_variables.rst |  2 ++
> > >  README.rst                              | 15 +++++++++++++++
> > >  2 files changed, 17 insertions(+)
> > >
> > > diff --git a/Documentation/environment_variables.rst b/Documentation/environment_variables.rst
> > > index f092cbbd29c5..dcfdb1a33a32 100644
> > > --- a/Documentation/environment_variables.rst
> > > +++ b/Documentation/environment_variables.rst
> > > @@ -86,6 +86,8 @@ global environment:
> > >     :~$ export LIBCAMERA_LOG_LEVELS='Camera:DEBUG,V4L2:DEBUG'
> > >     :~$ cam --list
> > >
> > > +.. _log levels:
> > > +
> > >  Log levels
> > >  ~~~~~~~~~~
> > >
> > > diff --git a/README.rst b/README.rst
> > > index f81d6e2e7867..578aa19f0f54 100644
> > > --- a/README.rst
> > > +++ b/README.rst
> > > @@ -101,6 +101,21 @@ for android: [optional]
> > >  for lc-compliance: [optional]
> > >          libevent-dev
> > >
> > > +Basic testing with cam utility
> > > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > +
> > > +The ``cam`` utility can be used for basic testing. You can list the cameras
> > > +detected on the system with ``cam -l``, and capture ten frames from the first
> > > +camera and save them to disk with ``cam -c 1 --capture=10 --file``. See
> > > +``cam -h`` for more information about the ``cam`` tool.
> > > +
> > > +In case of problems, a detailed debug log can be obtained from libcamera by
> > > +setting the :ref:`LIBCAMERA_LOG_LEVELS <log levels>` environment variable:
> >
> > Will this try to hyperlink to a document that isn't currently available
> > on https://libcamera.org/getting-started.html ?
> 
> Won't this link to the "Log levels" section ?
> 
> Just compiled and checked, it does :)

It does, but only on local builds, not on the website. I'll drop the
link for now.

> Looks good to me
> Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>
> 
> > Other than that
> >
> > Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> >
> > > +
> > > +.. code::
> > > +
> > > +    :~$ LIBCAMERA_LOG_LEVELS=*:DEBUG cam -l
> > > +
> > >  Using GStreamer plugin
> > >  ~~~~~~~~~~~~~~~~~~~~~~
> > >

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list