From 40148cfcafbac274232acd07f41a4ee16bfd1f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Tue, 2 Jun 2020 00:28:33 +0200 Subject: libcamera: ipu3: Allow zero-copy RAW stream capture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the refactored CIO2 interface it's now easy to add zero-copy for buffers in the RAW stream. Use the internally allocated buffers inside the CIO2Device if no buffer for the RAW stream is provided by the application, or use the application-provided buffer if any. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/ipu3/cio2.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/libcamera/pipeline/ipu3/cio2.h') diff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h index 47c6f010..dc764b10 100644 --- a/src/libcamera/pipeline/ipu3/cio2.h +++ b/src/libcamera/pipeline/ipu3/cio2.h @@ -18,6 +18,7 @@ namespace libcamera { class CameraSensor; class FrameBuffer; class MediaDevice; +class Request; class V4L2DeviceFormat; class V4L2Subdevice; class V4L2VideoDevice; @@ -40,15 +41,13 @@ public: int exportBuffers(unsigned int count, std::vector> *buffers); - FrameBuffer *getBuffer(); - void putBuffer(FrameBuffer *buffer); - int start(); int stop(); CameraSensor *sensor() { return sensor_; } - int queueBuffer(FrameBuffer *buffer); + int queueBuffer(Request *request, FrameBuffer *rawBuffer); + void tryReturnBuffer(FrameBuffer *buffer); Signal bufferReady; private: -- cgit v1.2.1