Commit graph

704 commits

Author SHA1 Message Date
Laurent Pinchart
72afcbb087 libcamera: geometry: Use Size to store min and max in SizeRange
Instead of storing four integers for the minimum and maximum width and
height in the SizeRange class, use two instance of the Size class for
the minimum and maximum sizes.

While it at replace the mention of image size with size in the SizeRange
documentation, as the Size class isn't limited to image sizes.

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-04-18 18:13:06 +03:00
Laurent Pinchart
e7f446e1ed libcamera: geometry: Sort classes alphabetically
Move the Size class before the SizeRange class. No functional change.

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-04-18 18:13:05 +03:00
Laurent Pinchart
9c90781332 libcamera: camera: Log requested configuration in configureStreams()
The IPU3 pipeline handler logs the requested configuration in its
configureStreams() handler. This is useful for other pipeline handlers
as well, move it to the Camera class.

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-04-18 18:13:00 +03:00
Laurent Pinchart
8f6f63a208 libcamera: log: Mark Loggable::_log() methods as const
The methods don't modify the object instance, mark them as const. This
allows using the LOG() macro from a const method of a Loggable object.

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-04-18 18:12:59 +03:00
Laurent Pinchart
9e3f9c5261 Install the cam and qcam utilities
The cam and qcam utilities are meant to be shipped with libcamera,
install them by default.

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-04-18 18:12:58 +03:00
Jacopo Mondi
ee027781b4 libcamera: buffer: Store Request reference in Buffer
Add to the Buffer class methods to set and retrieve a reference to the
Request instance the buffer is part of.

As buffers outlive the Request they are associated with, the reference
is only temporary valid during the buffer completion interval (from when
the buffer gets queued to Camera for processing, until it gets marked as
completed).

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-04-18 15:37:59 +02:00
Jacopo Mondi
0527ba92ad libcamera: request: Expose the Stream to Buffers map
Add to the Request class a method to access the map of Stream to Buffer.

With the introduction of multiple stream support, pipeline handler
should be able to access the map of streams at request queueing time.

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-04-18 15:36:48 +02:00
Jacopo Mondi
e671485989 libcamera: camera: Validate Request before queueing it
Extend the Request::prepare() operation to validate the request before
preparing it. Return an error if the request is invalid, which for now
is limited to ensuring that the request contains at least one buffer.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2019-04-18 15:36:37 +02:00
Jacopo Mondi
571d16b539 libcamera: request: Add hasPendingBuffers() method
Add method to verify if a request has pending buffers yet to be
completed.

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-04-18 15:35:34 +02:00
Jacopo Mondi
7b7c8f06a0 libcamera: v4l2_device: Propagate releaseBuffers() error
The error code returned by requestBuffers(0) was not propagated to the
caller. Fix it.

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-04-18 15:35:18 +02:00
Jacopo Mondi
da341a4dd1 libcamera: camera: Don't call freeBuffer() on allocateBuffer() error
Do not assume the freeBuffer() function can handle allocateBuffer()
method failures, as error handling and clean up should be performed
by allocateBuffer() method itself.

Perform clean-up on allocations failures in the IPU3 pipeline handler,
now that freeBuffers() is not called anymore.

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-04-18 15:34:54 +02:00
Jacopo Mondi
911bc4aa41 libcamera: camera: Pass the stream set to allocate/freeBuffers()
Pipeline handlers might need to perform allocation of internal buffers,
setup operations, or simple sanity check before going into the
per-stream buffer allocation.

As of now, PipelineHandler::allocateBuffers() is called once for each
active stream, leaving no space for stream-independent configuration.

Change this by providing to the pipeline handlers the full set of active
streams, and ask them to loop over them to perform per-streams
memory allocations and freeing.

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-04-17 15:42:24 +02:00
Jacopo Mondi
4e1dc9004f libcamera: stream: Make Stream inheritable
In preparation for multiple streams support prepare to allow sub-classing
the Stream class by removing the 'final' specifier from the class
definition and make its private members protected.

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-04-16 14:55:58 +02:00
Niklas Söderlund
7726cba16f libcamera: pipeline_handler: Add missing forward declaration of StreamUsage
When switching to stream usages in the PipelineHandler StreamUsage was
was not forward declared as it should and was hid by other include
files, fix this.

Fixes: 20a6455e0b ("libcamera: camera: Add support for stream usages")
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-04-14 13:55:18 +02:00
Niklas Söderlund
8b26fec690 libcamera: Add missing header files to meson.build
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-04-09 17:36:30 +02:00
Niklas Söderlund
248dc97024 cam: Allow cameras with more than one stream
The libcamera API and the cam tool are now ready to make use of cameras
with more than one stream. Remove the limitation in the tool which
disallows cameras that provide more than one stream.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-04-09 17:01:00 +02:00
Niklas Söderlund
c1df18cab6 cam: Extend request completion handler to deal with multiple streams
The completion handler needs to handle all buffers in the request. Solve
this by iterating over all buffers in the completed request. The streams
are named automatically streamX, where X is the order in which the
stream was passed to configureStream().

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-04-09 17:00:27 +02:00
Niklas Söderlund
e65e5d59f4 cam: Add support to specify multiple stream configurations with roles
Extend the cam tool to allow configuring more than one stream. Add an
optional parameter to the --stream option to specify a usage role for
the stream. The stream role is passed to libcamera to give it control
over which streams to use.

To support multiple streams, creation of requests needs to be reworked
to limit the number of requests to match the stream with the least
number of buffers. This should be improved in the future as the tool and
the library evolve.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-04-09 16:59:19 +02:00
Niklas Söderlund
47a9f357fe cam: Extend BufferWriter to include a stream name in file path
To be able to write multiple buffers captured in the same request (and
hence having the same sequence number) the buffer writer needs to name
each file uniquely. Add a stream name to the writer function which the
buffer writer can add to the part of the pattern it already expands to
the sequence number. As cam only supports one stream, hard code the name
to stream0.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-04-09 16:59:19 +02:00
Niklas Söderlund
ea34d1a574 cam: Rename --format to --stream
More than format information needs to be supplied for each stream to
allow multiple streams to be configured. Rename the option and adapt all
usages of it. There is no functional change except the rename.

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>
2019-04-09 16:59:19 +02:00
Niklas Söderlund
b0c730e330 libcamera: Switch to CameraConfiguration
Implement the camera configuration thru out the library, tests, cam and
qcam tools.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-04-09 16:59:19 +02:00
Niklas Söderlund
9a7dc3ce7f libcamera: camera: Add CameraConfiguration
To properly support both multiple streams and stream usages the library
must provide a method to map the stream usages to the returned streams
configurations. Add a camera configuration object to handle this
mapping.

Applications can iterate over the returned camera configuration to
retrieve the streams selected by the library in the same order as the
usages it provided to the library.

Applications can use the operator[] to retrieve the stream pointer and
the stream configuration. Using a numerical index retrieves the stream
pointer, the numerical indexes corresponds to the insertion order of
usages in the CameraConfiguration, using the stream pointer retrieves
the stream's configuration.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-04-09 16:57:53 +02:00
Niklas Söderlund
20a6455e0b libcamera: camera: Add support for stream usages
Instead of requesting the default configuration for a set of streams
where the application has to figure out which streams provided by the
camera is best suited for its intended usage, have the library figure
this out by using stream usages.

The application asks the library for a list of streams and a suggested
default configuration for them by supplying a list of stream usages.
Once the list is retrieved the application can fine-tune the returned
configuration and then try to apply it to the camera.

Currently no pipeline handler is prepared to handle stream usages but
nor did it make use of the list of Stream IDs which was the previous
interface. The main reason for this is that all cameras currently only
provide one stream each. This will still be the case but the API will be
prepared to expand both pipeline handlers and applications to support
streams usages.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-04-05 22:07:47 +02:00
Niklas Söderlund
70e53be538 libcamera: stream: Add basic stream usages
In preparation of reworking how a default configuration is retrieved
from a camera add stream usages. The usages will be used by applications
to describe how they intend to use a camera and replace the Stream IDs
when retrieving default configuration from the camera using
streamConfiguration().

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-04-05 22:07:24 +02:00
Niklas Söderlund
58f1ad3c79 libcamera: Make geometry.h a public header
Make the geometry header public so it can be used by the API facing
applications.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-04-05 21:47:34 +02:00
Niklas Söderlund
024b4ea514 test: camera: Remove test for bad Stream IDs
In preparation of reworking how a default configuration is retrieved
from a camera remove test that stream IDs must be valid as the data type
passed to Camera::streamConfiguration() will change. This change is in
preparation for an invasive change.

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>
2019-04-04 00:22:14 +02:00
Niklas Söderlund
8f08880082 test: camera: Remove streams argument from configurationValid()
In preparation of reworking how a default configuration is retrieved
from a camera remove the streams and validation using the stream when
judging if a camera configuration is valid. This is needed as once
stream usage hints are added applications will no longer fetch default
configuration based on Stream IDs so using them to verify the returned
format is not useful.

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>
2019-04-04 00:21:47 +02:00
Niklas Söderlund
30fe5bde5f cam: Rework how streams configuration is prepared
In preparation of reworking how a default configuration is retrieved
from a camera separate preparation of stream configuration and
application into two different functions. Reason for this is that
preparation of camera configuration will become more complex.

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>
2019-04-04 00:21:22 +02:00
Kieran Bingham
d5ca33f6c7 qcam: meson: Use pkg-config method for qt5 dependencies
Meson searches for qmake to determine if QT5 is available to support the
optional qcam component.

When cross compiling, meson can incorrectly identify the host qmake
which will cause incorrect linkage and usage of system headers.

Set the dependency method to specify pkg-config which resolves the
issue.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-04-03 18:03:56 +07:00
Kieran Bingham
78552c818b libcamera: ipu3: Catch return value when disabling links
Ensure that any error from the disableLinks() call during match() is
propogated to the caller.

Fixes: d698ed2749 ("libcamera: ipu3: Create ImgUDevice class")
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-04-03 18:03:41 +07:00
Jacopo Mondi
a8cab93b18 libcamera: ipu3: Enable ImgU media links
As the lengthy comment reports, link enable/disable is not trivial, as
links in one ImgU instance interfere with capture operations in the
other one. As it is not yet clear if this behaviour is intended, as of
now reset the media graph during pipeline's match() and enable the
required links at streamConfiguration time.

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-04-03 10:11:17 +02:00
Jacopo Mondi
b95d12ac31 libcamera: ipu3: Limit resolution to 2560x1920
As the procedure to configure the intermediate sizes and the alignement
requirements of the ImgU device have not been clarified yet, return as
default configuration the (2560x1920) resolution that has been validated
for both cameras.

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-04-03 10:11:17 +02:00
Jacopo Mondi
9a1cdb7500 libcamera: ipu3: Set stream configuration
Use the cached sensor maximum resolution and the pixel format
generated by the ImgU output devices as default stream configuration.

While at it, replace the hardcoded numerical value for the number of
buffers with a named constexpr.

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-04-03 10:11:17 +02:00
Jacopo Mondi
4ce2f06a1b libcamera: ipu3: Connect CIO2 and ImgU bufferReady signals
Connect the CIO2 output bufferRead signal to a slot that simply
queue the received buffer to ImgU for processing, and connect the ImgU
main output bufferReady signal to the cameraData slot that notifies
to applications that a new image buffer is available.

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-04-03 10:11:17 +02:00
Jacopo Mondi
b7ddedaf42 libcamera: ipu3: Queue requests to ImgU
Implement queueRequest for the IPU3 pipeline manager. When a request is
queued, a new buffer is queued to the ImgU output for capture.

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-04-03 10:11:17 +02:00
Jacopo Mondi
88316d63f0 libcamera: ipu3: Implement camera start/stop
Start and stop video devices in the pipeline.

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-04-03 10:11:17 +02:00
Jacopo Mondi
4f370e1001 libcamera: ipu3: Implement memory handling
Implement buffer allocation and release in IPU3 pipeline handlers.

As the pipeline handler currently supports a single stream, provide two
internal buffer pools for 'viewfinder' and 'stat' video devices, and
export the 'output' video device buffers to the stream's pool. This
works around the fact that the ImgU requires buffers to be queued on all
its outputs, even when they are not in use.

Share buffers between the CIO2 output and the ImgU input video devices,
as the output of the former should immediately be provided to the
latter for further processing.

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-04-03 10:11:17 +02:00
Jacopo Mondi
83458e5712 libcamera: ipu3: Apply image format to the pipeline
Apply the requested stream configuration to the CIO2 device, and
propagate formats through the the ImgU subdevice and its input and
output video devices.

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-04-03 10:11:17 +02:00
Jacopo Mondi
d698ed2749 libcamera: ipu3: Create ImgUDevice class
Group ImgU components in a class associated with a camera at camera
registration time and provide an intialization method to create and open
all video devices and subdevices of the ImgU.

Statically assign imgu0 to the first camera and imgu1 to the second one
and limit support to two cameras. This will have to be revised in the
future.

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-04-03 10:11:17 +02:00
Jacopo Mondi
2be53dc605 libcamera: ipu3: Cache the sensor size and format
Cache the sensor maximum size and the media bus code used to produce
it.

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-04-03 10:11:17 +02:00
Jacopo Mondi
cfd2fff2cd libcamera: ipu3: Create CIO2Device class
Group CIO2 components (cio2, csi2 and image sensor) in a class
associated with the CameraData, to ease management and initialization of
CIO2 unit at camera registration time. A CIO2 unit will always be
associated with a single Camera only.

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-04-03 10:11:17 +02:00
Jacopo Mondi
289343a24a libcamera: geometry: Add Size structure
Add a simple Size structure that contains an image width and height.

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-04-03 10:11:17 +02:00
Jacopo Mondi
05a8608f1f libcamera: geometry: Add 0-initialized SizeRange constructor
Add constructor to SizeRange which initialize all the size range fields
to 0.

While at there make the in-line constructor declarations respect the
coding style by moving braces to a new line.

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-04-03 10:11:17 +02:00
Kieran Bingham
88646061e0 libcamera: utils: Use internal secure_getenv() implementation
The secure_getenv() call is not provided by all C libraries. Support
this feature by implementing our own version.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-04-03 13:56:31 +07:00
Kieran Bingham
0e1a809525 libcamera: utils: Use internal basename implementation.
Differing implementations of basename() exist, some of which may modify
the content of the string passed as an argument.

The implementation of basename() is trivial, thus to support different
C librariese, provide our own version which accepts and returns a const
char *.

Update the call sites to use the new implementation.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-04-03 13:56:10 +07:00
Kieran Bingham
abda899fa9 meson: options: Document the options
Re-order the project options and add documentation which will be
presented by 'meson configure'.

This produces the following extra information:

Project options:
  Option        Current Value Possible Values Description
  ------        ------------- --------------- -----------
  documentation true          [true, false]   Generate the project documentation
  tests         true          [true, false]   Compile and include the tests

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-04-03 11:44:04 +07:00
Kieran Bingham
4635df7006 meson: Re-order the optional components
Re-order the optional components to make them alphabetical, and fix up
the indentation to use two spaces as required by meson. A comment is
added to highlight that these optional components are enabled by
default.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-04-03 11:44:04 +07:00
Laurent Pinchart
80e236e19b qcam: Add JPEG format support
When the camera provides MJPEG, use the QImage JPEG decompression code
to convert that to RGB.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-04-02 17:24:41 +03:00
Jacopo Mondi
29f323eea8 libcamera: stream: Qualify 'Camera' friend directive
Align the Stream class to all other classes in the code base to use the
'class' qualifier in 'friend' declarations.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2019-04-02 12:59:20 +02:00
Jacopo Mondi
cf4bb3fb2d libcamera: stream: Remove 2 empty lines
Remove two empty lines. Cosmetic change only.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2019-04-02 12:58:53 +02:00