summaryrefslogtreecommitdiff
path: root/menuApp/src/dirscanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'menuApp/src/dirscanner.cpp')
-rw-r--r--menuApp/src/dirscanner.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/menuApp/src/dirscanner.cpp b/menuApp/src/dirscanner.cpp
index a8c519b..5adaf2f 100644
--- a/menuApp/src/dirscanner.cpp
+++ b/menuApp/src/dirscanner.cpp
@@ -20,7 +20,7 @@ bool playItem::load(string _filename){
loaded=0;
if (ext=="jpg"||ext=="png"){
if (image.load(filename)){
- ofLogNotice() << "loaded image: "<<filename;
+
loaded=1;
}
}
@@ -42,7 +42,6 @@ bool playItem::load(string _filename){
if (video.setup(videosettings)){
//video.setLoopState(OF_LOOP_NONE);
- ofLogNotice() << "loaded clip: "<<filename;
loaded=2;
}
}
@@ -65,7 +64,7 @@ void playItem::draw(){
//video.update();
if (video.getIsOpen()){
video.draw(0,0,1080*FACTOR,1920*FACTOR);
- ofLogNotice() << "drawing: "<<1080*FACTOR<<"x"<<1920*FACTOR;
+
//if (video.getIsMovieDone()){
if (!video.isPlaying()){
isFinished=true;
@@ -92,9 +91,7 @@ void dirScanner::scan(){
if (start||end){
slots.push_back(timeSlot(dir.getPath(i),start,end));
- ofLogNotice() << "directory "<<i<<": "<<start<<" - "<<end<<" "<<slots[slots.size()-1].path;
- //dir.getPath(i);
-
+
}
}
}
@@ -110,13 +107,11 @@ int dirScanner::getSlotForTime(){
for(int i = 0; i < slots.size(); i++){
if (slots[i].start<slots[i].end){
if (slots[i].start<=railwaytime&&slots[i].end>=railwaytime){
- ofLogNotice() << "got slot: "<<slots[i].start<<"-"<<slots[i].end<<" - "<<slots[i].path;
return i;
}
}
else {
if (slots[i].end>=railwaytime||slots[i].start<=railwaytime){
- ofLogNotice() << "got slot: "<<slots[i].start<<"-"<<slots[i].end<<" - "<<slots[i].path;
return i;
}
}
@@ -144,36 +139,24 @@ void dirPlayer::load(std::string path){
// items.push_back(item);
//}
}
- ofLogNotice() << "found "<<items.size()<<" items";
currentItem=items.size()-1;
items[currentItem].isFinished=true;
}
bool dirPlayer::draw(){
- ofLogNotice() << "player drawing: ";
int slot=scanner->getSlotForTime();
- ofLogNotice() << "got slot: "<<slot<<" ,currentslot: "<<currentslot;
if(slot==-1) return false;
if (slot!=currentslot){
- ofLogNotice() << "new slot: "<<slot;
if (slot>-1){
- ofLogNotice() << "entering slot "<<slot<<": "<<scanner->slots[slot].path;
load(scanner->slots[slot].path);
}
- else {
- ofLogNotice() << "leaving slot";
- }
currentslot=slot;
}
- else {
- ofLogNotice() << "reusing slot: "<<slot;
- }
if (items[currentItem].isFinished){
items[currentItem].isFinished=false;
currentItem=(currentItem+1)%items.size();
items[currentItem].play();
- ofLogNotice() << "playing clip "<<currentItem<<" - "<<(items[currentItem].loaded==0?"none":items[currentItem].loaded==1?"image":"mov");
}
items[currentItem].draw();
return true;