Commit graph

38 commits

Author SHA1 Message Date
Hirokazu Honda
0d50a04cc9 lc-compliance: Build with gtest in subprojects
libgtest-dev is provided as a static library at least by Debian 10.
The compiler and linker to create the static library might be
different from ones used for libcamera. This causes a problem
upon linking.

This puts gtest code to subprojects, builds the code and link it
for lc-compliance. However, libgtest is locally built as a library on
ChromeOS and thus the used compiler and linker are the same as one
used for libcamera. We don't do these on ChromeOS build environment.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-11-15 10:04:10 +00:00
Laurent Pinchart
78e94065fc README: Document dependencies for backtrace generation
libcamera now has the ability to use libdw and libunwind to generate
backtraces, in addition to the glibc backtrace() function. libdw
provides the most detailed output and is highly recommended, but is
limited to parsing backtraces, it doesn't support capturing them.
libunwind and backtrace() provide both features. If backtrace() is
available, libunwind will not bring any improvement.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
2021-10-19 13:14:54 +03:00
Kieran Bingham
ccec150589 README: Add documentation package
When building the documentaion with Doxygen, an error will be
reported if latex can not find the extra packages provided by
texlive-latex-extra.

While this package is optional, document this requirement for
Documentation.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-10-14 10:22:51 +01:00
Laurent Pinchart
828f0d97be README: Document GST_DEBUG values to debug libcamerasrc
Problems with libcamerasrc are reported quite frequently. To help users
diagnosing them, document how to obtain libcamerasrc debug messages
through GST_DEBUG.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-10-13 01:20:10 +03:00
Hirokazu Honda
e9a3a5d201 README: Add lc-compliance dependencies
libevent-dev and libgtest-dev are required for lc-compliance.
Write them into lc-compliance dependencies in README.rst.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-10-07 01:05:27 +03:00
Laurent Pinchart
40f5fddca7 libcamera: Standardize URLs to git repositories
When the libcamera project was started, we had no public git tree hosted
on git.libcamera.org. The problem has been addressed a while ago, and
the git.linuxtv.org libcamera repository is now a mirror of the main git
tree. The mirror is useful to benefit from the linuxtv.org automated
compile tests, but it can also confuse users who don't know where the
official version is. To try and clarify this, use the git.libcamera.org
URL consistently through the project.

This doesn't void the validatity of the linuxtv.org repository which
will continue to mirror the libcamera.org repository.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2021-09-24 13:25:33 +03:00
Kieran Bingham
84acaac8b7 README: Fix android dependencies
While the distribution is unspecified, The README.rst gives
debian/ubuntu named dependencies for all except the android
requirements.

Update the android dependencies to match the others, by showing that the
-dev package is required.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-09-14 12:46:32 +01:00
Kieran Bingham
5c624e5561 README.rst: Update gstreamer element guidance
The Gstreamer gstlibcamerasrc element operates better with the
glimagesink, as it can perform direct renders or hardware accellerated
image format conversion.

Further extend the sample commands to demonstrate how to specify a fixed
width and height parameter to the pipeline.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-08-25 21:34:50 +01:00
Jacopo Mondi
07c2a4257d android: Add CameraHalConfig class
Add a CameraHalConfig class to the Android Camera3 HAL layer.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
2021-05-25 15:21:59 +02:00
Jacopo Mondi
6570f85454 libcamera: List dependency for Android Camera3 HAL
Add to the README.rst file the list of depdendencies for the
Android Camera3 HAL.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
2021-05-25 15:21:46 +02:00
Vedant Paranjape
76a5861f3e Add alternative meson install command
While installing meson using pip3 install --user meson, due to python
path issues, build.ninja can't be located by ninja. meson generates
ninja files fine, but then when you run ninja, it is unable to find
meson's build.ninja python module due to path issues.
It gives the following error on ninja -C build install:

ninja: Entering directory `build'
ninja: error: loading 'build.ninja': No such file or directory

After uninstalling meson using pip3 and installing it again using pip
without --user argument solved the issue.

Add a troubleshooting section to the readme to describe this issue and
suggest possible solutions.

Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
2021-04-05 13:42:49 +09:00
Nícolas F. R. A. Prado
7ebc19752a Documentation: Fix typos and wrong rST syntax for literals
Fix some typos and some literals using ` instead of ``.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Sebastian Fricke <sebastian.fricke@posteo.net>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-03-19 01:51:57 +02:00
Kieran Bingham
3620f25c61 README: Update tracing dependencies
The packages required for tracing libcamera projects were incorrectly
specified.

Update with the correct prefix for the dev package on liblttng-ust-dev
and also provide the lttng-tools package which provides the utilities
required to handle tracing.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-03-08 11:51:26 +00:00
Hirokazu Honda
9109bcf22c subprojects: Add libyuv and built if -Dandroid=enabled
Android HAL adaptation layer may need image processing, for
example, scaling and format conversion. Libyuv is a general image
processing. This adds libyuv to subprojects, so that it is forked
locally and can be used with Android HAL implementation code.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-02-04 05:03:53 +02:00
Laurent Pinchart
7d35c771c0 cam: Use libevent to implement event loop
To prepare for removal of the EventDispatcher from the libcamera public
API, switch to libevent to handle the event loop.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-11-15 22:21:23 +02:00
Paul Elder
f4420ef8bf README, meson: Add dependency on ply and jinja2 for IPA interface generation
Specify in the readme and meson file that we depend on python3-ply and
python3-jinja2 for generating the IPA interface.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-11-11 19:23:16 +09:00
Paul Elder
fcc6d4bd76 libcamera: tracing: Implement tracing infrastructure
Implement tracing infrastructure in libcamera. It takes .tp files, as
required by lttng, and generates a tracepoint header and C file, as lttng
requires. meson is updated accordingly to get it to compile with the
rest of libcamera. Update the documentation accordingly.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-11-03 11:07:21 +09:00
Ricardo Ribalda
da81e368e7 meson: Bump meson version to 0.51
Version 0.51 allows, among others, checking for python modules, which is
a required feature.

It is also now easily accessible: it is in stable distros such as Debian
testing, or in pip:

https://tracker.debian.org/pkg/meson
https://pypi.org/project/meson/

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-09-24 21:08:34 +03:00
Ricardo Ribalda
f08b720acc README: Add missing dependency for documentation
Doxygen fails to create the documentation with this message:

[145/276] Generating doxygen with a custom command
sh: 1: dot: not found
error: Problems running dot: exit code=127, command='dot', arguments='"/home/user/libcamera/build/Documentation/api-html/inline_dotgraph_1.dot" -Tpng -o "/home/user/libcamera/build/Documentation/api-html/dot_inline_dotgraph_1.png"'
sh: 1: dot: not found
error: Problems running dot: exit code=127, command='dot', arguments='"/home/user/libcamera/build/Documentation/api-html/inline_dotgraph_1.dot" -Tcmapx -o "/home/user/libcamera/build/Documentation/api-html/dot_inline_dotgraph_1.map"'
[276/276] Linking target test/utils

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-09-24 21:08:25 +03:00
Ricardo Ribalda
507a94d904 README: Add missing libtiff-dev package for qcam
Without it:

Run-time dependency libtiff-4 found: NO (tried pkgconfig and cmake)

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-09-24 21:08:23 +03:00
Ricardo Ribalda
dff416a84b README: Add missing package for Qt5 tools
Without it:

Program /usr/lib/x86_64-linux-gnu/qt5/bin/lrelease found: NO
Program lrelease-qt5 found: NO
Program lrelease found: NO found  but need: '== 5.14.2'

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-09-24 21:08:11 +03:00
Ricardo Ribalda
20177249c0 README: Move pkg-config to Meson section
pkg-config it is not only used to detect libudev-dev, it is used for
detecting gstreamer and others. So it is more correct to place it on the
Meson Build system section.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-09-24 21:08:06 +03:00
Ricardo Ribalda
ad55da5713 README: Add libboost to list of dependencies
Raspberry Pi IPA, which is enabled by default, requires libboost to
compile.
Specify in the documentation its dependencies and how to disable the
IPA.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-09-24 21:08:03 +03:00
Ricardo Ribalda
c84d64e305 README: Move the required dependencies to the top
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-09-24 21:07:59 +03:00
Ricardo Ribalda
b30c8b5848 README: Unify dependency names
All the dependencies are for libcamera, so we should move all the
packages under this paragraph, or make a paragraph for Meson, and a
second one for python3-yaml. I think the later is more clear.

Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-09-24 21:07:53 +03:00
Laurent Pinchart
b382f67c83 libcamera: Make IPA module signing mandatory for the meantime
IPA module signing is optional, but when not available due to missing
dependencies, we hit failures due to a non fully implemented IPA
isolation. Make module signing mandatory until isolation is functional.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-04-16 17:37:41 +03:00
Laurent Pinchart
06260fdfd6 libcamera: Document dependencies for IPA module signing
Document the dependency on libgnutls28-dev and openssl for IPA module
signing int he README.rst file. While at it, sort the entries
alphabetically.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-04-16 17:37:39 +03:00
Laurent Pinchart
ca9ee2127f licenses: Add SPDX headers to RST documentation
The documentation files are licensed under CC-BY-SA-4.0, but this has
never been specified explicitly. Add corresponding SPDX headers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-04-15 19:51:56 +03:00
Nicolas Dufresne
6f344f8942 gst: Document dependencies and quick usage
This is a quick startup guide allowing to build and use the GStreamer element
from the libcamera source tree.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-03-07 01:58:08 +02:00
Laurent Pinchart
30f9624f89 README: Remove duplicated line
The commit 2de78434ca ("meson: Bump required version to 0.47")
included an extra duplicated line (my bad, the issue happened when
applying). Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-01-17 01:34:51 +02:00
Nicolas Dufresne
2de78434ca meson: Bump required version to 0.47
This is needed to use option type 'feature'. This is a tri-state
(auto/enabled/disabled) which comes with utility to enable them all, or
disabled them all to avoid any dynamic selection happening. It can also
be used as value to any "required" field.

This will be used in GStreamer support. If you don't have a recent enough
meson in your distribution, you can always install or upgrade your version
using pip3.

  pip3 install --user meson
  pip3 install --user --upgrade meson

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-01-17 01:17:18 +02:00
Ezequiel Garcia
97a5855f37 README: Simplify a bit the build instructions
Less typing for the same result.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-11-18 02:28:55 +02:00
Laurent Pinchart
9d1c26588b Documentation: Add git clone information to Getting Started
As the Getting Started section is displayed on the website, it should
contain commands related to cloning the repository.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-10-24 02:24:35 +03:00
Laurent Pinchart
cf596d8dfa Documentation: Hide the Getting Started information
The Getting Started information makes little sense on the generated
documentation, as a developer with documentation compiled from a local
libcamera source tree has already got started. We however want to keep
the information in the top-level README.rst as it is useful there.

In order to hide the Getting Started information from the front page
while keeping it in README.rst, add comments to delimitate sections of
README.rst, and include only a subset of the file in the front page.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-10-23 17:41:09 +03:00
Laurent Pinchart
8ea6912c96 libcamera: controls: Auto-generate control_ids.h and control_ids.cpp
Bring back auto-generation of control ids. In this version, both the
header and the source files are generated from a single YAML file that
stores all control definitions. This allows centralising controls in a
single file, while the previous version required keeping both
declarations (in a header) and documentation (in a the source) in sync
manually.

Using YAML as a format to store control definitions is a trade-off
between ease of use (there are many YAML parsers available) and
simplicity (XML was considered, but would have lead to more complex
processing). A new build time dependency is added on python3-yaml, which
should be available as a package in all distributions and build
environments.

The YAML format is likely to change over time as we improve
documentation of controls, the first version simply copies the
information currently available. Future improvements should also include
a YAML schema to validate the YAML source file.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-10-05 20:02:51 +03:00
Kieran Bingham
a146cdbf20 readme: Provide build requirements
Provide an initial list of build dependancies for Debian based systems.
Other distributions will be added separately.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-08-16 08:51:28 +01:00
Kieran Bingham
2b3cb4f37b readme: Move index page content to README
Move the introduction content from the index.rst to the README.rst so
that it can also be found quickly from the top level.

Include the README.rst directly into the index.rst to continue serving
it as the front page material.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-08-16 08:51:28 +01:00
Kieran Bingham
abc63afca4 readme: Convert from Markdown to RST
The Documentation and top-level README both serve to provide information
to new developers and users of libcamera.

Currently our README.md is sparse, and should be expanded with more
useful information such as build requirements as well as compilation
directions.

Any information provided in the README also serves a purpose in the main
documentation and website and could be a cause of duplicated content.

To allow direct integration of the top level README document into our
sphinx documentation (and thus the libcamera.org website) convert the
README.md into ReSTructured text format.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-08-16 08:51:28 +01:00