summaryrefslogtreecommitdiff
path: root/rotord/src/rendercontext.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2014-01-27 17:02:45 +0000
committerTim Redfern <tim@eclectronics.org>2014-01-27 17:02:45 +0000
commit5d0be7d626be45e035df7d3e77a955f5afe2e67a (patch)
tree5e3aa6fe444a9fc67d90dd562dc37ccdf30771f6 /rotord/src/rendercontext.cpp
parentd1e12e5dbc41e9d05b40b611d7e62affb15b2ec7 (diff)
tinkering with mpd MPEG-DASH
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!="") {