summaryrefslogtreecommitdiff
path: root/src/qcam/viewfinder.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-06 01:35:22 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-07 19:18:51 +0300
commita13676f2bb9a86ced75ed640f571512cf1a76afe (patch)
treeda0bfea97abec2b03c4feca663dd1f0304230055 /src/qcam/viewfinder.h
parent013084310836519b57883176d65fb5e9f6c00f8d (diff)
qcam: Use Image class to access pixel data
Replace the manual implementation of frame buffer mapping with the Image class to improve code sharing. The ViewFinder API is updated to take an Image pointer in the render() function to prepare for multi-planar buffer support. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/qcam/viewfinder.h')
-rw-r--r--src/qcam/viewfinder.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qcam/viewfinder.h b/src/qcam/viewfinder.h
index 42d40f1f..fb462835 100644
--- a/src/qcam/viewfinder.h
+++ b/src/qcam/viewfinder.h
@@ -11,11 +11,11 @@
#include <QList>
#include <QSize>
-#include <libcamera/base/span.h>
-
#include <libcamera/formats.h>
#include <libcamera/framebuffer.h>
+class Image;
+
class ViewFinder
{
public:
@@ -24,7 +24,7 @@ public:
virtual const QList<libcamera::PixelFormat> &nativeFormats() const = 0;
virtual int setFormat(const libcamera::PixelFormat &format, const QSize &size) = 0;
- virtual void render(libcamera::FrameBuffer *buffer, libcamera::Span<uint8_t> mem) = 0;
+ virtual void render(libcamera::FrameBuffer *buffer, Image *image) = 0;
virtual void stop() = 0;
virtual QImage getCurrentImage() = 0;