summaryrefslogtreecommitdiff
path: root/rotord
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-09-04 16:41:30 +0100
committerTim Redfern <tim@eclectronics.org>2013-09-04 16:41:30 +0100
commita2e1bf3495b7bfefdaedb8fc737e969ab06df079 (patch)
treeb42ca849b4fe562a3942a8f29beaf315417b9f40 /rotord
parentbe19f5a21dc1fe717711d76f500f6bfe0c4d166b (diff)
cycler cut to next available slot
Diffstat (limited to 'rotord')
-rw-r--r--rotord/src/graph.cpp14
-rwxr-xr-xrotord/src/rotor.h8
2 files changed, 14 insertions, 8 deletions
diff --git a/rotord/src/graph.cpp b/rotord/src/graph.cpp
index ae9247b..ef5fd87 100644
--- a/rotord/src/graph.cpp
+++ b/rotord/src/graph.cpp
@@ -78,13 +78,13 @@ bool Graph::preview(xmlIO &XML,string &node,string &_format,int frame,int w,int
}
bool Graph::video_render(const string &output_filename,const float framerate,float& progress) {
- vector<Node*> loaders=find_nodes("video_loader");
- for (auto i:loaders){
- if (!dynamic_cast<Video_loader*>(i)->isLoaded) {
- cerr<<"Rotor: all loaders must be populated before rendering"<<endl;
- return false;
- }
- }
+ //vector<Node*> loaders=find_nodes("video_loader");
+ //for (auto i:loaders){
+ // if (!dynamic_cast<Video_loader*>(i)->isLoaded) {
+ // cerr<<"Rotor: all loaders must be populated before rendering"<<endl;
+ // return false;
+ // }
+ //}
if (find_node("video_output")) {
Video_output *video_output=dynamic_cast<Video_output*>(find_node("video_output"));
for (auto f: find_nodes("video_feedback")){
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h
index d6426f5..20089b8 100755
--- a/rotord/src/rotor.h
+++ b/rotord/src/rotor.h
@@ -430,7 +430,13 @@ namespace Rotor {
}
return nullptr;
}
- return image_inputs[((int)inputs[0]->get((Time_spec)frame))%image_inputs.size()]->get(frame);
+ //cut mode
+ for (int i=0;i<image_inputs.size();i++){
+ int whichinput=((int)inputs[0]->get((Time_spec)frame)+i)%image_inputs.size();
+ Image *in=image_inputs[whichinput]->get(frame);
+ if (in) return in;
+ }
+ return nullptr;
}
Video_cycler* clone(map<string,string> &_settings) { return new Video_cycler(_settings);};
};