summaryrefslogtreecommitdiff
path: root/rotord/src
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2014-02-14 15:03:07 +0000
committerTim Redfern <tim@eclectronics.org>2014-02-14 15:03:07 +0000
commit0b453608ed7a658ee7c6ad0cf8bb3fc322a1b666 (patch)
tree118f9bd41de733c841c060167ee7da7e2e3b7592 /rotord/src
parent3d814a2df58d87d6908e11f9a09d440e41bb79c5 (diff)
build path for prescaled file
Diffstat (limited to 'rotord/src')
-rw-r--r--rotord/src/rotor.h13
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);
}
};