Commit graph

5583 commits

Author SHA1 Message Date
Laurent Pinchart
9d29af143b libcamera: media_device: Add disconnected signal
The signal is emitted when the hardware device corresponding to the
media device is unplugged. This will trigger the full unplug handling
chain.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-01-24 22:24:13 +02:00
Laurent Pinchart
4f043b05e7 libcamera: device_enumerator: Reference-count MediaDevice instances
The MediaDevice class will be the entry point to hot-unplug, as it
corresponds to the kernel devices that will report device removal
events. The class will signal media device disconnection to pipeline
handlers, which will clean up resources as a result.

This can't be performed synchronously as references may exist to the
related Camera objects in applications. The MediaDevice object thus
needs to be reference-counted in order to support unplugging, as
otherwise pipeline handlers would be required to drop all the references
to the media device they have borrowed synchronously with the
disconnection signal handler, which would be very error prone (if even
possible at all in a sane way).

Handle MedieDevice instances with std::shared_ptr<> to support this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-01-24 22:24:11 +02:00
Niklas Söderlund
5b02e03199 libcamera: camera: Associate cameras with their pipeline handler
The PipelineHandler which creates a Camera is responsible for serving
any operation requested by the user. In order forward the public API
calls, the camera needs to store a reference to its pipeline handler.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Changes since v1:

- Create pipeline handlers is shared pointers, make them inherit from
  std::enable_shared_from_this<> and stored them in shared pointers.
2019-01-24 22:24:11 +02:00
Laurent Pinchart
a29b7fc7d5 libcamera: pipeline_handler: Declare factory children classes as final
Nothing should inherit from the factory classes created by the
REGISTER_PIPELINE_HANDLER() macro. Declare them as final instead of only
declaring their create() method final.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-01-24 22:24:08 +02:00
Laurent Pinchart
e597598abf libcamera: pipeline_handler: Store the camera manager pointer
Instead of passing the camera manager pointer to the match() function,
and later to more PipelineHandler functions, store it in the
PipelineHandler::manager_ member variable at construction time and
access it from there.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-01-24 22:24:02 +02:00
Laurent Pinchart
eb1ecc92ce tests: event-dispatcher: Add processEvents() interruption test
Test that the EventDispatcher::interrupt() function correctly interrupts
the processEvents() function, both when called before processEvents()
and when called while it is running.

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>
2019-01-23 18:51:56 +02:00
Laurent Pinchart
4d470eb37f libcamera: event_dispatcher: Add interrupt() function
The new interrupt() function allows interrupting in-progress blocking
processEvents() calls. This is useful to stop running event loops.

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>
2019-01-23 18:51:56 +02:00
Laurent Pinchart
d370c1b46e libcamera: event_dispatcher_poll: Handle interrupted ppoll() calls
The ppoll() call can be interrupted if a signal is delivered. Handle the
EINTR error code gracefully by restarting the call. This fixes the
event-dispatcher test failure.

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>
2019-01-23 18:51:56 +02:00
Laurent Pinchart
83c73c39c5 tests: Test event dispatcher interruption by signal
Add a test to verify that the event dispatcher correctly restarts event
processing when interrupted by a signal. The test currently fails as
this feature isn't implemented.

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>
2019-01-23 18:51:56 +02:00
Niklas Söderlund
d32dc0c1c8 libcamera: fix odd include file hierarchy
There is no need for pipeline_handler.h to include camera.h, instead it
should be included in the source file which needs it;
camera_manager.cpp.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-01-23 16:59:12 +01:00
Kieran Bingham
6b546603ac libcamera: log: Fix two typos
Two incorrect spellings are fixed.
 'logr' -> 'log'
 'environement' -> 'environment'

Fixes: 747ace042c ("libcamera: log: Get log levels from the environment")
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

The log levels configuration is stored in category:level pairs, not
category=value. Fix the documentation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-01-23 17:46:14 +02:00
Kieran Bingham
e5163f54d4 libcamera: v4l2device: Obtain device capabilities
The capabilities structure from the kernel can return capabilities of the
driver, or potentially more specific device capabilities.

Handle this with an inline function 'device_caps()' to return the device
specific capabilities when available, or fall back to the driver capabilities
otherwise.

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-01-23 14:33:34 +00:00
Laurent Pinchart
a22dcaaa78 cam: options: Don't implement move semantics for OptionsParser::Options
The compiler creates a move constructor automatically when none is
supplied, and it does the right thing by default in this case. Using
std::move() inside the function prevents the compiler from doing
return value optimization and actually hinders performances. Using
std::move() in the caller is unnecessary, the move constructor is used
automatically by the compiler.

For all these reasons remove the tentative optimization that resulted in
worse performances and worse code.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-01-22 20:44:04 +02:00
Kieran Bingham
29c3b54f0c libcamera: camera_manager: Return EBUSY if enumerator exists
In the case that someone calls CameraManager::start() and it has already
started/enumerated, instead of returning -ENODEV, return -EBUSY.

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-01-22 15:15:14 +00:00
Niklas Söderlund
f10f1b8bb1 libcamera: media_device: fix typo in documentation for MediaDevice::deviceNode()
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
2019-01-22 16:10:11 +01:00
Jacopo Mondi
8abff82a9c libcamera: ipu3: Use log categories
Log the IPU3 pipeline using IPU3 log category

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2019-01-22 16:01:54 +01:00
Niklas Söderlund
a9685c508f libcamera: device_enumerator: extend documentation of DeviceMatch
Extend the documentation of the intended usage of DeviceMatch. The
DeviceMatch needs enough information to be able to uniquely identify a
specific media device.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-01-22 15:05:05 +01:00
Niklas Söderlund
70b0518ba7 libcamera: pipeline: uvcvideo: add pipeline handler for uvcvideo
Provide a pipeline handler for uvcvideo devices. The entity names for
UVC devices are different for different cameras so matching on entity
names is not possible in the generic case. This leaves options to create
specialized UVC pipeline handlers if needed to fit a specific model's
needs.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-01-22 14:54:20 +01:00
Niklas Söderlund
5db44e6da7 libcamera: media_device: expose media graph model name
Pipeline handlers such as the upcoming ucvideo handler need the model
name to properly name the Camera objects they create. Store the model
name when querying the media device info and handle it in a similar
fashion as the driver name which is already retrieved.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-01-22 14:54:20 +01:00
Jacopo Mondi
1af83ca6df libcamera: Global s/devnode/deviceNode rename
Do not use the abreviated version for members, variables and getter
methods.

Library-wise rename, no intended functional changes.

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2019-01-22 14:14:04 +01:00
Jacopo Mondi
d18d25bde3 libcamera: v4l2_device: Add MediaEntity contructor
Construct a V4L2Device from a MediaEntity device node path. While at
there mark constructor as explicit to avoid copy-construction.

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2019-01-22 14:14:04 +01:00
Laurent Pinchart
f5e48ebf44 cam: Extract option parser to separate file
And turn it into an OptionsParser object.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-01-22 14:04:09 +01:00
Niklas Söderlund
fba3d04607 cam: add utility to control cameras
Provide a utility to interact with cameras. This initial state is
limited and only supports listing cameras in the system and selecting a
camera to interact with.

There is not much a interacting possible yet with a camera so the tool
simply exercise the API to get hold of a camera.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-01-22 14:03:41 +01:00
Laurent Pinchart
1369c0b7c3 utils: checkstyle: Add support for clang-format
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>
2019-01-22 14:30:00 +02:00
Laurent Pinchart
9958387034 libcamera: Add clang-format style
The initial clang-format options are copied from the Linux kernel style,
with the following differences:

- Use C++11
- Remove the line length limit (to keep the original line breaks)
- Don't indent access modifiers
- Allow short inline functions on a single line
- Move braces to next line after class definition
- Keep braces on the line of the namespace definition
- Replace for-each macros

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-01-22 14:30:00 +02:00
Jacopo Mondi
e410062003 test: pipeline: IPU3: Add IPU3 pipeline test
Add test for the Intel IPU3 pipeline that lists all the cameras
registered in the system and verifies the result matches the expected.

This test is meant to be run on IPU3 platforms, it gets skipped
otherwise.

Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2019-01-22 11:16:28 +01:00
Jacopo Mondi
93734d7fe0 libcamera: pipeline: Add Intel IPU3 pipeline
Add a pipeline handler for the Intel IPU3 device.

The pipeline handler creates a Camera for each image sensor it finds to be
connected to an IPU3 CSI-2 receiver, and enables the link between the two.

Tested on Soraka, listing detected cameras on the system, verifying the
pipeline handler gets matched and links properly enabled.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2019-01-22 11:16:28 +01:00
Laurent Pinchart
8b8ae52134 libcamera: Use log categories
Use log categories in the whole existing code base.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-01-21 21:47:25 +02:00
Laurent Pinchart
457208178c libcamera: log: Get log output file from the environment
If the LIBCAMERA_LOG_FILE environment variable is set, open the file it
points to and redirect the logger output to it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-01-21 21:47:25 +02:00
Laurent Pinchart
747ace042c libcamera: log: Get log levels from the environment
Set the log level for each log category from the environment variable
LIBCAMERA_LOG_LEVELS.

The variable contains a comma-separated list of category:level pairs,
and category names can include wildcards.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-01-21 21:47:25 +02:00
Laurent Pinchart
63675b6dcf libcamera: log: Add log categories
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>
2019-01-21 21:47:17 +02:00
Jacopo Mondi
5c85ef5883 libcamera: media_object: Set devnode in MediaEntity
The MediaEntity::setDeviceNode() function was designed to set the device
node path associated with a MediaEntity. The function was there, but the
devnode_ member field was never actually set. Fix this.

While at there add a getter method for the devnode_ member as it will
soon be used.

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>
2019-01-21 11:35:44 +01:00
Jacopo Mondi
ec53057f0a libcamera: media_object: Add functions to entities
Media entities convey information about their main function in the
'function' field of 'struct media_v2_entity'.

Store the main function in the MediaEntity function_ class member and provide
a getter function for that.

While at there update comments, keep the MediaPad description in sync
with the MediaEntity one and remove a stale TODO entry.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2019-01-21 11:35:30 +01:00
Laurent Pinchart
21ff749a79 libcamera: camera: Handle camera objects through shared pointers
The Camera class is explicitly reference-counted to manage the lifetime
of camera objects. Replace this open-coded implementation with usage of
the std::shared_ptr<> class.

This API change prevents pipeline handlers from subclassing the Camera
class. This isn't deemed to be an issue. Mark the class final to make
this explicit.

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>
2019-01-21 11:13:53 +02:00
Laurent Pinchart
f3695e9b09 libcamera: camera_manager: Register cameras with the camera manager
Cameras are listed through a double indirection, first iterating over
all available pipeline handlers, and then listing the cameras they each
support. To simplify the API make the pipeline handlers register the
cameras with the camera manager directly, which lets the camera manager
easily expose the list of all available cameras.

The PipelineHandler API gets simplified as the handlers don't need to
expose the list of cameras they have created.

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>
2019-01-21 11:13:49 +02:00
Laurent Pinchart
32bf7ef239 libcamera: camera_manager: Use std::unique_ptr to store event dispatcher
The CameraManager takes ownership of the dispatcher passed to the
setEventDispatcher() function. Enforces this by using std::unique_ptr<>.

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>
2019-01-21 11:13:45 +02:00
Laurent Pinchart
0908669834 Documentation: coding_style: Add object ownership rules
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>
2019-01-21 11:13:40 +02:00
Laurent Pinchart
bd0c818023 libcamera: signal: Enable documentation generation from signal.h file
signal.cpp is missing a \file signal.h Doxygen directive, preventing
documentation from being generated for the Signal class. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
2019-01-21 10:52:30 +02:00
Laurent Pinchart
6c27bada1d Documentation: coding_style: Add move semantics to C++11 features
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>
2019-01-21 10:52:30 +02:00
Laurent Pinchart
576c9454cf libcamera: utils: Don't use C++17 nested namespaces
Nesting namespace names in a single namespace declaration is a C++17
feature. As libcamera depends on C++11 only, nest two separate namespace
declarations instead.

Reported-by: Shik Chen <shik@google.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-01-19 00:52:15 +02:00
Kieran Bingham
479264dfca test: v4l2_device: Add test suite and initial test
Provide a base class to construct a v4l2_device object for further tests
and an initial test which validates the FD handle can not be leaked.

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-01-17 21:55:27 +00:00
Kieran Bingham
e74f3eebb4 libcamera: Add V4L2 Device object
Provide a helper V4L2 device object capable of interacting with the
V4L2 Linux Kernel APIs.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-01-17 21:55:21 +00:00
Kieran Bingham
e399a0745b libcamera: event_dispatcher_poll: Fix trivial spelling
Correct the spelling of 'notifiers'.

Fixes: 8356f8a6ab ("libcamera: Add a poll-based event dispatcher")
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-01-17 21:31:33 +00:00
Kieran Bingham
d67841a990 libcamera: log: Fix coding style warnings
The checkstyle utility highlights some minor warnings against the logger
implementation.

Fix these up.

Fixes: edbd2059d8 ("libcamera: Add initial logger")
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-01-17 21:31:33 +00:00
Kieran Bingham
5651334119 libcamera: timer: Fix 32 bit wrap
The msec parameter was multiplied as a 32 bit value when converting to
nanosecond resolution. This wraps at 4.2949 seconds, and causes timers
longer than this to fail.

Fix the multiplication to upcast to 64 bit using an unsigned long long
specifier on the multiplier.

While we're here, initialise the two integer class members in the
constructor initialiser list.

Fixes: 1a57bcb8d1 ("libcamera: Add event notification infrastructure")
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-01-17 21:31:33 +00:00
Kieran Bingham
74fb6ec3dc test: timer: Add a 32 bit wraparound test
Add a test which catches a timer running longer than the nanosecond
resolution of 32 bits.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-01-17 21:31:33 +00:00
Kieran Bingham
b523982920 test: timer: Initialise all variables
The ManagedTimer does not initialise the integer 'interval_' variable.

This is set before used, and should not break - but for completeness
(and to cover static analysers) initialise the variable in the
initialiser list.

Fixes: 034ea86802 ("test: Add timer test")

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-01-17 21:31:28 +00:00
Kieran Bingham
2b63efe092 include: linux: Import V4L2 uAPI headers from Linux v4.19
Import the following files from the Linux UAPI to keep our V4L2
interface in sync:

	media-bus-format.h
	v4l2-common.h
	v4l2-controls.h
	v4l2-mediabus.h
	v4l2-subdev.h
	videodev2.h

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-01-17 16:37:03 +02:00
Laurent Pinchart
557a53267a Documentation: coding_style: Allow C++11 variadic templates
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>
2019-01-16 18:24:27 +02:00
Laurent Pinchart
62eae99ed2 libcamera: camera_manager: Turn enumerator into a unique_ptr<>
Convey the fact that the CameraManager class owns the DeviceEnumerator
instance it creates by using std::unique_ptr<> to store the pointer.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-01-16 18:23:43 +02:00