From a879f37ff944cd7bf502f4e3520b7da3d8faf39b Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Wed, 22 Jan 2014 14:28:34 +0000 Subject: variable arrays working correctly --- NT/src/graph.h | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'NT/src/graph.h') diff --git a/NT/src/graph.h b/NT/src/graph.h index 76a4c1c..9213d71 100644 --- a/NT/src/graph.h +++ b/NT/src/graph.h @@ -1,10 +1,10 @@ #ifndef GRAPH_H #define GRAPH_H -/* -Graph object manages a collection of nodes and provides the interface for rendering frames - +/* +Represents a graph of rotor nodes and includes methods to manipulate nodes +TJR Jan 2014 */ #include "rotor.h" @@ -29,7 +29,7 @@ namespace Rotor { audio_loaded=false; cancelled=false; //audio_thumb=new Audio_thumbnailer(); - Log_name=""; + //Log_name=""; }; ~Graph(){ clear(); @@ -46,33 +46,34 @@ namespace Rotor { //think video_render should be part of render context //graph should just encapsulate the manipulation of the graph //specific nodes can be created as output targets - std::string uid; - std::string description; - std::unordered_map nodes; + std::vector find_nodes(const std::string &type); Node* find_node(const std::string &type); - Json::Value signal_render(const std::string &node,const double framerate); - bool video_render(const std::string &output_filename,const double framerate,int start, int end); + //--context// Json::Value signal_render(const std::string &node,const double framerate); + //--context// bool video_render(const std::string &output_filename,const double framerate,int start, int end); bool load_file(std::string filename,std::string media_path); bool parse_json(std::string &data,std::string &media_path); - Json::Value preview(std::string &node ,std::string &format,int frame,int w,int h); + //--context// Json::Value preview(std::string &node ,std::string &format,int frame,int w,int h); bool check_audio (std::string audio ,std::string path); - Json::Value print_features (std::string &node); + //--context// Json::Value print_features (std::string &node); //bool load_audio(const std::string &filename, std::vector processors); - bool load_video(const std::string &node_id,const std::string &filename); + //bool load_video(const std::string &node_id,const std::string &filename); + //load audio and video should be methods of the nodes themselves? bool loaded; bool audio_loaded; std::string audio_filename; bool cancelled; double progress; - void set_log_name (std::string _Log_name){ - Log_name=_Log_name; - } + //void set_log_name (std::string _Log_name){ + //log name should be the same as the graph uid + //Log_name=_Log_name; + //} //Audio_thumbnailer *audio_thumb; private: - int analysis_seed; - std::string Log_name; + std::string uid; + std::string description; + std::unordered_map nodes; }; } -- cgit v1.2.3