[vlc-commits] demux: adaptive: add buffer length

Francois Cartegnie git at videolan.org
Sat Jul 9 18:42:44 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jun 20 17:29:38 2016 +0200| [c2a113258eade888b0e9bc39702ed7134027d8d3] | committer: Francois Cartegnie

demux: adaptive: add buffer length

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c2a113258eade888b0e9bc39702ed7134027d8d3
---

 modules/demux/adaptive/plumbing/CommandsQueue.cpp |    5 +++++
 modules/demux/adaptive/plumbing/CommandsQueue.hpp |    1 +
 2 files changed, 6 insertions(+)

diff --git a/modules/demux/adaptive/plumbing/CommandsQueue.cpp b/modules/demux/adaptive/plumbing/CommandsQueue.cpp
index e8d32b7..832abb5 100644
--- a/modules/demux/adaptive/plumbing/CommandsQueue.cpp
+++ b/modules/demux/adaptive/plumbing/CommandsQueue.cpp
@@ -314,6 +314,11 @@ void CommandsQueue::setDrop( bool b )
     vlc_mutex_unlock(&lock);
 }
 
+mtime_t CommandsQueue::getDemuxedAmount() const
+{
+    return bufferinglevel - getFirstDTS();
+}
+
 mtime_t CommandsQueue::getBufferingLevel() const
 {
     mtime_t i_buffer;
diff --git a/modules/demux/adaptive/plumbing/CommandsQueue.hpp b/modules/demux/adaptive/plumbing/CommandsQueue.hpp
index e5bed22..b22cc2e 100644
--- a/modules/demux/adaptive/plumbing/CommandsQueue.hpp
+++ b/modules/demux/adaptive/plumbing/CommandsQueue.hpp
@@ -145,6 +145,7 @@ namespace adaptive
             void Commit();
             bool isEmpty() const;
             void setDrop( bool );
+            mtime_t getDemuxedAmount() const;
             mtime_t getBufferingLevel() const;
             mtime_t getFirstDTS() const;
 



More information about the vlc-commits mailing list