From c5085b5a31c1e25bf83ae910710996863531f8b2 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Fri, 30 Aug 2013 18:27:08 +0100 Subject: value output from audio analysis --- rotord/src/rendercontext.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'rotord/src/rendercontext.cpp') 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){ -- cgit v1.2.3