-
Notifications
You must be signed in to change notification settings - Fork 0
/
loopplayer.h
52 lines (37 loc) · 858 Bytes
/
loopplayer.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
#ifndef LOOPPLAYER_H
#define LOOPPLAYER_H
#include <vector>
#include <QMutex>
#include <QThread>
#include <QImage>
#include <QWaitCondition>
#include "loopdata.h"
class LoopPlayer : public QThread
{ Q_OBJECT
private:
bool stop;
QMutex mutex;
QWaitCondition condition;
QImage img;
LoopData * loopData = nullptr;
int width = 0;
int height = 0;
void updateFrames();
signals:
void processedImage(const QImage &image);
protected:
void run();
void msleep(int ms);
public:
LoopPlayer(QObject *parent = nullptr);
~LoopPlayer();
void loadVideo(std::string filename);
void play();
void pause();
bool isStopped() const;
void setPoints(QVector<QPoint> * points);
LoopData * getLoopData();
void setWidth(int width);
void setHeight(int height);
};
#endif // LOOPPLAYER_H