Decreased RTMP latency
This commit is contained in:
parent
95706337c1
commit
4fb1031508
1 changed files with 8 additions and 11 deletions
|
@ -73,7 +73,7 @@ namespace Mist{
|
||||||
setBlocking(false);
|
setBlocking(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
maxSkipAhead = 1500;
|
maxSkipAhead = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutRTMP::startPushOut(const char *args){
|
void OutRTMP::startPushOut(const char *args){
|
||||||
|
@ -340,21 +340,18 @@ namespace Mist{
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutRTMP::sendNext(){
|
void OutRTMP::sendNext(){
|
||||||
// If there are now more selectable tracks, select the new track and do a seek to the current
|
//Every 5s, check if the track selection should change in live streams, and do it.
|
||||||
// timestamp Set sentHeader to false to force it to send init data
|
if (M.getLive()){
|
||||||
if (M.getLive() && userSelect.size() < 2){
|
|
||||||
static uint64_t lastMeta = 0;
|
static uint64_t lastMeta = 0;
|
||||||
if (Util::epoch() > lastMeta + 5){
|
if (Util::epoch() > lastMeta + 5){
|
||||||
lastMeta = Util::epoch();
|
lastMeta = Util::epoch();
|
||||||
std::set<size_t> validTracks = getSupportedTracks();
|
if (selectDefaultTracks()){
|
||||||
if (validTracks.size() > 1){
|
INFO_MSG("Track selection changed - resending headers and continuing");
|
||||||
if (selectDefaultTracks()){
|
sentHeader = false;
|
||||||
INFO_MSG("Track selection changed - resending headers and continuing");
|
return;
|
||||||
sentHeader = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (liveSeek()){return;}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (streamOut.size()){
|
if (streamOut.size()){
|
||||||
|
|
Loading…
Add table
Reference in a new issue