Merge branch 'development' into LTS_development

# Conflicts:
#	src/output/output_hls.cpp
This commit is contained in:
Thulinma 2016-06-26 21:16:06 +02:00
commit 02ac648bae
4 changed files with 27 additions and 15 deletions

View file

@ -313,6 +313,7 @@ namespace DTSC {
void reset();
void toPrettyString(std::ostream & str, int indent = 0, int verbosity = 0);
void finalize();
uint32_t biggestFragment();
std::string getIdentifier();
std::string getWritableIdentifier();

View file

@ -1272,6 +1272,17 @@ namespace DTSC {
void Track::finalize(){
keys.rbegin()->setLength(lastms - keys.rbegin()->getTime() + parts.rbegin()->getDuration());
}
/// Returns the duration in ms of the longest-duration fragment.
uint32_t Track::biggestFragment(){
uint32_t ret = 0;
for (unsigned int i = 0; i<fragments.size(); i++){
if (fragments[i].getDuration() > ret){
ret = fragments[i].getDuration();
}
}
return ret;
}
///\brief Returns a key given its number, or an empty key if the number is out of bounds
Key & Track::getKey(unsigned int keyNum) {