Added track-reselection to DTSC output
This commit is contained in:
parent
09b398f36c
commit
0c16ae5a80
1 changed files with 19 additions and 0 deletions
|
@ -52,6 +52,25 @@ namespace Mist {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutDTSC::sendNext(){
|
void OutDTSC::sendNext(){
|
||||||
|
//If there are now more selectable tracks, select the new track and do a seek to the current timestamp
|
||||||
|
//Set sentHeader to false to force it to send init data
|
||||||
|
if (selectedTracks.size() < 2){
|
||||||
|
static unsigned long long lastMeta = 0;
|
||||||
|
if (Util::epoch() > lastMeta + 5){
|
||||||
|
lastMeta = Util::epoch();
|
||||||
|
updateMeta();
|
||||||
|
if (myMeta.tracks.size() > 1){
|
||||||
|
size_t prevTrackCount = selectedTracks.size();
|
||||||
|
selectDefaultTracks();
|
||||||
|
if (selectedTracks.size() > prevTrackCount){
|
||||||
|
INFO_MSG("Picked up new track - selecting it and resetting state.");
|
||||||
|
sentHeader = false;
|
||||||
|
initialSeek();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
myConn.SendNow(thisPacket.getData(), thisPacket.getDataLen());
|
myConn.SendNow(thisPacket.getData(), thisPacket.getDataLen());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue