Age | Commit message (Collapse) | Author |
|
A udev-based device enumerator is not sufficient, since libudev is an
optional dependency, or udev might fail. In these cases, we should fall
back to using sysfs to enumerate devices.
Add a DeviceEnumeratorSysfs class which is a specialization of
DeviceEnumerator that uses sysfs to enumerate media devices on the
system.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Building the documentation reports warnings,
WARNING: Project targetting '>= 0.40' but tried to use feature introduced in '0.50.0': install arg in configure_file
WARNING: Project specifies a minimum meson_version '>= 0.40' but uses features which were added in newer versions:
* 0.50.0: {'install arg in configure_file'}
Due to the usage of the directive configure_file { install: false } in
Documentation/meason.build which is introduced in meson 0.50. As we do
not wish to install the Doxyfile no install_dir is set so there is no
need to explicitly state that it should not be installed. Silence the
warning by dropping the install directive.
Fixes: 53c4d4c34fc49b95 ("Documentation: Generate source code documentation using Doxygen")
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
libcamera depends on libudev for device enumeration. It is however
useful to allow building documentation without requiring the dependency
to be installed. Make the libudev dependency optional and compile the
udev-based device enumerator out when libudev is not present.
Note that while libcamera will compile without libudev, it will not be
able to enumerate devices. A sysfs-based device enumerator is planned as
a fallback but not implemented yet.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The documentation style for the Doxygen comment blocks is inconsistent
in the library. Document the expectations and update all existing
comment blocks to match.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Using std::move() on return statement of a method or on the its returned
value prevents the compiler from implementing copy-elision. Discourage
that in the coding style document.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
When a signal is connected to a member function slot, the slot is not
disconnected when the slot object is deleted. This can lead to calling a
member function of a deleted object if the signal isn't disconnected
manually by the slot object's destructor.
Make signal handling easier by implementing a base Object class that
tracks all connected signals and disconnects from them automatically
when the object is deleted, using template specialization resolution in
the Signal class.
As inheriting from the Object class may to a too harsh requirement for
Signal usage in applications, keep the existing behaviour working if the
slot doesn't inherit from the Object class. We may reconsider this later
and require all slot objects to inherit from the Object class.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
|
|
clang-format produces better results than astyle as it can better match
the libcamera coding style. Default to clang-format over astyle, fall
back to astyle if clang-format isn't found, and add a --formatter
command line option to select a formatter manually.
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>
|
|
Log categories are used to group log messages by topic. Introduce
support for categories by making the LOG() macro variadic. Support for
configuring log level per category will be introduced in a subsequent
commit.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Object ownership is a complex topic that can lead to many issues, from
memory leak to crashes. Document the rules that libcamera enforces to
make object ownership tracking explicit.
This is a first version of the rules and is expected to be expanded as
the library is developed.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Add the move semantics (move constructor and move assignment) to the
allowed C++11 features, as we extensively use them for the unique and
shared pointers.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
We make use of the C++11 variadic templates feature in the signal&slot
implementation, mark it as allowed in the coding style documentation.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
The pipeline handlers don't define APIs, neither public not internal.
There is thus no need to generate Doxygen documentation from thoses
classes. Add them to the EXCLUDE files pattern.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
|
|
The output of the sphinx-build for our documentation is overly verbose.
Reduce this output to warnings and errors with the '-q' quiet option.
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Until we have better Sphinx + Doxygen integration, replace the relative
external link to the API documentation with a placeholder directory,
which will be populated with the Doxygen-generated doc when exporting
documentation to the website. This is needed as the Sphinx documentation
is exported to the root of the website, linking to ../api-html is thus
not possible.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Happy new year :-)
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add a link in the toctree to the API documentation.
sphinx doesn't seem to support relative external links, but we can trick
it into thinking the link is absolute by adding '#://' at the end.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The toctree is displayed in the navigation bar at the top of the page.
Add short names to the entries that replicate the names currently used
on libcamera.org.
Remove the link to the index and search pages, as the former is empty,
and the latter can be accessed directory from the navigation bar search
box.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The theme replicates the look and feel of the libcamera.org website.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Introduce a Signal class that allows connecting event sources (signals)
to event listeners (slots) without adding any boilerplate code usually
associated with the observer or listener design patterns.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Enable the QUIET mode of Doxygen so that warnings and errors from
Doxygen are more prominent in the build logs.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Provide a reference copy of the Developers Certificate of Origin.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
There's no need to add a character on the left side of the ascii art
diagrams, provided that we indent them properly. Fix it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Add a section to the coding style documentation to explain usage of the
checkstyle.py script.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The git clone command line is a (single line) block of shell code, mark
it appropriately.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The various lists in the document are not quoted blocks. Don't indent
them.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The documentation is copied mostly verbatim from the website, with small
modifications to the ascii art diagrams to make them compile.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
sphinx only requires those directories to be present because they're
referenced in the configuration file. Remove the references and the
directories.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add document to summarize the coding style adopted by libcamera.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Extend the documentation build system to automatically generate
documentation from source code using Doxygen. This is currently separate
from the sphinx documentation, and should be integrated using the
breathe (and possibly exhale) extensions.
As the Documentation/meson.build file needs to reference the variables
holding the source files, move the Documentation directory to the end of
the subdirs() in the top-level meson.build.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Use the datadir option to select the directory in which to install
documentation. This defaults to $prefix/share so this doesn't introduce
any change in the default case.
While at it use join_paths() to join patch components instead of
hardcoding the / separator.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The custom_target() function accepts an install_dir parameter. Along
with setting install to true, this can be used to replace the
install_subdir() function.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Utilise sphinx-build to generate documentation in HTML form, and
populate with some initial content.
An initial conf.py is generated from sphinx-quickstart and answering
initial questions.
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|