summaryrefslogtreecommitdiff
path: root/rotord/src/graph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src/graph.cpp')
-rw-r--r--rotord/src/graph.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/rotord/src/graph.cpp b/rotord/src/graph.cpp
index dc3e13e..9536fdc 100644
--- a/rotord/src/graph.cpp
+++ b/rotord/src/graph.cpp
@@ -33,11 +33,22 @@ bool Graph::signal_render(string &signal_xml,const float framerate) {
return false;
}
*/
-bool Graph::preview(xmlIO &XML,string node,int w,int h){
+bool Graph::preview(xmlIO &XML,string node,int frame,int w,int h){
//
//bool imencode(const string& ext, InputArray img, vector<uchar>& buf, const vector<int>& params=vector<int>())
-
- return true;
+ //if (find_node_id)
+ if (nodes.find(node)!=nodes.end()){
+ float t=frame*framerate;
+ if (dynamic_cast<Signal_node*>(nodes[node])){
+ Time_spec ts=Time_spec(t,framerate,0.0f);
+ XML.addValue("signal",dynamic_cast<Signal_node*>(nodes[node])->get_output(ts));
+ return true;
+ }
+ if (dynamic_cast<Image_node*>(nodes[node])){
+ return true;
+ }
+ }
+ return false;
}
bool Graph::video_render(const string &output_filename,const string &audio_filename,const float framerate,float& progress) {