summaryrefslogtreecommitdiff
path: root/testDir/src/dirscanner.h
diff options
context:
space:
mode:
authortim <tim@eclectronics.org>2017-05-22 21:31:33 +0100
committertim <tim@eclectronics.org>2017-05-22 21:31:33 +0100
commit6ae491eea38055ebe3ba1154f0e916d7bbf95040 (patch)
tree793783c9f82f0a30fcf78507c3c88d6cec6c6639 /testDir/src/dirscanner.h
parentc31d38915cb6643013223a4ed9b4021b3499d71d (diff)
directory reader in test case
Diffstat (limited to 'testDir/src/dirscanner.h')
-rw-r--r--testDir/src/dirscanner.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/testDir/src/dirscanner.h b/testDir/src/dirscanner.h
new file mode 100644
index 0000000..f78c6d5
--- /dev/null
+++ b/testDir/src/dirscanner.h
@@ -0,0 +1,58 @@
+#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();
+ 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();
+ void draw();
+}; \ No newline at end of file