summaryrefslogtreecommitdiff
path: root/src/qcam/main_window.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/main_window.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/main_window.h')
-rw-r--r--src/qcam/main_window.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qcam/main_window.h b/src/qcam/main_window.h
index 28244bca..a16bea09 100644
--- a/src/qcam/main_window.h
+++ b/src/qcam/main_window.h
@@ -34,6 +34,7 @@ using namespace libcamera;
class QAction;
class QComboBox;
+class Image;
class HotplugEvent;
enum {
@@ -106,8 +107,7 @@ private:
FrameBufferAllocator *allocator_;
std::unique_ptr<CameraConfiguration> config_;
- std::map<FrameBuffer *, Span<uint8_t>> mappedBuffers_;
- std::map<FrameBuffer *, Span<uint8_t>> planeData_;
+ std::map<FrameBuffer *, std::unique_ptr<Image>> mappedBuffers_;
/* Capture state, buffers queue and statistics */
bool isCapturing_;