Merge branch 'development' into LTS_development

This commit is contained in:
Thulinma 2016-08-03 10:00:42 +02:00
commit ae2e67e1bb
2 changed files with 15 additions and 0 deletions

View file

@ -552,6 +552,20 @@ namespace Mist {
return buffer.begin()->time;
}
///Return the end time of the VoD asset, or 0 if unknown.
uint64_t Output::endTime(){
if (myMeta.live){return 0;}
uint64_t end = 0;
for (std::set<long unsigned int>::iterator it = selectedTracks.begin(); it != selectedTracks.end(); it++){
if (myMeta.tracks.count(*it)){
if (end < myMeta.tracks[*it].lastms){
end = myMeta.tracks[*it].lastms;
}
}
}
return end;
}
/// Prepares all tracks from selectedTracks for seeking to the specified ms position.
void Output::seek(unsigned long long pos){
sought = true;

View file

@ -59,6 +59,7 @@ namespace Mist {
bool seek(unsigned int tid, unsigned long long pos, bool getNextKey = false);
void stop();
uint64_t currentTime();
uint64_t endTime();
void setBlocking(bool blocking);
long unsigned int getMainSelectedTrack();
void updateMeta();