#include "dirscanner.h" void playItem::play(){ } bool playItem::load(string filename){ ofFile file(filename); string ext=file.getExtension(); ofLogNotice() << "item "<=railwaytime){ return i; } } return -1; } void dirPlayer::load(std::string path){ items.clear(); ofDirectory dir(path); dir.allowExt("mp4"); dir.allowExt("mov"); dir.allowExt("jpg"); // dir.allowExt("png"); dir.listDir(); for(int i = 0; i < dir.size(); i++){ string d=dir.getName(i); playItem item; if (item.load(d)){ items.push_back(item); } } } void dirPlayer::draw(){ int slot=scanner->getSlotForTime(); if (slot!=currentslot){ if (slot>-1){ ofLogNotice() << "entering slot "<slots[slot].path; load(scanner->slots[slot].path); } else { ofLogNotice() << "leaving slot"; } currentslot=slot; } }