summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NT/src/graph.cpp2
-rw-r--r--NT/src/graph.h12
-rw-r--r--NT/src/rendercontext.cpp1
-rw-r--r--NT/src/rendercontext.h33
4 files changed, 40 insertions, 8 deletions
diff --git a/NT/src/graph.cpp b/NT/src/graph.cpp
index f774528..ef638cc 100644
--- a/NT/src/graph.cpp
+++ b/NT/src/graph.cpp
@@ -50,7 +50,7 @@ bool Graph::parse_json(string &data,string &media_path){
clear();
Node_factory factory;
check_audio(root["audio"].asString(),media_path);
- init(root["id"].asString(),root["description"].asString());
+ init(root["id"].asString());
Json::Value jnodes = root["nodes"];
for ( uint32_t i = 0; i < jnodes.size(); ++i ) {
string node_id=jnodes[i]["id"].asString();
diff --git a/NT/src/graph.h b/NT/src/graph.h
index 9213d71..7aa0318 100644
--- a/NT/src/graph.h
+++ b/NT/src/graph.h
@@ -19,12 +19,11 @@ namespace Rotor {
class Graph{
public:
Graph(){init();};
- Graph(const std::string& _uid,const std::string& _desc){
- init(_uid,_desc);
+ Graph(const std::string& _id){
+ init(_id);
};
- void init(const std::string& _uid="",const std::string& _desc=""){
- uid=_uid;
- description=_desc;
+ void init(const std::string& _id=""){
+ id=_id;
loaded=false;
audio_loaded=false;
cancelled=false;
@@ -71,8 +70,7 @@ namespace Rotor {
//Audio_thumbnailer *audio_thumb;
private:
- std::string uid;
- std::string description;
+ std::string id;
std::unordered_map<std::string,Node*> nodes;
};
diff --git a/NT/src/rendercontext.cpp b/NT/src/rendercontext.cpp
new file mode 100644
index 0000000..8c6f970
--- /dev/null
+++ b/NT/src/rendercontext.cpp
@@ -0,0 +1 @@
+#include "rendercontext.h" \ No newline at end of file
diff --git a/NT/src/rendercontext.h b/NT/src/rendercontext.h
new file mode 100644
index 0000000..ea7a8c1
--- /dev/null
+++ b/NT/src/rendercontext.h
@@ -0,0 +1,33 @@
+#ifndef RENDERCONTEXT_H
+#define RENDERCONTEXT_H
+
+/*------------------------
+
+Render context manages a rotor graph as a web service, and renders out linear movies
+
+
+TJR Jan 2014
+
+-------------------------*/
+
+#include "Poco/Task.h"
+
+#include "rotor.h"
+#include "graph.h"
+
+
+namespace Rotor {
+ class Render_context: public Poco::Task {
+ public:
+ Render_context(const std::string& id): Task(id) {
+ graph.init(id);
+ }
+ private:
+ Graph graph;
+ };
+
+};
+
+
+
+#endif //RENDERCONTEXT_H \ No newline at end of file