summaryrefslogtreecommitdiff
path: root/rotord/src/rendercontext.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-08-30 18:27:08 +0100
committerTim Redfern <tim@eclectronics.org>2013-08-30 18:27:08 +0100
commitc5085b5a31c1e25bf83ae910710996863531f8b2 (patch)
tree86bfd31285853f18f5ae436970deb0bc4f3e0fe1 /rotord/src/rendercontext.cpp
parentf38cdcf952ac5c631ed285282e1bc2943f199101 (diff)
value output from audio analysis
Diffstat (limited to 'rotord/src/rendercontext.cpp')
-rw-r--r--rotord/src/rendercontext.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/rotord/src/rendercontext.cpp b/rotord/src/rendercontext.cpp
index 7d85cce..3f20923 100644
--- a/rotord/src/rendercontext.cpp
+++ b/rotord/src/rendercontext.cpp
@@ -342,6 +342,31 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H
XML.addValue("error","Bad request");
}
}
+ if (command.commands[1]=="features") {
+ if (command.method=="GET") {
+ if(state==IDLE){
+ //parse json to get preview spec, return XML? this is a mess
+ string features_node=command.commands[2];
+ if (graph.print_features(XML,features_node)) {
+ status=HTTPResponse::HTTP_OK;
+ }
+ else {
+ status=HTTPResponse::HTTP_BAD_REQUEST;
+ logger.error("ERROR: Could not print features for node "+features_node);
+ }
+ }
+ else {
+ status=HTTPResponse::HTTP_BAD_REQUEST;
+ logger.error("ERROR: Session busy");
+ XML.addValue("error","Session busy");
+ }
+ }
+ else {
+ status=HTTPResponse::HTTP_BAD_REQUEST;
+ logger.error("ERROR: Bad request");
+ XML.addValue("error","Bad request");
+ }
+ }
if (command.commands[1]=="render") {
if (command.method=="GET") {
if(state==RENDERING){