mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-20 10:55:07 +03:00
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>
This commit is contained in:
parent
275fd5bd33
commit
b73192036d
3 changed files with 8 additions and 7 deletions
|
@ -524,14 +524,9 @@ void MainWindow::processCapture()
|
|||
queueRequest(buffer);
|
||||
}
|
||||
|
||||
int MainWindow::display(FrameBuffer *buffer)
|
||||
void MainWindow::display(FrameBuffer *buffer)
|
||||
{
|
||||
if (buffer->planes().size() != 1)
|
||||
return -EINVAL;
|
||||
|
||||
viewfinder_->display(buffer, &mappedBuffers_[buffer]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void MainWindow::queueRequest(FrameBuffer *buffer)
|
||||
|
|
|
@ -66,7 +66,7 @@ private:
|
|||
|
||||
void requestComplete(Request *request);
|
||||
void processCapture();
|
||||
int display(FrameBuffer *buffer);
|
||||
void display(FrameBuffer *buffer);
|
||||
void queueRequest(FrameBuffer *buffer);
|
||||
|
||||
/* UI elements */
|
||||
|
|
|
@ -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_);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue