Commit graph

11 commits

Author SHA1 Message Date
Niklas Söderlund
723a6356c8 libcamera: add dependency on libudev
The device enumeration will depend on libudev, add the dependency to the
build system. This should be turned into a optional dependency once a
device enumerator not using udev is supported.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-12-31 00:58:03 +01:00
Niklas Söderlund
8c10082a9e libcamera: Add Camera class
Provide a Camera class which represents our main interface to handling
camera devices. This is a rework of Kieran's initial proposal and
Laurent's documentation of the file changed to fit the device
enumerators needs.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2018-12-31 00:57:58 +01:00
Laurent Pinchart
907602eab5 libcamera: log: Add a debug log level
Many of the message logged by the library will be debug messages, we
thus need a debug log level.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-12-19 14:11:25 +02:00
Jacopo Mondi
7dc517ca6b build: Define library private include path
Separate declaration of library internal inclusion path.
This will be used by tests, developed outside of library code, that need to
include parts of the library internal APIs and can re-use the here defined
variable.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2018-12-19 10:30:44 +01:00
Laurent Pinchart
6ab3ff4501 libcamera: log: Document the LogMessage class
Fix Doxygen build warnings by adding the missing documentation for the
LogMessage class.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-12-12 20:45:39 +02:00
Laurent Pinchart
b4351e1a6b libcamera: log: Fix Doxygen documentation
Now that the documentation can be compiled, Doxygen throws a few
warnings due to incorrect enum field naming. Fix it.

The \file block needs to be named after the header file in order for
Doxygen to document any global function, variable, typedef or enum
defined in the header (as documented in the Doxygen manual under the
\file command). We thus need to use log.h as the file name. No \file
block is needed for the .cpp file, as we don't want to generate
documentation for internal private globals.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-12-12 20:45:39 +02:00
Laurent Pinchart
830031892b build: Clean up file names variables
The build system defines two variables, public_api and sources, that
store the names of the public headers and the source files respectively.
These files will need to be referenced when generating documentation
from source code, so let's make the variable names more descriptive:

- Rename public_api to libcamera_api and use the files() function
- Rename sources to libcamera_sources
- Add a libcamera_headers variable to hold the internal headers

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-12-11 20:28:34 +02:00
Laurent Pinchart
ad8934db5b libcamera: log: Fix miscellaneous coding style issues
Those issues were pointed out during review.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-12-11 00:02:04 +02:00
Laurent Pinchart
cc7d204b2c libcamera: Use the logger instead of cout
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2018-12-06 16:43:45 +02:00
Laurent Pinchart
edbd2059d8 libcamera: Add initial logger
The logger is based on the ostream API, allowing code to log messages in
a native way. It automatically logs the time stamp, severity level, file
name and line number.

Many important features are missing, such as logging to file, logging
classes, and log filtering based on the severity level, file name and
class.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2018-12-06 16:43:04 +02:00
Laurent Pinchart
913b3ee817 Overhaul the directory structure
In order to match the directory structure of traditional projects,
rename the top-level lib/ directory to src/libcamera/. Other libraries
developed as part of the project will later find a home in src/.

Split the libcamera header files in three categories: public headers
describing the public API in include/libcamera/, internal headers
describing the internal API in src/libcamera/include/, and private
headers local to one or a small number of compilation units along the
corresponding .cpp files. As no internal header exists yet the
src/libcamera/include/ directory is created empty as the build system
would fail otherwise.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2018-12-06 16:34:01 +02:00