[libcamera-devel] [PATCH 2/2] README: Add short testing instructions with cam
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Jun 22 01:08:26 CEST 2022
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:
+
+.. code::
+
+ :~$ LIBCAMERA_LOG_LEVELS=*:DEBUG cam -l
+
Using GStreamer plugin
~~~~~~~~~~~~~~~~~~~~~~
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list