summaryrefslogtreecommitdiff
path: root/rotord/src/rendercontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src/rendercontext.cpp')
-rw-r--r--rotord/src/rendercontext.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/rotord/src/rendercontext.cpp b/rotord/src/rendercontext.cpp
index 718d6ae..39cd8d2 100644
--- a/rotord/src/rendercontext.cpp
+++ b/rotord/src/rendercontext.cpp
@@ -115,6 +115,25 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H
}
}
}
+ if (command.commands[1]=="bitrate") {
+ if (command.method=="PUT") {
+ int b=toInt(command.body);
+ if (graph.set_bitrate(b)){
+ logger.information("bitrate set to "+command.body);
+ XML.addValue("status","bitrate set to "+command.body);
+ status=HTTPResponse::HTTP_OK;
+ }
+ else {
+ logger.error("ERROR: Could not set bitrate set to "+command.body);
+ XML.addValue("error","Could not set bitrate set to "+command.body);
+ }
+ }
+ else {
+ status=HTTPResponse::HTTP_BAD_REQUEST;
+ logger.error("ERROR: Bad request");
+ XML.addValue("error","Bad request");
+ }
+ }
if (command.commands[1]=="audio") {
if (command.method=="PUT") { //get audio file location and initiate analysis
if (command.body!="") {