diff options
| author | Tim Redfern <tim@herge.(none)> | 2013-02-27 16:47:24 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@herge.(none)> | 2013-02-27 16:47:24 +0000 |
| commit | 2f3b709e63e9aba347f6513565d4283b24b351d3 (patch) | |
| tree | 7ce73bea02bf1717e141f620aa1ade7e10ec9f1a /rotord/rotord.cpp | |
| parent | 06c11d8aa29e3a097c3ceb076b7d78f1c28a974f (diff) | |
audio plugin worker
Diffstat (limited to 'rotord/rotord.cpp')
| -rwxr-xr-x | rotord/rotord.cpp | 31 |
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; + } } } |
