diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-08-28 16:53:18 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-08-28 16:53:18 +0100 |
| commit | caed9b7b05005ee2bcec8e7262bf5f63fe2a4df8 (patch) | |
| tree | 9d46493a1fc75df5577deabb559eead27934a873 /rotord/src/graph.cpp | |
| parent | aa2ae6cdc3e808960f51238d9c1298d54d27e4ef (diff) | |
signal node preview
Diffstat (limited to 'rotord/src/graph.cpp')
| -rw-r--r-- | rotord/src/graph.cpp | 17 |
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) { |
