forked from marseyeah/QmlVideoTee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qdeclarativevideotee.h
41 lines (32 loc) · 990 Bytes
/
qdeclarativevideotee.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
#ifndef QDECLARATIVEVIDEOTEE_H
#define QDECLARATIVEVIDEOTEE_H
#include <QObject>
class QVideoRendererControl;
class TeeSurface;
class QMediaObject;
class QMediaService;
class QDeclarativeVideoTee : public QObject
{
Q_OBJECT
Q_PROPERTY(QObject* source READ source WRITE setSource NOTIFY sourceChanged)
Q_PROPERTY(QObject* videoSurface READ videoSurface WRITE addVideoOutput)
public:
explicit QDeclarativeVideoTee(QObject *parent = 0);
~QDeclarativeVideoTee();
QObject *source() const;
void setSource(QObject *source);
QObject *videoSurface() const { return 0; } // unused
void addVideoOutput(QObject *output);
signals:
void sourceChanged();
private slots:
void updateMediaObject();
void removeVideoOutput(QObject *output);
private:
QObject *m_source;
QMediaObject *m_mediaObject;
QMediaService *m_mediaService;
QVideoRendererControl *m_sourceRendererControl;
TeeSurface *m_tee;
};
#endif // QDECLARATIVEVIDEOTEE_H