summaryrefslogtreecommitdiff
path: root/src/qcam/viewfinder.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-23 01:58:19 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-24 10:34:03 +0200
commitb73192036db19f09057c64f350b53093ee9e7797 (patch)
tree3adce72c9f90c9d3062c7d51d7e8eebe2afc2b68 /src/qcam/viewfinder.cpp
parent275fd5bd33107a10b1e47a0d36d834b390831af0 (diff)
qcam: viewfinder: Move multi-planar check into viewfinder
The lack of support for multiplanar buffers comes from the viewfinder. Move the corresponding check from MainWindow. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/qcam/viewfinder.cpp')
-rw-r--r--src/qcam/viewfinder.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qcam/viewfinder.cpp b/src/qcam/viewfinder.cpp
index d00edc33..b8feabd5 100644
--- a/src/qcam/viewfinder.cpp
+++ b/src/qcam/viewfinder.cpp
@@ -11,6 +11,7 @@
#include <QImageWriter>
#include <QMutexLocker>
#include <QPainter>
+#include <QtDebug>
#include "format_converter.h"
@@ -27,6 +28,11 @@ ViewFinder::~ViewFinder()
void ViewFinder::display(const libcamera::FrameBuffer *buffer,
MappedBuffer *map)
{
+ if (buffer->planes().size() != 1) {
+ qWarning() << "Multi-planar buffers are not supported";
+ return;
+ }
+
QMutexLocker locker(&mutex_);
/*