Generic input page loading re-prioritization edit

This commit is contained in:
Thulinma 2023-02-23 02:56:18 +01:00
parent 0c716714df
commit 6b88525e2f
6 changed files with 77 additions and 12 deletions

View file

@ -229,7 +229,7 @@ namespace Mist{
bool Output::isReadyForPlay(){
// If a protocol does not support any codecs, we assume you know what you're doing
if (!capa.isMember("codecs")){return true;}
if (!capa.isMember("codecs") || !capa["codecs"].size() || !capa["codecs"].isArray() || !capa["codecs"][0u].size()){return true;}
if (!isInitialized){return false;}
meta.reloadReplacedPagesIfNeeded();
if (getSupportedTracks().size()){
@ -809,6 +809,10 @@ namespace Mist{
for (std::map<size_t, Comms::Users>::iterator it = userSelect.begin(); it != userSelect.end(); it++){
seekTracks.insert(it->first);
}
//Seek all seek positions, first
for (std::set<size_t>::iterator it = seekTracks.begin(); it != seekTracks.end(); it++){
userSelect[*it].setKeyNum(M.getKeyNumForTime(*it, pos));
}
bool ret = seekTracks.size();
for (std::set<size_t>::iterator it = seekTracks.begin(); it != seekTracks.end(); it++){
ret &= seek(*it, pos, false);

View file

@ -122,7 +122,7 @@ namespace Mist{
capa["provides"] = "HTTP";
capa["protocol"] = "http://";
capa["url_rel"] = "/$.html";
capa["codecs"][0u][0u].append("+*");
capa["codecs"][0u].null();
capa["url_match"].append("/crossdomain.xml");
capa["url_match"].append("/clientaccesspolicy.xml");
capa["url_match"].append("/$.html");

View file

@ -1452,7 +1452,7 @@ namespace Mist{
fragSeqNum = 0;
idleInterval = 1000;
maxSkipAhead = 0;
dataWaitTimeout = 450;
if (M.getLive()){dataWaitTimeout = 450;}
}
void OutMP4::onWebsocketFrame() {
@ -1735,7 +1735,7 @@ namespace Mist{
if (jitter < M.getMinKeepAway(it->first)){jitter = M.getMinKeepAway(it->first);}
}
r["data"]["jitter"] = jitter;
if (dataWaitTimeout < jitter*1.5){dataWaitTimeout = jitter*1.5;}
if (M.getLive() && dataWaitTimeout < jitter*1.5){dataWaitTimeout = jitter*1.5;}
if (capa["maxdelay"].asInt() < jitter*1.5){capa["maxdelay"] = jitter*1.5;}
webSock->sendFrame(r.toString());
}