diff options
Diffstat (limited to 'rotord/rotor.h')
| -rwxr-xr-x | rotord/rotor.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/rotord/rotor.h b/rotord/rotor.h index 4a6c8d3..e5b4085 100755 --- a/rotord/rotor.h +++ b/rotord/rotor.h @@ -115,6 +115,7 @@ namespace Rotor { //forward declaration class Node; class Signal_node; + class Image_node; //http://blog.tomaka17.com/2012/03/libavcodeclibavformat-tutorial/ struct Packet { @@ -187,12 +188,12 @@ namespace Rotor { }; class Image_input: public Input{ public: - bool connect(Image_node* source); + bool connect(Image_node *source); Image_input(const string &_desc): Input(_desc){}; }; class Signal_input: public Input{ public: - bool connect(Signal_node* source); + bool connect(Signal_node *source); Signal_input(const string &_desc): Input(_desc){}; }; @@ -263,11 +264,12 @@ namespace Rotor { }; class Image_node: public Node{ public: - vector<Image_input> image_inputs; //image node also has image inputs and outputs + vector<Image_input*> image_inputs; //image node also has image inputs and outputs + void create_image_input(const string &description) {image_inputs.push_back(new Image_input(description));}; Image *get_output(const Frame_spec &frame){ //sample implementation //do something with the inputs //and then - return ((Image_node*)image_inputs[0].connection)->get_output(frame); + return ((Image_node*)(image_inputs[0]->connection))->get_output(frame); } Image *get_preview(const Frame_spec &frame); Image *image; //this can be privately allocated or just passed on as the node see fit |
