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 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!="") {