Removed minSkipAhead, improved seeking algorithm.
This commit is contained in:
parent
a4dc6c3944
commit
178c888e56
3 changed files with 1 additions and 4 deletions
|
@ -65,7 +65,6 @@ namespace Mist{
|
||||||
needsLookAhead = 0;
|
needsLookAhead = 0;
|
||||||
lastStats = 0;
|
lastStats = 0;
|
||||||
maxSkipAhead = 7500;
|
maxSkipAhead = 7500;
|
||||||
minSkipAhead = 5000;
|
|
||||||
realTime = 1000;
|
realTime = 1000;
|
||||||
lastRecv = Util::epoch();
|
lastRecv = Util::epoch();
|
||||||
if (myConn){
|
if (myConn){
|
||||||
|
@ -703,7 +702,7 @@ namespace Mist{
|
||||||
if (realTime){
|
if (realTime){
|
||||||
uint8_t i = 6;
|
uint8_t i = 6;
|
||||||
while (--i && thisPacket.getTime() > (((Util::getMS() - firstTime)*1000)+maxSkipAhead)/realTime && keepGoing()){
|
while (--i && thisPacket.getTime() > (((Util::getMS() - firstTime)*1000)+maxSkipAhead)/realTime && keepGoing()){
|
||||||
Util::sleep(std::min(thisPacket.getTime() - (((Util::getMS() - firstTime)*1000)+minSkipAhead)/realTime, 1000llu));
|
Util::sleep(std::min(thisPacket.getTime() - (((Util::getMS() - firstTime)*1000)+maxSkipAhead)/realTime, 1000llu));
|
||||||
stats();
|
stats();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,6 @@ namespace Mist {
|
||||||
|
|
||||||
//stream delaying variables
|
//stream delaying variables
|
||||||
unsigned int maxSkipAhead;///< Maximum ms that we will go ahead of the intended timestamps.
|
unsigned int maxSkipAhead;///< Maximum ms that we will go ahead of the intended timestamps.
|
||||||
unsigned int minSkipAhead;///< Minimum ms that we will go ahead of the intended timestamps.
|
|
||||||
unsigned int realTime;///< Playback speed in ms of data per second. eg: 0 is infinite, 1000 real-time, 5000 is 0.2X speed, 500 = 2X speed.
|
unsigned int realTime;///< Playback speed in ms of data per second. eg: 0 is infinite, 1000 real-time, 5000 is 0.2X speed, 500 = 2X speed.
|
||||||
uint32_t needsLookAhead;///< Amount of millis we need to be able to look ahead in the metadata
|
uint32_t needsLookAhead;///< Amount of millis we need to be able to look ahead in the metadata
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,6 @@ namespace Mist {
|
||||||
}
|
}
|
||||||
setBlocking(false);
|
setBlocking(false);
|
||||||
maxSkipAhead = 1500;
|
maxSkipAhead = 1500;
|
||||||
minSkipAhead = 500;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OutRTMP::onFinish(){
|
bool OutRTMP::onFinish(){
|
||||||
|
|
Loading…
Add table
Reference in a new issue