diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-09-07 14:57:23 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-09-07 14:57:23 +0100 |
| commit | 6f0f7600e22590b28fc6b0d11a28fa7a42931e20 (patch) | |
| tree | b18450ac2d291c6de46385e17bcbd13928e410b6 /rotord/src/graph.h | |
| parent | fea5bf3ffeac6f7a4c5cccb69c5ce51e4a42dbaf (diff) | |
refactoring
Diffstat (limited to 'rotord/src/graph.h')
| -rw-r--r-- | rotord/src/graph.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/rotord/src/graph.h b/rotord/src/graph.h new file mode 100644 index 0000000..1c76937 --- /dev/null +++ b/rotord/src/graph.h @@ -0,0 +1,54 @@ +#ifndef GRAPH_H +#define GRAPH_H + +#include "rotor.h" + +namespace Rotor { + class Graph{ + public: + Graph(){duration=20.0f;loaded = false;outW=640;outH=360;}; + Graph(const string& _uid,const string& _desc){ + init(_uid,_desc); + audio_loaded=false; + }; + void init(const string& _uid,const string& _desc){ + uid=_uid; + description=_desc; + duration=20.0f; + framerate=25.0f; + cancelled=false; + }; + string uid; //every version of a graph has a UUID, no particular need to actually read its data(?) + //?? is it faster than using strings?? + string description; + std::unordered_map<string,Node*> nodes; + vector<Node*> find_nodes(const string &type); //could be a way of finding a set based on capabilities? + Node* find_node(const string &type); + bool signal_render(string &signal_xml,const float framerate); + bool video_render(const string &output_filename,const float framerate,float& progress); + bool load(string data,string media_path); + bool loadFile(string &filename,string media_path); + bool parseXml(string media_path); + bool parseJson(string &data,string &media_path); + bool set_resolution(int w,int h); + bool preview(xmlIO &XML,string &node,string &format,int frame,int w,int h); + bool check_audio(string audio,string path); + bool print_features(xmlIO &XML,string &node); + bool load_audio(const string &filename,vector<Audio_processor*> processors); + bool load_video(const string &nodeID,const string &filename);//can be performance or clip + bool loaded; + float duration; + float framerate; + const string toString(); + xmlIO xml; + bool audio_loaded; + string audio_filename; + bool cancelled; + float progress; + private: + Node_factory factory; + int outW,outH; + + }; +} +#endif |
