From b53f6efb99e289375b88f50d3fb5ef216c97da02 Mon Sep 17 00:00:00 2001 From: Hirokazu Honda Date: Tue, 30 Nov 2021 21:44:28 +0900 Subject: 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 Reviewed-by: Jacopo Mondi Signed-off-by: Jacopo Mondi --- src/android/camera_stream.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/android/camera_stream.h') diff --git a/src/android/camera_stream.h b/src/android/camera_stream.h index 7b1a2980..f9504462 100644 --- a/src/android/camera_stream.h +++ b/src/android/camera_stream.h @@ -18,7 +18,6 @@ #include #include -#include #include #include @@ -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 allocator_; + std::unique_ptr allocator_; + std::vector> allocatedBuffers_; std::vector buffers_ LIBCAMERA_TSA_GUARDED_BY(mutex_); /* * The class has to be MoveConstructible as instances are stored in -- cgit v1.2.1