From caed9b7b05005ee2bcec8e7262bf5f63fe2a4df8 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Wed, 28 Aug 2013 16:53:18 +0100 Subject: signal node preview --- rotord/src/graph.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'rotord/src/graph.cpp') 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& buf, const vector& params=vector()) - - return true; + //if (find_node_id) + if (nodes.find(node)!=nodes.end()){ + float t=frame*framerate; + if (dynamic_cast(nodes[node])){ + Time_spec ts=Time_spec(t,framerate,0.0f); + XML.addValue("signal",dynamic_cast(nodes[node])->get_output(ts)); + return true; + } + if (dynamic_cast(nodes[node])){ + return true; + } + } + return false; } bool Graph::video_render(const string &output_filename,const string &audio_filename,const float framerate,float& progress) { -- cgit v1.2.3