summaryrefslogtreecommitdiff
path: root/rotord/src
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src')
-rw-r--r--rotord/src/graph.cpp1
-rw-r--r--rotord/src/nodes_channels.h1
-rw-r--r--rotord/src/rotor.h5
3 files changed, 7 insertions, 0 deletions
diff --git a/rotord/src/graph.cpp b/rotord/src/graph.cpp
index 4039d4b..ef493e8 100644
--- a/rotord/src/graph.cpp
+++ b/rotord/src/graph.cpp
@@ -108,6 +108,7 @@ bool Graph::video_render(const string &output_filename,const float framerate,int
}
for (auto f: find_nodes("video_feedback")){
+ video_output->clear_output(outW,outH);
(dynamic_cast<Video_feedback*>(f))->set_feedback(&(video_output->image));
}
//
diff --git a/rotord/src/nodes_channels.h b/rotord/src/nodes_channels.h
index 086ad2f..d7d93b2 100644
--- a/rotord/src/nodes_channels.h
+++ b/rotord/src/nodes_channels.h
@@ -468,6 +468,7 @@ namespace Rotor {
Frame_spec wanted=Frame_spec(absframe,frame.framerate,frame.duration,frame.w,frame.h);
Image *in2=(((Image_node*)image_inputs[0]->connection)->get_image_output(wanted));
if (in2) apply_LUT(*(in2),*(images[absframe]));
+ else in2->clear();
}
if (fless(1.0f,parameters["fadeto"]->value)){
float amount=(((parameters["number"]->value-i)/parameters["number"]->value)*(1.0f-parameters["fadeto"]->value))+(1.0f-parameters["fadeto"]->value);
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h
index 5e77704..e3b218d 100644
--- a/rotord/src/rotor.h
+++ b/rotord/src/rotor.h
@@ -459,6 +459,10 @@ namespace Rotor {
return i;
}
virtual Image *output(const Frame_spec &frame)=0;
+ void clear_output(int w,int h){
+ image.setup(w,h);
+ image.clear();
+ }
Image image;
float get_time_used(){
float t=time_taken;
@@ -467,6 +471,7 @@ namespace Rotor {
for (auto i:image_inputs) t-=i->get_time_taken();
return t;
}
+
private:
float image_time; //? could be used to detect image reuse?