Allow setting of play back rate multiplier in MP4 output through the "rate" GET parameter.

This commit is contained in:
Thulinma 2015-07-11 01:05:18 +02:00
parent 0fdf39db8c
commit ec78f92b8e

View file

@ -490,6 +490,16 @@ namespace Mist {
maxSkipAhead = JSON::Value(H.GetVar("buffer")).asInt() * 1000;
minSkipAhead = maxSkipAhead - std::min(2500u, maxSkipAhead / 2);
}
//allow setting of play back rate through buffer variable.
//play back rate is set in MS per second, but the variable is a simple multiplier.
if (H.GetVar("rate") != ""){
long long int multiplier = JSON::Value(H.GetVar("rate")).asInt();
if (multiplier){
realTime = 1000 / multiplier;
}else{
realTime = 0;
}
}
/*LTS-END*/
initialize();
parseData = true;