summaryrefslogtreecommitdiff
path: root/rotord/src/rendercontext.cpp
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-09-23 11:51:28 +0100
committerComment <tim@gray.(none)>2013-09-23 11:51:28 +0100
commit6e615b00dbb54f33b928e0de0695087709fbc073 (patch)
treea852af1b89c007a05f84d36e8505913b34a08d45 /rotord/src/rendercontext.cpp
parent6fac9b5e406d7be3fbfd67cb5d21272727f6043a (diff)
MP4 fragmentation control API
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 e0a962c..53c7c64 100644
--- a/rotord/src/rendercontext.cpp
+++ b/rotord/src/rendercontext.cpp
@@ -134,6 +134,26 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H
XML.addValue("error","Bad request");
}
}
+ if (command.commands[1]=="fragmentation") {
+ if (command.method=="PUT") {
+ bool f=(toInt(command.body)!=0);
+ if (graph.set_fragmentation(f)){
+ string fs=f?"on":"off";
+ logger.information("MP4 fragmentation "+fs);
+ XML.addValue("status","MP4 fragmentation "+fs);
+ status=HTTPResponse::HTTP_OK;
+ }
+ else {
+ logger.error("ERROR: Could not set MP4 fragmentation");
+ XML.addValue("error","Could not set MP4 fragmentation");
+ }
+ }
+ 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!="") {