[libcamera-devel] [PATCH v3 2/8] android: camera_device: Add frame allocator
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Sep 29 03:30:07 CEST 2020
Hi Jacopo,
Thank you for the patch.
On Wed, Sep 23, 2020 at 12:47:46PM +0100, Kieran Bingham wrote:
> On 22/09/2020 10:47, Jacopo Mondi wrote:
> > Add to the CameraDevice class a FrameBufferAllocator class member.
>
> "Add a FrameBufferAllocator to the CameraDevice class."
>
> Or rather:
>
> Add a FrameBufferAllocator to the CameraDevice class to handle any
> allocations required to satisfy internal stream requirements.
>
> > Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> > Reviewed-by: Hirokazu Honda <hiroh at chromium.org>
>
> Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
>
> > Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> > ---
> > src/android/camera_device.cpp | 5 +++--
> > src/android/camera_device.h | 2 ++
> > 2 files changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> > index e4ffbc02c2da..98b8159ebd8c 100644
> > --- a/src/android/camera_device.cpp
> > +++ b/src/android/camera_device.cpp
> > @@ -14,6 +14,7 @@
> >
> > #include <libcamera/controls.h>
> > #include <libcamera/formats.h>
> > +#include <libcamera/framebuffer_allocator.h>
You can drop this, the header is included in camera_device.h.
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > #include <libcamera/property_ids.h>
> >
> > #include "libcamera/internal/formats.h"
> > @@ -211,8 +212,8 @@ CameraDevice::Camera3RequestDescriptor::~Camera3RequestDescriptor()
> > */
> >
> > CameraDevice::CameraDevice(unsigned int id, const std::shared_ptr<Camera> &camera)
> > - : id_(id), running_(false), camera_(camera), staticMetadata_(nullptr),
> > - facing_(CAMERA_FACING_FRONT), orientation_(0)
> > + : id_(id), running_(false), camera_(camera), allocator_(camera),
> > + staticMetadata_(nullptr), facing_(CAMERA_FACING_FRONT), orientation_(0)
> > {
> > camera_->requestCompleted.connect(this, &CameraDevice::requestComplete);
> >
> > diff --git a/src/android/camera_device.h b/src/android/camera_device.h
> > index 9a9406cc257c..84f636f7a93c 100644
> > --- a/src/android/camera_device.h
> > +++ b/src/android/camera_device.h
> > @@ -16,6 +16,7 @@
> >
> > #include <libcamera/buffer.h>
> > #include <libcamera/camera.h>
> > +#include <libcamera/framebuffer_allocator.h>
> > #include <libcamera/geometry.h>
> > #include <libcamera/request.h>
> > #include <libcamera/stream.h>
> > @@ -206,6 +207,7 @@ private:
> > bool running_;
> > std::shared_ptr<libcamera::Camera> camera_;
> > std::unique_ptr<libcamera::CameraConfiguration> config_;
> > + libcamera::FrameBufferAllocator allocator_;
> >
> > CameraMetadata *staticMetadata_;
> > std::map<unsigned int, const CameraMetadata *> requestTemplates_;
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list