diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-08-16 14:52:13 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-08-16 14:52:13 +0100 |
| commit | 5084f2e72df92416254905811af99f6e419de0cf (patch) | |
| tree | a78214a32c41942a544841b328df1276186c8bf1 /rotord/src/rendercontext.cpp | |
| parent | 10f50e4a6b8cbe83cf8c9bee238afe93a5958053 (diff) | |
fix command string issue on video load
Diffstat (limited to 'rotord/src/rendercontext.cpp')
| -rw-r--r-- | rotord/src/rendercontext.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/rotord/src/rendercontext.cpp b/rotord/src/rendercontext.cpp index 4825b96..0737b2d 100644 --- a/rotord/src/rendercontext.cpp +++ b/rotord/src/rendercontext.cpp @@ -62,8 +62,8 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H s+=c; s+=" "; } - cerr<<"uid:"<<command.uid<<" method:"<<command.method<<" id:"<<command.id\ - <<" commands:"<<s<<"body:"<<command.body<<endl; + //cerr<<"uid:"<<command.uid<<" method:"<<command.method<<" id:"<<command.id\ + //<<" commands:"<<s<<"body:"<<command.body<<endl; Logger& logger = Logger::get("Rotor"); status=HTTPResponse::HTTP_BAD_REQUEST; //error by default @@ -177,8 +177,8 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H if (audio_loaded) { add_queue(Session_task(command.uid,ANALYSE_AUDIO)); status=HTTPResponse::HTTP_OK; - logger.information("Starting audio analysis for graph: "+command.id); - XML.addValue("status","Starting audio analysis for graph: "+command.id); + logger.information("Starting audio analysis for graph: "+command.commands[0]); + XML.addValue("status","Starting audio analysis for graph: "+command.commands[0]); } } else { @@ -197,8 +197,8 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H if (audio_loaded) { add_queue(Session_task(command.uid,ANALYSE_AUDIO)); status=HTTPResponse::HTTP_OK; - logger.information("Starting audio analysis for graph: "+command.id); - XML.addValue("status","Starting audio analysis for graph: "+command.id); + logger.information("Starting audio analysis for graph: "+command.commands[0]); + XML.addValue("status","Starting audio analysis for graph: "+command.commands[0]); } } else { @@ -209,8 +209,8 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H } else { status=HTTPResponse::HTTP_NOT_FOUND; - logger.error("ERROR: "+command.id+" not found"); - XML.addValue("error",command.id+" not found"); + logger.error("ERROR: "+command.commands[0]+" not found"); + XML.addValue("error",command.commands[0]+" not found"); } } } @@ -263,17 +263,17 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H //check file exists Poco::File f=Poco::File(video_filename); if (f.exists()) { - if (load_video(command.id,video_filename)) { + if (load_video(command.commands[2],video_filename)) { //pass to worker thread ??if engine is ready?? ??what if engine has finished but results aren't read?? //DUMMY RESPONSE status=HTTPResponse::HTTP_OK; - logger.information("Succesfully loaded "+command.body+" into video node "+command.id); - XML.addValue("status","Succesfully loaded "+command.body+" into video node "+command.id); + logger.information("Succesfully loaded "+command.body+" into video node "+command.commands[2]); + XML.addValue("status","Succesfully loaded "+command.body+" into video node "+command.commands[2]); } else { status=HTTPResponse::HTTP_INTERNAL_SERVER_ERROR; - logger.error("ERROR: could not load "+command.body+" into video node "+command.id); - XML.addValue("error","could not load "+command.body+" into video node "+command.id); + logger.error("ERROR: could not load "+command.body+" into video node "+command.commands[2]); + XML.addValue("error","could not load "+command.body+" into video node "+command.commands[2]); } } else { |
