From 8fe0c8d0fd02d42ecd68e562c734d4f41cb41700 Mon Sep 17 00:00:00 2001 From: Comment Date: Sun, 9 Feb 2014 22:08:45 +0000 Subject: NT command sequence restructure --- NT/src/rendercontext.cpp | 18 +++++++++--------- NT/src/rendercontext.h | 7 ++++--- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'NT/src') diff --git a/NT/src/rendercontext.cpp b/NT/src/rendercontext.cpp index 631f4b8..28e722d 100644 --- a/NT/src/rendercontext.cpp +++ b/NT/src/rendercontext.cpp @@ -35,15 +35,15 @@ void Render_context::runTask() { renders[cmd.uid].status=FAILED; } } - if(cmd.task==LOAD_GRAPH) { + if(cmd.task==LOAD_GRAPH_FILE||cmd.task==LOAD_GRAPH_STRING) { state=LOADING_GRAPH; - if (graph_filename!="") { - if (!graph.loadFile(cmd.message,media_path)){ - cerr<<"Rotor: failed to load graph from "<2) { - string video_filename=media_dir+command.body; + string video_filename=media_path+command.body; //check file exists Poco::File f=Poco::File(video_filename); if (f.exists()) { diff --git a/NT/src/rendercontext.h b/NT/src/rendercontext.h index 3ac9c08..72c589e 100644 --- a/NT/src/rendercontext.h +++ b/NT/src/rendercontext.h @@ -72,9 +72,9 @@ namespace Rotor { }; class Render_context: public Poco::Task { public: - Render_context(const std::string& _id,const std::string& _media_dir=""): Task(_id) { + Render_context(const std::string& _id,const std::string& _media_path=""): Task(_id) { id=_id; - media_dir=_media_dir; + media_path=_media_path; graph.init(id); //set up log AutoPtr splitterChannel(new SplitterChannel()); @@ -122,7 +122,8 @@ namespace Rotor { std::unordered_map renders; std::unordered_map profiles; std::string profile; - std::string media_dir; + std::string media_path; + std::string graph_path; std::deque work_queue; Poco::Mutex mutex; -- cgit v1.2.3