HLS-related buffer size optimizes
This commit is contained in:
parent
f53882a822
commit
9e391915df
4 changed files with 28 additions and 16 deletions
|
@ -289,6 +289,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();
|
||||
|
|
|
@ -1218,6 +1218,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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue