summaryrefslogtreecommitdiff
path: root/rotord/rotor.h
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-02-22 15:17:08 +0000
committerTim Redfern <tim@herge.(none)>2013-02-22 15:17:08 +0000
commit6fee126dc8ed8cc7c961c683f17896450dd8de03 (patch)
treea3d68a43ddf6ed684a640ae2296c805720d4d5e9 /rotord/rotor.h
parent2cc106d2ca074a80d3e1c4a367951ea391f890d9 (diff)
loader for render context
Diffstat (limited to 'rotord/rotor.h')
-rw-r--r--rotord/rotor.h30
1 files changed, 22 insertions, 8 deletions
diff --git a/rotord/rotor.h b/rotord/rotor.h
index 7f18ee5..32b0173 100644
--- a/rotord/rotor.h
+++ b/rotord/rotor.h
@@ -51,6 +51,15 @@ authentication to renderer or just session?
files - where
generated images & movies where?
+nb where a signal enters a channel comp input - it is duplicated
+
+next - Poco create thread
+
+1st - create thread and return id - create method to kill it
+
+sql stuff
+
+
*/
#include <unordered_map>
@@ -67,6 +76,10 @@ using Poco::UUIDGenerator;
#define ROTOR_RENDERING 3
namespace Rotor {
+ class Command{
+ //passes a command from the RESTful url to create/ alter a thread
+ vector<string> packets;
+ };
//forward declaration
class Node;
@@ -80,8 +93,8 @@ namespace Rotor {
int num_performances;
int num_clips;
};
- class Render_context{ //Poco thread object
- //manages access to the 'patchbay'
+ class Render_context: public Poco::Runnable{ //Poco thread object
+ //manages a 'patchbay'
//high level interfaces for the wizard
//and low level interface onto the graph
public:
@@ -119,7 +132,7 @@ namespace Rotor {
vector<Signal_input> inputs; //simple node has signal inputs and outputs
void get_output(float time);
void gather_inputs(float time) {
- for (int i=0;i<inputs.size();i++){
+ for (uint i=0;i<inputs.size();i++){
if (inputs[i].connection) inputs[i].connection->get_output(time);
}
}
@@ -131,16 +144,17 @@ namespace Rotor {
public:
vector<Image_input> image_inputs; //image node also has image inputs and outputs
void gather_inputs(float time) {
- for (int i=0;i<inputs.size();i++){
- if (inputs[i].connection) inputs[i].connection->get_output(time);
+ Node::gather_inputs(time);
+ for (uint i=0;i<image_inputs.size();i++){
+ if (image_inputs[i].connection) image_inputs[i].connection->get_output(time);
}
}
- Image& get_output(float time){ //sample implementation
+ Image* get_output(float time){ //sample implementation
gather_inputs(time);
- //do something: i.e
+ //do something with the inputs
//and then
- return &inputs[0].connection->image;
+ return ((Image_node*)image_inputs[0].connection)->image;
}
void get_preview(float time);
Image* image; //this can be privately allocated or just passed on as the node see fit