Changed default fragment duration from 10s to 5s.

This commit is contained in:
Thulinma 2013-07-24 13:26:24 +02:00
parent 588e171733
commit 5b5d2d4f40

View file

@ -287,9 +287,9 @@ void DTSC::Stream::addPacket(JSON::Value & newPack){
while (fragIt != metadata["tracks"][newTrack]["keys"].ArrEnd() && fragIt != metadata["tracks"][newTrack]["keys"].ArrEnd() - 1){
newFrag["len"] = newFrag["len"].asInt() + 1;
newFrag["dur"] = newFrag["dur"].asInt() + (*fragIt)["len"].asInt();
//more than 10 seconds? store the new fragment
if (newFrag["dur"].asInt() >= 10000 || (*fragIt)["len"].asInt() < 2){
/// \todo Make this variable instead of hardcoded 10 seconds?
//more than 5 seconds? store the new fragment
if (newFrag["dur"].asInt() >= 5000 || (*fragIt)["len"].asInt() < 2){
/// \todo Make this variable instead of hardcoded 5 seconds?
metadata["tracks"][newTrack]["frags"].append(newFrag);
break;
}