Added selectDefaultTracks function.
This commit is contained in:
parent
9131ef80db
commit
5e4a56222e
3 changed files with 11 additions and 3 deletions
|
@ -241,9 +241,16 @@ namespace Mist {
|
|||
}
|
||||
statsPage = IPC::sharedClient("statistics", STAT_EX_SIZE, true);
|
||||
playerConn = IPC::sharedClient(streamName + "_users", 30, true);
|
||||
|
||||
updateMeta();
|
||||
|
||||
selectDefaultTracks();
|
||||
sought = false;
|
||||
}
|
||||
|
||||
void Output::selectDefaultTracks(){
|
||||
if (!isInitialized){
|
||||
initialize();
|
||||
return;
|
||||
}
|
||||
//check which tracks don't actually exist
|
||||
std::set<long unsigned int> toRemove;
|
||||
for (std::set<long unsigned int>::iterator it = selectedTracks.begin(); it != selectedTracks.end(); it++){
|
||||
|
@ -343,7 +350,6 @@ namespace Mist {
|
|||
DEBUG_MSG(DLVL_MEDIUM, "Selected tracks: %s (%lu)", selected.str().c_str(), selectedTracks.size());
|
||||
}
|
||||
|
||||
sought = false;
|
||||
}
|
||||
|
||||
/// Clears the buffer, sets parseData to false, and generally makes not very much happen at all.
|
||||
|
|
|
@ -59,6 +59,7 @@ namespace Mist {
|
|||
void setBlocking(bool blocking);
|
||||
long unsigned int getMainSelectedTrack();
|
||||
void updateMeta();
|
||||
void selectDefaultTracks();
|
||||
static bool listenMode(){return true;}
|
||||
//virtuals. The optional virtuals have default implementations that do as little as possible.
|
||||
virtual void sendNext() {}//REQUIRED! Others are optional.
|
||||
|
|
|
@ -211,6 +211,7 @@ namespace Mist {
|
|||
if (H.GetVar("video") != ""){
|
||||
selectedTracks.insert(JSON::Value(H.GetVar("video")).asInt());
|
||||
}
|
||||
selectDefaultTracks();
|
||||
onHTTP();
|
||||
H.Clean();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue