-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathlauvideosurface.h
46 lines (36 loc) · 1.29 KB
/
lauvideosurface.h
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef LAUVIDEOSURFACE_H
#define LAUVIDEOSURFACE_H
#include <QList>
#include <QDebug>
#include <QLabel>
#include <QVideoFrame>
#include <QVideoSurfaceFormat>
#include <QAbstractVideoSurface>
#include <QCameraViewfinderSettings>
#include "lauvideoglwidget.h"
/****************************************************************************/
/****************************************************************************/
/****************************************************************************/
class LAUVideoSurface : public QAbstractVideoSurface
{
Q_OBJECT
public:
explicit LAUVideoSurface(QObject *parent = NULL) : QAbstractVideoSurface(parent), labelWidget(NULL) { ; }
LAUVideoGLWidget *label() const
{
return (labelWidget);
}
void setLabel(LAUVideoGLWidget *lbl)
{
labelWidget = lbl;
}
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;
private:
LAUVideoGLWidget *labelWidget;
};
#endif // LAUVIDEOSURFACE_H