diff options
| author | tim <tim@eclectronics.org> | 2018-04-17 21:59:00 +0100 |
|---|---|---|
| committer | tim <tim@eclectronics.org> | 2018-04-17 21:59:00 +0100 |
| commit | 1d6e810fc6eb0d838a12dd6aa844d353cec59a4f (patch) | |
| tree | 927be5b2563c56c2fb2dc030293bc66a87284fc1 /menuApp/src/dirscanner.cpp | |
| parent | abad422a257454a100f4ca9ac9d280645f64aba6 (diff) | |
extra logging
Diffstat (limited to 'menuApp/src/dirscanner.cpp')
| -rw-r--r-- | menuApp/src/dirscanner.cpp | 23 |
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; |
