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.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/rotord/src/rendercontext.cpp b/rotord/src/rendercontext.cpp
index 6d76fbc..813573b 100644
--- a/rotord/src/rendercontext.cpp
+++ b/rotord/src/rendercontext.cpp
@@ -152,6 +152,26 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H
XML.addValue("error","Bad request");
}
}
+ if (command.commands[1]=="dash") {
+ if (command.method=="PUT") {
+ bool f=(toInt(command.body)!=0);
+ if (graph.set_dash(f)){
+ string fs=f?"on":"off";
+ logger.information("MPEG-DASH output "+fs);
+ XML.addValue("status","MPEG-DASH output "+fs);
+ status=HTTPResponse::HTTP_OK;
+ }
+ else {
+ logger.error("ERROR: Could not set MPEG-DASH output");
+ XML.addValue("error","Could not set MPEG-DASH output");
+ }
+ }
+ 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!="") {