[libcamera-devel,2/2] README: Add short testing instructions with cam
diff mbox series

Message ID 20220621230826.23906-2-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • [libcamera-devel,1/2] Documentation: Fix length of title underlines
Related show

Commit Message

Laurent Pinchart June 21, 2022, 11:08 p.m. UTC
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@ucw.cz>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 Documentation/environment_variables.rst |  2 ++
 README.rst                              | 15 +++++++++++++++
 2 files changed, 17 insertions(+)

Comments

Kieran Bingham June 21, 2022, 11:23 p.m. UTC | #1
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@ucw.cz>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@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 ?

Other than that


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> +
> +.. code::
> +
> +    :~$ LIBCAMERA_LOG_LEVELS=*:DEBUG cam -l
> +
>  Using GStreamer plugin
>  ~~~~~~~~~~~~~~~~~~~~~~
>  
> -- 
> Regards,
> 
> Laurent Pinchart
>
Jacopo Mondi June 22, 2022, 7:20 a.m. UTC | #2
Hi Kieran,

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@ucw.cz>
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@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 :)
Looks good to me
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
  j

>
> Other than that
>
>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>
> > +
> > +.. code::
> > +
> > +    :~$ LIBCAMERA_LOG_LEVELS=*:DEBUG cam -l
> > +
> >  Using GStreamer plugin
> >  ~~~~~~~~~~~~~~~~~~~~~~
> >
> > --
> > Regards,
> >
> > Laurent Pinchart
> >
Laurent Pinchart June 22, 2022, 7:39 a.m. UTC | #3
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@ucw.cz>
> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@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@jmondi.org>
> 
> > Other than that
> >
> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> >
> > > +
> > > +.. code::
> > > +
> > > +    :~$ LIBCAMERA_LOG_LEVELS=*:DEBUG cam -l
> > > +
> > >  Using GStreamer plugin
> > >  ~~~~~~~~~~~~~~~~~~~~~~
> > >

Patch
diff mbox series

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:
+
+.. code::
+
+    :~$ LIBCAMERA_LOG_LEVELS=*:DEBUG cam -l
+
 Using GStreamer plugin
 ~~~~~~~~~~~~~~~~~~~~~~