summaryrefslogtreecommitdiff
path: root/menuApp/src/dirscanner.h
blob: 1e70ed842d0847a9630288746ce3f3028f0c8b6a (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
#pragma once

#include "ofMain.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(std::string _n){
			filename=_n;
		}
		string filename;									
		ofImage image;
		ofVideoPlayer video;
		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(int time);
		string rootdir;
		void scan();
		vector<timeSlot> slots;
};

class dirPlayer {
	public:
		dirPlayer(std::string _d){
			playdir=_d;
		}
		vector<playItem> items;
		string playdir;
		void load();
		void draw();
};