Commit 466b4a73 authored by Steve Lhomme's avatar Steve Lhomme

demux:adaptive: the min/max buffering are mtime_t so pass them down as such

parent 157d23d4
......@@ -209,7 +209,7 @@ static bool streamCompare(const PrioritizedAbstractStream &a, const Prioritized
}
AbstractStream::buffering_status PlaylistManager::bufferize(mtime_t i_nzdeadline,
unsigned i_min_buffering, unsigned i_extra_buffering)
mtime_t i_min_buffering, mtime_t i_extra_buffering)
{
AbstractStream::buffering_status i_return = AbstractStream::buffering_end;
......@@ -617,8 +617,8 @@ void PlaylistManager::setBufferingRunState(bool b)
void PlaylistManager::Run()
{
vlc_mutex_lock(&lock);
const unsigned i_min_buffering = playlist->getMinBuffering();
const unsigned i_extra_buffering = playlist->getMaxBuffering() - i_min_buffering;
const mtime_t i_min_buffering = playlist->getMinBuffering();
const mtime_t i_extra_buffering = playlist->getMaxBuffering() - i_min_buffering;
while(1)
{
mutex_cleanup_push(&lock);
......
......@@ -57,7 +57,7 @@ namespace adaptive
bool start();
void stop();
AbstractStream::buffering_status bufferize(mtime_t, unsigned, unsigned);
AbstractStream::buffering_status bufferize(mtime_t, mtime_t, mtime_t);
AbstractStream::status dequeue(mtime_t, mtime_t *);
void drain();
......
......@@ -295,14 +295,14 @@ mtime_t AbstractStream::getDemuxedAmount() const
}
AbstractStream::buffering_status AbstractStream::bufferize(mtime_t nz_deadline,
unsigned i_min_buffering, unsigned i_extra_buffering)
mtime_t i_min_buffering, mtime_t i_extra_buffering)
{
last_buffer_status = doBufferize(nz_deadline, i_min_buffering, i_extra_buffering);
return last_buffer_status;
}
AbstractStream::buffering_status AbstractStream::doBufferize(mtime_t nz_deadline,
unsigned i_min_buffering, unsigned i_extra_buffering)
mtime_t i_min_buffering, mtime_t i_extra_buffering)
{
vlc_mutex_lock(&lock);
......@@ -353,7 +353,7 @@ AbstractStream::buffering_status AbstractStream::doBufferize(mtime_t nz_deadline
}
}
const int64_t i_total_buffering = i_min_buffering + i_extra_buffering;
const mtime_t i_total_buffering = i_min_buffering + i_extra_buffering;
mtime_t i_demuxed = commandsqueue->getDemuxedAmount();
segmentTracker->notifyBufferingLevel(i_min_buffering, i_demuxed, i_total_buffering);
......
......@@ -83,7 +83,7 @@ namespace adaptive
buffering_ongoing,
buffering_lessthanmin,
} buffering_status;
buffering_status bufferize(mtime_t, unsigned, unsigned);
buffering_status bufferize(mtime_t, mtime_t, mtime_t);
buffering_status getLastBufferStatus() const;
mtime_t getDemuxedAmount() const;
status dequeue(mtime_t, mtime_t *);
......@@ -134,7 +134,7 @@ namespace adaptive
vlc_mutex_t lock; /* lock for everything accessed by dequeuing */
private:
buffering_status doBufferize(mtime_t, unsigned, unsigned);
buffering_status doBufferize(mtime_t, mtime_t, mtime_t);
buffering_status last_buffer_status;
bool dead;
bool disabled;
......
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