Merge branch 'development' into LTS_development
# Conflicts: # lib/bitfields.h # src/input/input.cpp # src/output/output.cpp
This commit is contained in:
commit
ad29c297c2
11 changed files with 130 additions and 16 deletions
|
@ -611,6 +611,20 @@ namespace Mist {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Input::trackSelect(std::string trackSpec){
|
||||
selectedTracks.clear();
|
||||
size_t index;
|
||||
while (trackSpec != "") {
|
||||
index = trackSpec.find(' ');
|
||||
selectedTracks.insert(atoi(trackSpec.substr(0, index).c_str()));
|
||||
if (index != std::string::npos) {
|
||||
trackSpec.erase(0, index + 1);
|
||||
} else {
|
||||
trackSpec = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Input::parseHeader() {
|
||||
if (hasSrt){
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace Mist {
|
|||
void quitPlay();
|
||||
void checkHeaderTimes(std::string streamFile);
|
||||
virtual void removeUnused();
|
||||
virtual void trackSelect(std::string trackSpec){};
|
||||
virtual void trackSelect(std::string trackSpec);
|
||||
virtual void userCallback(char * data, size_t len, unsigned int id);
|
||||
virtual void convert();
|
||||
virtual void serve();
|
||||
|
|
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
|
@ -77,6 +77,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();
|
||||
|
|
|
@ -1246,20 +1246,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;
|
||||
|
|
|
@ -54,7 +54,6 @@ namespace Mist {
|
|||
uint64_t endTime();
|
||||
uint64_t liveTime();
|
||||
void setBlocking(bool blocking);
|
||||
long unsigned int getMainSelectedTrack();
|
||||
void updateMeta();
|
||||
void selectTrack(const std::string &trackType, const std::string &trackVal); /*LTS*/
|
||||
void selectDefaultTracks();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue