forked from jvcleave/ofxOMXPlayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathofxOMXVideoPlayer.h
executable file
·82 lines (56 loc) · 1.21 KB
/
ofxOMXVideoPlayer.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#pragma once
#include "ofMain.h"
extern "C"
{
#include <libavformat/avformat.h>
#include <libavutil/avutil.h>
};
#include "RBP.h"
#include "OMXClock.h"
#include "OMXPlayerVideo.h"
#include "OMXPlayerAudio.h"
class ofxOMXVideoPlayer : public ofThread
{
public:
ofxOMXVideoPlayer();
void loadMovie(string filepath);
void update();
void play();
void stop();
float duration;
float getDuration();
void setPosition(float pct);
// void setVolume(float volume); // 0..1
void setPaused(bool doPause);
int getCurrentFrame();
int getTotalNumFrames();
float getHeight();
float getWidth();
bool isPaused();
bool isPlaying();
int videoWidth;
int videoHeight;
void openPlayer();
void close();
double getMediaTime();
bool doLooping;
void threadedFunction();
private:
CRBP rbp;
COMXCore omxCore;
OMXClock * clock;
OMXPlayerVideo videoPlayer;
OMXPlayerAudio m_player_audio;
OMXReader omxReader;
COMXStreamInfo streamInfo;
COMXStreamInfo audioStreamInfo;
bool isMPEG;
bool hasVideo;
bool hasAudio;
bool m_buffer_empty;
DllBcmHost bcmHost;
OMXPacket* packet;
string moviePath;
bool bPlaying;
int nFrames;
};