Commit 798169a1 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: adaptive: add playlist max buffer value

parent 8ef9ad86
......@@ -86,6 +86,12 @@ mtime_t AbstractPlaylist::getMinBuffering() const
return std::max(minBufferTime, 6*CLOCK_FREQ);
}
mtime_t AbstractPlaylist::getMaxBuffering() const
{
const mtime_t minbuf = getMinBuffering();
return std::min(minbuf * 3 / 2, minbuf + 6 * CLOCK_FREQ);
}
Url AbstractPlaylist::getUrlSegment() const
{
Url ret;
......
......@@ -44,6 +44,7 @@ namespace adaptive
void setType(const std::string &);
void setMinBuffering( mtime_t );
mtime_t getMinBuffering() const;
mtime_t getMaxBuffering() const;
virtual void debug() = 0;
void addPeriod (BasePeriod *period);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment