summaryrefslogtreecommitdiff
path: root/rotord/rotord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/rotord.cpp')
-rwxr-xr-xrotord/rotord.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/rotord/rotord.cpp b/rotord/rotord.cpp
index fc74801..6ea61df 100755
--- a/rotord/rotord.cpp
+++ b/rotord/rotord.cpp
@@ -188,12 +188,21 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS
}
}
else {
- if (command[0]=="audio") {
+ //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
+ if (command[1]=="audio") {
if (request.getMethod()=="PUT") {
//get audio file location and initiate analysis
- stringstream str;
- str << request.stream();
- //content << str;
+ std::string s;
+ std::ostringstream os;
+ os<<request.stream().rdbuf();
+ s=os.str();
+ //pass message to task
+ ((Poco::AutoPtr<Rotor::Render_context>)task)->add_queue(s);
+ content="<status>1</status>\n";
}
}