-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathQFFmpegPlayer.h
63 lines (46 loc) · 1.17 KB
/
QFFmpegPlayer.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef QFFMPEGPLAYER_H
#define QFFMPEGPLAYER_H
#include <QThread>
#include "QFFmpegAudioDecoder.h"
#include "QFFmpegVideoDecoder.h"
#include "QFFmpegGLWidget.h"
#include "QFFmpegClock.h"
extern "C"{
#include "libavutil/avstring.h"
#include "libavutil/mathematics.h"
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"
#include "libavutil/dict.h"
#include "libavutil/parseutils.h"
#include "libavutil/samplefmt.h"
#include "libavutil/avassert.h"
#include "libavutil/time.h"
#include "libavformat/avformat.h"
#include "libavdevice/avdevice.h"
#include "libswscale/swscale.h"
#include "libavutil/opt.h"
#include "libavcodec/avfft.h"
#include "libswresample/swresample.h"
}
class QFFmpegPlayer : public QThread
{
Q_OBJECT
public:
explicit QFFmpegPlayer(QObject *parent = 0);
~QFFmpegPlayer();
static void Init();
static int DecodeInterruptCallback(void *ctx);
void play();
void destroy();
void setGLWidget(QFFmpegGLWidget *gl);
signals:
public slots:
protected:
void run();
private:
QFFmpegAudioDecoder *mAudioDecoder;
QFFmpegVideoDecoder *mVideoDecoder;
QFFmpegClock *mClock;
bool abort;
};
#endif // QFFMPEGPLAYER_H