android: camera_stream: Use PlatformFrameBufferAllocator
CameraStream originally creates FrameBuffers by FrameBufferAllocator and thus buffers are allocated in V4L2 API. This replaces the allocator in CameraStream with PlatformFrameBufferAllocator. It allocates a buffer in a platform dependent graphic buffer allocation API. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
committed by
Jacopo Mondi
parent
c58662c577
commit
b53f6efb99
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <libcamera/camera.h>
|
||||
#include <libcamera/framebuffer.h>
|
||||
#include <libcamera/framebuffer_allocator.h>
|
||||
#include <libcamera/geometry.h>
|
||||
#include <libcamera/pixel_format.h>
|
||||
|
||||
@@ -26,6 +25,7 @@
|
||||
#include "post_processor.h"
|
||||
|
||||
class CameraDevice;
|
||||
class PlatformFrameBufferAllocator;
|
||||
|
||||
class CameraStream
|
||||
{
|
||||
@@ -169,7 +169,8 @@ private:
|
||||
camera3_stream_t *camera3Stream_;
|
||||
const unsigned int index_;
|
||||
|
||||
std::unique_ptr<libcamera::FrameBufferAllocator> allocator_;
|
||||
std::unique_ptr<PlatformFrameBufferAllocator> allocator_;
|
||||
std::vector<std::unique_ptr<libcamera::FrameBuffer>> allocatedBuffers_;
|
||||
std::vector<libcamera::FrameBuffer *> buffers_ LIBCAMERA_TSA_GUARDED_BY(mutex_);
|
||||
/*
|
||||
* The class has to be MoveConstructible as instances are stored in
|
||||
|
||||
Reference in New Issue
Block a user