From 6f09680b256025923cedd50b5fd1a878af2dffd4 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 18 Aug 2021 03:21:06 +0300 Subject: qcam: Replace MappedBuffer with Span The MappedBuffer structure is a custom container that binds a data pointer with a length. This is exactly what Span is. Use it instead. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham --- src/qcam/viewfinder.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/qcam/viewfinder.h') diff --git a/src/qcam/viewfinder.h b/src/qcam/viewfinder.h index 46747c22..42d40f1f 100644 --- a/src/qcam/viewfinder.h +++ b/src/qcam/viewfinder.h @@ -11,14 +11,11 @@ #include #include +#include + #include #include -struct MappedBuffer { - void *memory; - size_t size; -}; - class ViewFinder { public: @@ -27,7 +24,7 @@ public: virtual const QList &nativeFormats() const = 0; virtual int setFormat(const libcamera::PixelFormat &format, const QSize &size) = 0; - virtual void render(libcamera::FrameBuffer *buffer, MappedBuffer *map) = 0; + virtual void render(libcamera::FrameBuffer *buffer, libcamera::Span mem) = 0; virtual void stop() = 0; virtual QImage getCurrentImage() = 0; -- cgit v1.2.1