summaryrefslogtreecommitdiff
path: root/rotord/rotor.h
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/rotor.h')
-rwxr-xr-xrotord/rotor.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/rotord/rotor.h b/rotord/rotor.h
index 36ef0aa..699aa8a 100755
--- a/rotord/rotor.h
+++ b/rotord/rotor.h
@@ -326,6 +326,15 @@ namespace Rotor {
else return 0.0f;
}
};
+ class Video_output: public Image_node {
+ public:
+ Video_output(){};
+ Video_output(map<string,string> &settings) {
+ base_settings(settings);
+ };
+ Video_output* clone(map<string,string> &_settings) { return new Video_output(_settings);};
+ bool render(const float duration, const float framerate,string &filename);
+ };
//-------------------------------------------------------------------
class Node_factory{
public:
@@ -374,6 +383,18 @@ namespace Rotor {
}
else return false;
}
+ bool video_render(const float _fr,string &filename) {
+ //things to manage:
+ //audio location is known by render context
+ //video_output can generate frames
+ //where do these come together?
+ if (_fr>.001) framerate=_fr;
+ if (find_node("video_output")) {
+ Video_output *video_output=dynamic_cast<Video_output*>(find_node("video_output"));
+ return video_output->render(duration,framerate,filename,);
+ }
+ else return false;
+ }
int load(Poco::UUID uid);
bool load(string &graph_filename);
UUID save(); //save to DB, returns UUID of saved graph