Open toughvj opened 6 years ago
Thanks for noticing. That might cause slowdown.
I think this could help:
for(int i = 0; i < _directory.size(); ++i){
_filePaths.push_back(path + _directory.getName(i));
ofFile file(path + _directory.getName(i));
if(_mediaType == SourceType::SOURCE_TYPE_VIDEO){
if(!ofFile::doesFileExist("sources/videos/" + _directory.getName(i))){
file.copyTo("sources/videos/" + _directory.getName(i));
ofLogNotice("File: " + path + _directory.getName(i) + " added to source list");
}
}else if(_mediaType == SourceType::SOURCE_TYPE_IMAGE){
if(!ofFile::doesFileExist("sources/images/" + _directory.getName(i))){
file.copyTo("sources/images/" + _directory.getName(i));
ofLogNotice("File: " + path + _directory.getName(i) + " added to source list");
}
}
}
any news on this?
Not yet.
Hi, with your change of media server source code there is a problem, that when loading program it' tries to copy videos and images from data directory to data directory. Perhaps you should remove lines:
imageWatcher(ofToDataPath(DEFAULT_IMAGES_DIR, true), SourceType::SOURCE_TYPE_IMAGE), videoWatcher(ofToDataPath(DEFAULT_VIDEOS_DIR, true), SourceType::SOURCE_TYPE_VIDEO) ?