-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvideosurface.h
More file actions
29 lines (24 loc) · 826 Bytes
/
videosurface.h
File metadata and controls
29 lines (24 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#if !defined(VIDEOSURFACE_H)
#define VIDEOSURFACE_H
#include <QDebug>
#include <QAbstractVideoSurface>
#include <QVideoSurfaceFormat>
#include <QVideoFrame>
#include <QList>
#include <QObject>
#include "videowidget.h"
class VideoSurface : public QAbstractVideoSurface
{
Q_OBJECT
public:
explicit VideoSurface(QObject *parent = nullptr);
~VideoSurface();
VideoWidget *m_videoWidget;
QVideoSurfaceFormat nearestFormat(const QVideoSurfaceFormat &format) const;
bool isFormatSupported(const QVideoSurfaceFormat &format) const;
bool present(const QVideoFrame &frame);
bool start(const QVideoSurfaceFormat &format);
void stop();
QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType type = QAbstractVideoBuffer::NoHandle ) const;
};
#endif // VIDEOSURFACE_H