summaryrefslogtreecommitdiff
path: root/rotord/rotord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/rotord.cpp')
-rwxr-xr-xrotord/rotord.cpp31
1 files changed, 11 insertions, 20 deletions
diff --git a/rotord/rotord.cpp b/rotord/rotord.cpp
index c4103e3..21ce639 100755
--- a/rotord/rotord.cpp
+++ b/rotord/rotord.cpp
@@ -69,7 +69,7 @@ void AudioAnalyserHandler::handleRequest(HTTPServerRequest& request,HTTPServerRe
ostr << "</head>";
ostr << "<body><p style=\"text-align: center; "
"font-size: 48px;\">";
- vampHost::runPlugin("",settings.soname,settings.filtername, "",0, settings.inputFile, ostr,true);
+ vampHost::runPlugin("",settings.soname,settings.filtername, "",0, settings.inputFile, ostr,true);
ostr << "</p></body></html>";
}
@@ -187,36 +187,27 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS
content="<status>Rotor: render context invoked with no command</status>\n";
}
}
- else {
- //in a way the rest of this stuff happens inside the thread
- //its not elegant to decipher the message just to assemble another message to decipher elsewhere!
- //pass a message object with the command type and contents selected?
- //every action will have a seperate work function in the render_context
- //some of these functions have to return data immediately- maybe a queue isn't the ideal model
- //what's the best way to seperate these?
- //could have a seperate mutex for the graph
- //all the get methods want to get something from the render context and express it in xml.
- //what is the best way...
- //should the processing be done inside the render context - I think so
-
- //++++ processing inside object
- //---- processing occurring in different places
-
- //the idea of command queueing won't work
-
+ else { //session modifier command- to be passed to render context
+ //some commands need to return error codes
+ //ie where the audio file isn't found
+ //on the other hand, some commands need to know state of the renderer?
std::string s;
std::ostringstream os;
os<<request.stream().rdbuf();
s=os.str();
- vector<string> sc;
+ vector<string> sc; //method,id,command1,{command2,}{body}
sc.push_back(request.getMethod());
for (auto& i: command){
sc.push_back(i);
}
sc.push_back(s);
- content=((Poco::AutoPtr<Rotor::Render_context>)task)->session_command(command);
+ Rotor::Command_response response=((Poco::AutoPtr<Rotor::Render_context>)task)->session_command(sc);
+
+ content=response.description;
+ status=response.status;
+
}
}
}