[vlc-commits] demux:adaptive: the min/max buffering are mtime_t so pass them down as such
Steve Lhomme
git at videolan.org
Thu Jun 14 16:40:49 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jun 11 15:13:49 2018 +0200| [466b4a73c5e3ad038ab6f25afd96af7c83a63d10] | committer: Steve Lhomme
demux:adaptive: the min/max buffering are mtime_t so pass them down as such
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=466b4a73c5e3ad038ab6f25afd96af7c83a63d10
---
modules/demux/adaptive/PlaylistManager.cpp | 6 +++---
modules/demux/adaptive/PlaylistManager.h | 2 +-
modules/demux/adaptive/Streams.cpp | 6 +++---
modules/demux/adaptive/Streams.hpp | 4 ++--
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp
index 7c44639257..60a01a7966 100644
--- a/modules/demux/adaptive/PlaylistManager.cpp
+++ b/modules/demux/adaptive/PlaylistManager.cpp
@@ -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);
diff --git a/modules/demux/adaptive/PlaylistManager.h b/modules/demux/adaptive/PlaylistManager.h
index be0ba434f0..12b20996e4 100644
--- a/modules/demux/adaptive/PlaylistManager.h
+++ b/modules/demux/adaptive/PlaylistManager.h
@@ -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();
diff --git a/modules/demux/adaptive/Streams.cpp b/modules/demux/adaptive/Streams.cpp
index 4bded1ba70..8550b4bf0d 100644
--- a/modules/demux/adaptive/Streams.cpp
+++ b/modules/demux/adaptive/Streams.cpp
@@ -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);
diff --git a/modules/demux/adaptive/Streams.hpp b/modules/demux/adaptive/Streams.hpp
index 5a8c29e7ed..42144598fe 100644
--- a/modules/demux/adaptive/Streams.hpp
+++ b/modules/demux/adaptive/Streams.hpp
@@ -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;
More information about the vlc-commits
mailing list