summaryrefslogtreecommitdiff
path: root/rotord/rotor.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-05-03 18:25:26 +0100
committerTim Redfern <tim@herge.(none)>2013-05-03 18:25:26 +0100
commitff59340614ec150e4bd84d3554081e666970aef2 (patch)
treeb32689f18b0457580ecf1c7934edd69142a9e005 /rotord/rotor.cpp
parent4aa8f7c20c5e8bbe1ed9b007a1193ced8b019f4d (diff)
elusive hang while rendering
Diffstat (limited to 'rotord/rotor.cpp')
-rwxr-xr-xrotord/rotor.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/rotord/rotor.cpp b/rotord/rotor.cpp
index b0bf8ab..4c79fc1 100755
--- a/rotord/rotor.cpp
+++ b/rotord/rotor.cpp
@@ -13,6 +13,9 @@ Node_factory::Node_factory(){
add_type("testcard",new Testcard());
add_type("video_output",new Video_output());
add_type("video_input",new Video_input());
+ add_type("on_off",new On_off());
+ add_type("invert",new Invert());
+ add_type("video_cycler",new Video_cycler());
}
bool Signal_input::connect(Signal_node* source) {
@@ -151,7 +154,7 @@ void Audio_analysis::print_features(){
}
}
-bool Video_output::render(const float duration, const float framerate,const string &output_filename,const string &audio_filename){
+bool Video_output::render(const float duration, const float framerate,const string &output_filename,const string &audio_filename,float& progress){
//
//setup defaults
@@ -188,8 +191,15 @@ bool Video_output::render(const float duration, const float framerate,const stri
af+=exporter->get_audio_step();
}
Image* i=get_output(Frame_spec(vf,framerate,outW,outH));
- exporter->encodeFrame(i->RGBdata);
+ if (i) {
+ exporter->encodeFrame(i->RGBdata);
+ }
vf+=vstep;
+ progress=vf/duration;
+ if (progress>0.99) {
+ //stop here
+ //seems that the last frame of samples causes std::max to have <error reading variables>
+ }
/*
if (!exporter->encodeFrame(i->RGBdata)){
//if (!exporter->encodeFrame(get_output(Frame_spec(f,framerate,outW,outH))->RGBdata,audioloader.get_packet())){