summaryrefslogtreecommitdiff
path: root/rotord/rendercontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/rendercontext.cpp')
-rw-r--r--rotord/rendercontext.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/rotord/rendercontext.cpp b/rotord/rendercontext.cpp
index dfb9021..948ef31 100644
--- a/rotord/rendercontext.cpp
+++ b/rotord/rendercontext.cpp
@@ -411,4 +411,14 @@ bool Render_context::load_audio(const string &filename,vector<Base_audio_process
return true;
}
bool Render_context::load_video(string nodeID,string &filename){
+ //this is a good standard example of how to find
+ //a node of a specific type by ID and do something
+ if (graph.nodes.find(nodeID)!=graph.nodes.end()){
+ if (graph.nodes[nodeID]->type=="video_input") {
+ if (((Video_input*)graph.nodes[nodeID])->load(filename)) {
+ return true;
+ }
+ }
+ }
+ return false;
}