summaryrefslogtreecommitdiff
path: root/rotord/rendercontext.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-04-25 16:20:24 +0100
committerTim Redfern <tim@herge.(none)>2013-04-25 16:20:24 +0100
commit06ac4feb6f4ce99d3e9fca26fa4045ef01156ff7 (patch)
treee311c01725b5cec22f50d0de6450fc0e734dde5b /rotord/rendercontext.cpp
parentbee668c819c4d83c7492e296afb3a90ea1cd6d06 (diff)
video loader begin
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;
}