blob: f6351e58acce9f5cdf1b30f5997dcf9bad00a005 (
plain)
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
|
#pragma once
#include "ofMain.h"
#include "ofxOMXPlayer.h"
class timeSlot {
public:
timeSlot(std::string _p,int _s,int _e){
path=_p;
start=_s;
end=_e;
}
string path;
int start;
int end;
};
class playItem {
public:
playItem(){
loaded=0;
isFinished=false;
}
playItem(std::string _n){
filename=_n;
playItem();
}
string filename;
ofImage image;
//ofVideoPlayer video;
ofxOMXPlayer video;
ofxOMXPlayerSettings videosettings;
int loaded; //0- none, 1- image, 2- mov
bool load(string filename);
void play();
void draw();
bool isFinished;
float startTime;
};
class dirScanner {
//todo: compare each item in vector for reload
public:
dirScanner(std::string _d=""){
rootdir=_d;
}
int getSlotForTime();
string rootdir;
void scan();
vector<timeSlot> slots;
};
class dirPlayer {
public:
dirPlayer(){
currentslot=-1;
}
dirPlayer(dirScanner *_s){
scanner=_s;
dirPlayer();
}
vector<playItem> items;
string playdir;
int currentslot;
dirScanner *scanner;
void load(std::string path);
bool draw();
int currentItem;
};
|