Age | Commit message (Collapse) | Author |
|
The Camera3RequestDescriptor class can access the number of buffers
and the frame number from the camera3_capture_request_t instead of
having the caller passing them to the constructor.
This change allows to access other fields of the capture request, such
as the capture settings.
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Add a copy constructor and assignment operator to CameraMetadata, as well
a constructor from camera_metadata_t. Also add a function getEntry to
allow getting metadata entries from CameraMetadata. This allows us to
use CameraMetadata for reading from camera_metadata_t.
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Now that the pixel array properties have been defaulted in the
CameraSensor class (or in the pipeline handler, for the UVC use case),
they will always be reported by the libcamera::Camera and there's no
need to default them in the Camera HAL.
Remove defaults and assume properties are always there.
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>
|
|
The Android camera2 API defines a RAW capture capability ([1]) for
devices that support "outputting RAW buffers and metadata for
interpreting them". This capability requires the camera device to
support RAW_SENSOR ([2]) as an output format. Despite what its name may
sound like, the RAW_SENSOR format is defined as a 16 bits RAW format,
not an opaque implementation-dependent format (which is instead called
RAW_PRIVATE). Devices may additionally support the RAW10 and RAW12
formats, but that isn't enough to claim RAW capture capability.
To comply with the API requirements, only report the
ANDROID_REQUEST_AVAILABLE_CAPABILITIES_RAW capability when 16-bit RAW is
supported.
[1] https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_RAW
[2] https://developer.android.com/reference/android/graphics/ImageFormat#RAW_SENSOR
Suggested-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
When accessing the value of a property by reading the properties
ControlList content with ControlList::get<>() it is not necessary to
specify the template type as it is already conveyed by the Control
instance provided as first argument.
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
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>
|
|
Conditionally report the ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
property inspecting the draft property reported by the libcamera Camera.
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
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>
|
|
Report the number of supported output streams through the
ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS static metadata.
The camera HAL currently supports:
- 1 optional RAW stream
- 2 YUV streams
- 1 JPEG stream
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Report the pipeline depth in the capture results if the pipeline
reports it.
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
The auto keyword facilitates writing code. It avoids typing out very
long types, which can make the code more readable, but it can also have
a negative impact on readability as it requires the reader (including
reviewers) to look up the type of the variable.
Replace one occurrence of auto with the explicit type where doing so
doesn't require a long type name.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
The ChromeOS camera service, which is the current main user of the
Android Camera HAL, fails to start if the pixel array properties are
not registered.
As the sensor driver for the Soraka test device have not yet been
updated to report their pixel array properties through the V4L2
selection API, temporary fix the gap by re-establishing the default
properties values removed by commit 1889cdc2e91c ("android: camera_device:
Initialize pixel array properties")
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
This reorders Camera3Configs before executing
CameraConfiguration::validate() to make it easier for the Camera
to satisfy the Android framework request.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Add blank line and fix compilation on gcc 7.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Use the newly introduced Camera3StreamConfig to associate the
Android requested streams with the associated StreamConfiguration
in a vector of configurations.
This change prepares to sort the vector of configuration before using
it to configure the Camera and populate the streams_ vector.
No functional changes intended.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Camera3StreamConfig is a new class to store camera3_stream and
types with associated StreamConfiguration.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The Android camera device HAL3 specification does not require a
camera to go through any explicit close() call between configurations.
It is legitimate for a camera to be configured, a number of requests
processed and then re-configured again without any explicit stop.
The libcamera Android camera HAL starts the Camera at the first handled
request, and only stops it at camera close time. This means that two
camera configuration attempts in the same streaming session are only
interleaved by capture requests handling.
The libcamera::Camera state machine requires the Camera to be stopped
before any configuration take place, and this currently doesn't happen.
Fix this by stopping the camera and the associated worker thread if
a configuration attempt is performed while the Camera is in running
state.
This patch fixes cros_camera_test:
Camera3PreviewTest/Camera3SinglePreviewTest.Camera3BasicPreviewTest/0
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
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>
|
|
Initialize pixel array properties in the Android camera HAL
inspecting the camera properties.
If the camera does not provide any suitable property, not static
metadata is registered to the Android framework.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Make sure the 'camera3_capture_request_t *' provided to
CameraDevice::processCaptureRequest() is valid before attempting to
access it.
This patch fixes cros_camera_test:
Camera3FrameTest/Camera3InvalidRequestTest.NullOrUnconfiguredRequest/*
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
The CameraDevice::getStaticMetadata() function populates the
entries for Android's static metadata by walking the ControlInfo
supported values reported by the libcamera pipeline.
The number of entries to be passed to Android is computed using the
vector's size which is initialized at vector creation time to the
maximum number of available entries.
In order to report the correct number of metadata do not create the
vector with the largest possible number of elements but only reserve
space for them using std::vector::reserve() which does not modify the
vector's size.
This patch fixes cros_camera_test:
Camera3DeviceTest/Camera3DeviceDefaultSettings.ConstructDefaultSettings/1
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
The JPEG post-processor is marked as licensed under GPL-2.0-or-later.
This is an oversight and unvoluntary. License it under the
LGPL-2.1-or-later as the rest of the camera HAL implementation.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Umang Jain <email@uajain.com>
Acked-by: Hirokazu Honda <hiroh@chromium.org>
|
|
Embed a Jpeg-encoded thumbnail into Exif metadata using the Thumbnailer
class that got introduced.
Introduce a helper function in Exif class for setting the thumbnail
data.
Signed-off-by: Umang Jain <email@uajain.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
[Kieran: Add todo comment, and Compression enum]
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add a basic image Thumbnailer class for the frames being captured.
Currently, the thumbnailer can scale NV12 frames. It shall be used
to generate a thumbnail image for EXIF metadata, in the subsequent
commit.
Signed-off-by: Umang Jain <email@uajain.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Allow encoding frames which are directly handed over to the encoder
via a span or vector i.e. a raw frame bytes. Introduce an overloaded
EncoderLibJpeg::encode() with libcamera::Span source parameter to
achieve this functionality. This makes the libjpeg-encoder a bit
flexible for use case such as compressing a thumbnail generated for
Exif.
Signed-off-by: Umang Jain <email@uajain.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
CameraDevice::toPixelFormat() doesn't change the state of the
CameraDevice. Marks it a const function so that it can be called
in const functions.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
std::map::at() searches std::map by the given key. The commit
e1f9fdb8a5bd ("android: camera_device: Remove shadowing FrameBuffer
usage") uses it with 0 to intend to accessing the first element of the
map, but actually access the element whose key is nullptr. This causes
the crash because the map doesn't have the element with nullptr. This
fixes the issue by replacing the std::map::at() operation by
std::map::begin().
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
[Kieran: Updated commit message]
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Register the ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES
static metadata property inspecting the values retuned by the pipeline
handler.
Add one entry and reserve in static metadata pack enough space to
support all the 2 available lens shading map modes Android defines.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Register the ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
static metadata property inspecting the values retuned by the pipeline
handler.
Reserve in the static metadata pack enough space to support all the 3
available color correction aberration modes Android defines.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Register the ANDROID_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
static metadata property inspecting the values retuned by the pipeline
handler.
Reserve in the static metadata pack enough space to support all the 5
available noise reduction modes Android defines.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Register the ANDROID_REQUEST_PIPELINE_MAX_DEPTH static property
inspecting the value reported by the pipeline handler.
If the Camera does not report any suitable value, default the
static property to 2.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Following the reasoning of pass-by-value for libcamera::Span
parameters from 90c193f2a700("android: Modify Encoder interface") i.e.
they are easy to copy/move/construct, align the Exif parameter passing
to the encoder interface in this consistent way.
Signed-off-by: Umang Jain <email@uajain.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Drop "libcamera::" from functions' arguments for *.cpp files as they
have
using namespace libcamera;
directive in the beginning.
Signed-off-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The base class of polymorphic classes is required to declare a
destructor. Several of these are empty, and can thus be declared as
defaulted.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Do not warn on shadowed variables inside the metadata library,
which is directly imported without modifications.
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
A FrameBuffer *buffer is used to obtain the 'first' buffer from a
request which is used purely to identify the timestamp from the
metadata in two locations.
Rather than keep the FrameBuffer instance around, which then causes
further usages of FrameBuffers to be shadowed, store the timestamp
locally.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Use the postfixed '_' member variable naming style for the
Camera3RequestDescriptor structure, which in turn ensures that variable
shadowing does not occur in the member initializer list of the
constructor.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Prevent variable shadowing by removing the redeclaration of variables
with the same name (and type) where the existing variable can be reused.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
CameraStream initializes several member variables in the
initializer list. Some of them are unchanged after. This makes
them constant. Especially, doing to |cameraDevice_| represents
CameraStream doesn't have the ownership of it.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
PostProcessorJpeg doesn't have the ownership of CameraDevice given
in the constructor. To clarify it, this makes the member variable
constant.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
In Encoder::encode(), the |source| argument doesn't have to be a
pointer. This replaces its type, const pointer, with const
reference as the latter is preferred to the former.
libcamera::Span is cheap to construct/copy/move. We should deal
with the type as pass-by-value parameter. Therefore this also
drops the const reference in the |destination| argument.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
In PostProcessor::process(), the |source| argument doesn't have
to be a pointer. This replaces its type, const pointer, with
const reference as the latter is preferred to the former.
libcamera::Span is cheap to construct/copy/move. We should deal
with the type as pass-by-value parameter. Therefore this also
drops the const reference in the |destination| argument.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The end semicolons with LOG_DECLARE_CATEGORY and
LOG_DEFINE_CATEGORY are unnecessary.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
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>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Port the CameraStream's JPEG-encoding bits to PostProcessorJpeg.
This encapsulates the encoder and EXIF generation code into the
PostProcessorJpeg layer and removes these specifics related to JPEG,
from the CameraStream itself.
Signed-off-by: Umang Jain <email@uajain.com>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Change-Id: Id9e6e9b2bec83493a90e5e126298a2bb2ed2232a
|
|
Introduce a PostProcessor interface for the streams that require any
kind of processing (refer to CameraStream::Type) for their consumption
by the HAL layer. The PostProcessor interface can be configured via
configure() and the actual processing can be initiated using process().
The post-processing layer can be extended to have multiple post
processors for various stream configurations. As of now, we only have
one post processor (JPEG), hence the subsequent commit will port its
function to this interface.
Signed-off-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Signed-off-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Add a brief documentation block to the CameraStream class.
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>
|
|
Add a CameraWorker class member to the CameraDevice class and
queue capture requests to it to delegate its handling. Start and
stop the CameraWorker when the libcamera::Camera is started or
stopped.
Tie the CaptureRequest lifetime to the Camera3RequestDescriptor's one
by storing it as unique_ptr<> in the descriptor to simplify handling
of request creation and deletion.
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>
|
|
The Android camera framework provides for each buffer part of a capture
request an acquisition fence the camera HAL is supposed to wait on
before using the buffer. As the libcamera HAL runs in the camera service
thread, it is not possible to perform a synchronous wait there.
Introduce a CameraWorker class that runs an internal thread to wait
on a set of fences before queueing a capture request to the
libcamera::Camera.
Fences completion is handled through a simple poll, similar in
implementation to the sync_wait() function provided by libdrm.
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>
|
|
Allow reuse of the Request object by implementing reuse(). This means
the applications now have the responsibility of freeing the Request
objects, so make all libcamera users (cam, qcam, v4l2-compat, gstreamer,
android) do so.
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: Jacopo Mondi <jacopo@jmondi.org>
|
|
The jpeg components are licensed under GPL-2.0-or-later. This is an
oversight and unvoluntary. License them under the LGPL-2.1-or-later as
the rest of the camera HAL implementation.
Signed-off-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
When the CameraDevice is stopped, we need to clear the vector
of CameraStream instances to make sure they get deleted and all the
resources they have acquired get released.
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
To ease following how Android streams get mapped to libcamera ones
add a (quite verbose) printout before queueing a request to libcamera.
The output looks like:
0 - (320x240)[0x00000022] -> (320x240)[NV12] (direct)
1 - (640x480)[0x00000021] -> (640x480)[NV12] (internal)
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Now that CameraStream that require internal memory allocation
have been instrumented with a FrameBuffer pool, use them to create
intermediate buffers in the CameraDevice.
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|