Added options to DTSC pull for controlling the buffer config. Made 8X target duration the default buffer size. Inputs now wait for INPUT_TIMEOUT *and* two biggestFragment durations, added a few helper functions to DTSC::Meta. Buffer now automatically sets segment size to min(configed_size, biggest_fragment/2) to prevent sudden reductions of fragment sizes by more than 50%
This commit is contained in:
parent
915a10207b
commit
3ee83644f3
2 changed files with 20 additions and 2 deletions
|
@ -897,7 +897,7 @@ namespace Mist {
|
|||
}
|
||||
//if the new value is different, print a message and apply it
|
||||
if (cutTime != tmpNum) {
|
||||
DEBUG_MSG(DLVL_DEVEL, "Setting cutTime from %u to new value of %lli", cutTime, tmpNum);
|
||||
INFO_MSG("Setting cutTime from %u to new value of %lli", cutTime, tmpNum);
|
||||
cutTime = tmpNum;
|
||||
}
|
||||
|
||||
|
@ -931,9 +931,12 @@ namespace Mist {
|
|||
tmpNum = config->getOption("segmentsize").asInt();
|
||||
}
|
||||
}
|
||||
if (tmpNum < myMeta.biggestFragment()/2){
|
||||
tmpNum = myMeta.biggestFragment()/2;
|
||||
}
|
||||
//if the new value is different, print a message and apply it
|
||||
if (segmentSize != tmpNum) {
|
||||
DEBUG_MSG(DLVL_DEVEL, "Setting segmentSize from %u to new value of %lli", segmentSize, tmpNum);
|
||||
INFO_MSG("Setting segmentSize from %u to new value of %lli", segmentSize, tmpNum);
|
||||
segmentSize = tmpNum;
|
||||
}
|
||||
/*LTS-END*/
|
||||
|
|
|
@ -40,6 +40,21 @@ namespace Mist {
|
|||
capa["optional"]["DVR"]["option"] = "--buffer";
|
||||
capa["optional"]["DVR"]["type"] = "uint";
|
||||
capa["optional"]["DVR"]["default"] = 50000LL;
|
||||
/*LTS-START*/
|
||||
option.null();
|
||||
option["arg"] = "integer";
|
||||
option["long"] = "segment-size";
|
||||
option["short"] = "S";
|
||||
option["help"] = "Target time duration in milliseconds for segments";
|
||||
option["value"].append(5000LL);
|
||||
config->addOption("segmentsize", option);
|
||||
capa["optional"]["segmentsize"]["name"] = "Segment size (ms)";
|
||||
capa["optional"]["segmentsize"]["help"] = "Target time duration in milliseconds for segments.";
|
||||
capa["optional"]["segmentsize"]["option"] = "--segment-size";
|
||||
capa["optional"]["segmentsize"]["type"] = "uint";
|
||||
capa["optional"]["segmentsize"]["default"] = 5000LL;
|
||||
/*LTS-END*/
|
||||
|
||||
}
|
||||
|
||||
bool inputDTSC::needsLock(){
|
||||
|
|
Loading…
Add table
Reference in a new issue