Moved getMainSelectedTrack to InOutBase class
This commit is contained in:
parent
7c1a6fe7ce
commit
363df9aacf
4 changed files with 15 additions and 15 deletions
14
src/io.cpp
14
src/io.cpp
|
@ -29,6 +29,20 @@ namespace Mist {
|
|||
|
||||
}
|
||||
|
||||
/// Returns the ID of the main selected track, or 0 if no tracks are selected.
|
||||
/// The main track is the first video track, if any, and otherwise the first other track.
|
||||
long unsigned int InOutBase::getMainSelectedTrack(){
|
||||
if (!selectedTracks.size()){
|
||||
return 0;
|
||||
}
|
||||
for (std::set<long unsigned int>::iterator it = selectedTracks.begin(); it != selectedTracks.end(); it++){
|
||||
if (myMeta.tracks.count(*it) && myMeta.tracks[*it].type == "video"){
|
||||
return *it;
|
||||
}
|
||||
}
|
||||
return *(selectedTracks.begin());
|
||||
}
|
||||
|
||||
void negotiationProxy::clear(){
|
||||
pagesByTrack.clear();
|
||||
trackOffset.clear();
|
||||
|
|
1
src/io.h
1
src/io.h
|
@ -70,6 +70,7 @@ namespace Mist {
|
|||
void bufferFinalize(unsigned long tid);
|
||||
void bufferRemove(unsigned long tid, unsigned long pageNumber);
|
||||
virtual void bufferLivePacket(const DTSC::Packet & packet);
|
||||
long unsigned int getMainSelectedTrack();
|
||||
protected:
|
||||
void continueNegotiate(unsigned long tid, bool quickNegotiate = false);
|
||||
void continueNegotiate();
|
||||
|
|
|
@ -771,20 +771,6 @@ namespace Mist{
|
|||
return 0;
|
||||
}
|
||||
|
||||
/// Returns the ID of the main selected track, or 0 if no tracks are selected.
|
||||
/// The main track is the first video track, if any, and otherwise the first other track.
|
||||
long unsigned int Output::getMainSelectedTrack(){
|
||||
if (!selectedTracks.size()){
|
||||
return 0;
|
||||
}
|
||||
for (std::set<long unsigned int>::iterator it = selectedTracks.begin(); it != selectedTracks.end(); it++){
|
||||
if (myMeta.tracks.count(*it) && myMeta.tracks[*it].type == "video"){
|
||||
return *it;
|
||||
}
|
||||
}
|
||||
return *(selectedTracks.begin());
|
||||
}
|
||||
|
||||
void Output::dropTrack(uint32_t trackId, std::string reason, bool probablyBad){
|
||||
//depending on whether this is probably bad and the current debug level, print a message
|
||||
unsigned int printLevel = DLVL_INFO;
|
||||
|
|
|
@ -50,7 +50,6 @@ namespace Mist {
|
|||
uint64_t startTime();
|
||||
uint64_t endTime();
|
||||
void setBlocking(bool blocking);
|
||||
long unsigned int getMainSelectedTrack();
|
||||
void updateMeta();
|
||||
void selectDefaultTracks();
|
||||
bool connectToFile(std::string file);
|
||||
|
|
Loading…
Add table
Reference in a new issue