6f09680b25
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
34 lines
769 B
C++
34 lines
769 B
C++
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* Copyright (C) 2019, Google Inc.
|
|
*
|
|
* viewfinder.h - qcam - Viewfinder base class
|
|
*/
|
|
#ifndef __QCAM_VIEWFINDER_H__
|
|
#define __QCAM_VIEWFINDER_H__
|
|
|
|
#include <QImage>
|
|
#include <QList>
|
|
#include <QSize>
|
|
|
|
#include <libcamera/base/span.h>
|
|
|
|
#include <libcamera/formats.h>
|
|
#include <libcamera/framebuffer.h>
|
|
|
|
class ViewFinder
|
|
{
|
|
public:
|
|
virtual ~ViewFinder() = default;
|
|
|
|
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 stop() = 0;
|
|
|
|
virtual QImage getCurrentImage() = 0;
|
|
};
|
|
|
|
#endif /* __QCAM_VIEWFINDER_H__ */
|