diff options
| author | Comment <tim@gray.(none)> | 2013-11-02 16:13:41 +0000 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-11-02 16:13:41 +0000 |
| commit | 510a5218d5e981db3dde9ed31ddc6f732ed6a22a (patch) | |
| tree | b9d09c4dbdefed1ec693e0492841cde426ef6643 /rotord/src/rotor.h | |
| parent | 8864f5da9649c176e472a7fb8913dd8114deec54 (diff) | |
| parent | eaccb1437465c6aa49e1d5511876852543e3b0fa (diff) | |
merge branch
Diffstat (limited to 'rotord/src/rotor.h')
| -rw-r--r-- | rotord/src/rotor.h | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index d9ba66d..94ec643 100644 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -75,6 +75,7 @@ Requirements #include <iostream> #include <json/json.h> +#include <rsvg.h> #include "Poco/Net/HTTPResponse.h" #include "Poco/Logger.h" @@ -205,7 +206,7 @@ namespace Rotor { class Attribute{ //description of a static attribute which can be an enumerated string array public: virtual ~Attribute(){}; - Attribute(const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={}): description(_desc),title(_title),value(_value),intVal(0){ + Attribute(const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={},std::string _type="string"): description(_desc),title(_title),value(_value),intVal(0),type(_type){ vals=_vals; init(_value); }; @@ -217,7 +218,7 @@ namespace Rotor { } else intVal=0; } - string value,description,title; + string value,description,title,type; std::vector<std::string> vals; int intVal; }; @@ -239,15 +240,15 @@ namespace Rotor { void create_parameter(const string &_name,const string &_type,const string &_desc,const string &_title,float _value=1.0f,float _min=0.0f,float _max=0.0f,float _step=0.0f,Node* _connect=nullptr) { parameters[_name]=new Parameter(_type,_desc,_title,_value,_min,_max,_step,_connect); }; - void create_attribute(const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={}) { - attributes[_attr]=new Attribute(_desc,_title,_value,_vals); + void create_attribute(const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={},std::string _type="string") { + attributes[_attr]=new Attribute(_desc,_title,_value,_vals,_type); }; - void create_attribute(string *alias,const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={}) { - create_attribute(_attr,_desc,_title,_value,_vals); + void create_attribute(string *alias,const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={},std::string _type="string") { + create_attribute(_attr,_desc,_title,_value,_vals,_type); alias=&(attributes[_attr]->value); }; - void create_attribute(int *alias,const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={}) { - create_attribute(_attr,_desc,_title,_value,_vals); + void create_attribute(int *alias,const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={},std::string _type="string") { + create_attribute(_attr,_desc,_title,_value,_vals,_type); alias=&(attributes[_attr]->intVal); }; virtual void init_attribute(const string &attr){}; @@ -342,17 +343,6 @@ namespace Rotor { protected: unsigned char *lut; }; - class Audio_processor: public Signal_node { - public: - virtual Audio_processor(){}; - virtual ~Audio_processor(){}; - virtual int process_frame(uint8_t *data,int samples)=0; - virtual bool init(int _channels,int _bits,int _samples,int _rate)=0; - virtual void cleanup()=0; - virtual void print_summary(){}; - virtual string get_features(){}; - int channels,bits,samples,rate; - }; //actual nodes------------------------------------------------- #define CYCLER_cut 1 #define CYCLER_mix 2 @@ -578,6 +568,24 @@ namespace Rotor { Image in1,in2,in2t,temp; //for blend frames; string *filename; }; + class Video_bank: public Image_node { + public: + Video_bank(){ + create_attribute("filenames","names of video files to load","File names","",{},"array"); + UID="73616e66-4306-11e3-981e-74d02b29f6a6"; + title="Video bank"; + description="Loads a banks of video files"; + }; + Video_bank(map<string,string> &settings): Video_bank() { + base_settings(settings); + }; + Image *output(const Frame_spec &frame){ + return nullptr; + } + Video_bank* clone(map<string,string> &_settings) { return new Video_bank(_settings);}; + ~Video_bank(){}; + private: + }; class Video_output: public Image_node { //Video_output 'presents' the output movie. Aspect ratio, bars, fadein/fadeout would happen here public: @@ -706,14 +714,16 @@ namespace Rotor { return NULL; }; bool list_node(const string &t,xmlIO XML); + bool list_node(const string &t,Json::Value &JSON); void list_node(Rotor::Node* type,xmlIO XML,int i=0); + Json::Value list_node(Rotor::Node* type); void list_nodes(xmlIO XML); void list_nodes(Json::Value &JSON); void list_categories(xmlIO XML); void list_categories(Json::Value &JSON); private: - unordered_map<string,Node*> type_map; - unordered_map<string,vector<Rotor::Node*> > category; + map<string,Node*> type_map; + map<string,vector<Rotor::Node*> > category; }; } |
