diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-06-02 00:28:33 +0200 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-06-26 13:32:29 +0200 |
commit | 40148cfcafbac274232acd07f41a4ee16bfd1f45 (patch) | |
tree | 800fb17fbe85c763611c761bc173785a75d5dfa4 /src/libcamera/pipeline/ipu3/cio2.h | |
parent | a96eb0cc8fd2bd45064bf2cd1ca9e43f80627bb3 (diff) |
libcamera: ipu3: Allow zero-copy RAW stream capture
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 <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/ipu3/cio2.h')
-rw-r--r-- | src/libcamera/pipeline/ipu3/cio2.h | 7 |
1 files changed, 3 insertions, 4 deletions
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<std::unique_ptr<FrameBuffer>> *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<FrameBuffer *> bufferReady; private: |