summaryrefslogtreecommitdiff
path: root/rotord/src/rendercontext.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-08-16 14:52:13 +0100
committerTim Redfern <tim@eclectronics.org>2013-08-16 14:52:13 +0100
commit5084f2e72df92416254905811af99f6e419de0cf (patch)
treea78214a32c41942a544841b328df1276186c8bf1 /rotord/src/rendercontext.cpp
parent10f50e4a6b8cbe83cf8c9bee238afe93a5958053 (diff)
fix command string issue on video load
Diffstat (limited to 'rotord/src/rendercontext.cpp')
-rw-r--r--rotord/src/rendercontext.cpp26
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 {