-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathBioTracker3Player.h
More file actions
82 lines (60 loc) · 1.97 KB
/
BioTracker3Player.h
File metadata and controls
82 lines (60 loc) · 1.97 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef BIOTRACKER3PLAYER_H
#define BIOTRACKER3PLAYER_H
#include <QObject>
#include "Interfaces/IModel/imodel.h"
#include "Interfaces/IModel/imodel.h"
#include "BioTracker3ImageStream.h"
#include <memory>
#include "QString"
#include "QMap"
#include "QThread"
#include "opencv2/core/core.hpp"
#include "../biotracker_gui/biotracker/View/BioTracker3VideoControllWidget.h"
#include "../biotracker_gui/biotracker/View/BioTracker3VideoView.h"
#include "Interfaces/IStates/IPlayerState.h"
class BioTracker3Player : public IModel {
Q_OBJECT
public:
explicit BioTracker3Player(QObject *parent = 0);
void runPlayerOperation();
void setNextState(IPlayerState::PLAYER_STATES state);
public Q_SLOTS:
void receiveLoadImageStreamCommand(QString fileDir);
void receivePrevFrameCommand();
void receiveNextFramCommand();
void receivePauseCommand();
void receiveStopCommand();
void receivePlayCommand();
void receiveStateDone();
Q_SIGNALS:
void emitMediaType(GuiParam::MediaType type);
void emitTotalNumbFrames(size_t num);
void emitCurrentFrameNumber(size_t num);
void emitFPS(double fps);
void emitCurrentFileName(QString name);
void emitCurrentFrame(cv::Mat mat, QString name);
void emitVideoControllsStates(QVector<bool> states);
void emitPlayerOperationDone();
private:
void updatePlayerParameter();
void emitSignals();
private:
IPlayerState *m_CurrentPlayerState;
QThread m_StateThread;
QMap<IPlayerState::PLAYER_STATES, IPlayerState *> m_States;
std::shared_ptr<BioTracker::Core::BioTracker3ImageStream> m_ImageStream;
GuiParam::MediaType m_MediaType;
size_t m_TotalNumbFrames;
size_t m_CurrentFrameNumber;
double m_fps;
QString m_CurrentFilename;
cv::Mat m_CurrentFrame;
QVector<bool> m_VideoControllsStates;
bool m_Play;
bool m_Forw;
bool m_Back;
bool m_Stop;
bool m_Paus;
QString m_NameOfCvMat = "Original";
};
#endif // BIOTRACKER3PLAYER_H