diff options
Diffstat (limited to 'rotord/src/rotor.h')
| -rw-r--r-- | rotord/src/rotor.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index 027fba1..fd59c68 100644 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -791,6 +791,17 @@ namespace Rotor { }; bool load(const string &filename,const int h=0){ Poco::Logger& logger = Poco::Logger::get(Log_name); + if (h>0&&h<721){ + Poco::Path path(filename); + std::string stub(path.getBaseName()); + std::string suffix(path.getExtension()); + std::string size=h>359?"/720.":h>179?"/360.":"/180."; + Poco::File file_to_use(stub+size+suffix); + if (file_to_use.exists()){ + cerr<<"using prescaled file: "<<stub<<size<<suffix<<endl; + } + else cerr<<"could not find prescaled file: "<<stub<<size<<suffix<<" for "<<filename<<endl; + } isLoaded=player.open(filename); if (isLoaded){ logger.information("libav::decoder loaded "+filename+": "\ @@ -904,7 +915,7 @@ namespace Rotor { //for (auto a:attributes) cerr<<"Video loader: "<<a.first<<" set to "<<a.second->value<<endl; //in order to implement prescaled clips, need to know size when loading-> defer if (attributes["filename"]->value!="") { - isLoaded=load(media_path+attributes["filename"]->value); + isLoaded=load(media_path+attributes["filename"]->value,720); } }; |
