#ifndef RENDERCONTEXT_H #define RENDERCONTEXT_H #include "Poco/Task.h" #include "Poco/File.h" #include "Poco/StringTokenizer.h" #include "rotor.h" namespace Rotor { class Session_command { public: Session_command(){body="";}; string uid,method,id,body; vector commands; }; class Render_context: public Poco::Task { //Poco task object //manages a 'patchbay' //high level interfaces for the wizard //and low level interface onto the graph public: Render_context(const std::string& name): Task(name) { audio_thumb=new Audio_thumbnailer(); state=IDLE; output_framerate=25.0f; audio_loaded=false; xmlIO xml; if(xml.loadFile("settings.xml") ){ graph_dir=xml.getAttribute("Rotor","graph_dir","",0); media_dir=xml.getAttribute("Rotor","media_dir","",0); output_dir=xml.getAttribute("Rotor","output_dir","",0); } else cerr<<"Rotor: settings.xml not found, using defaults"< processors); bool load_video(const string &nodeID,const string &filename);//can be performance or clip private: int state; float progress; //for a locking process: audio analysis or rendering //thread only does one thing at once std::deque work_queue; Poco::Mutex mutex; //lock for access from parent thread std::string audio_filename; std::string output_filename; std::string graph_dir; std::string media_dir; std::string output_dir; Audio_thumbnailer *audio_thumb; Graph graph; Node_factory factory; float output_framerate; bool audio_loaded; }; } #endif