[vlc-commits] demux: adaptive: move definition

Francois Cartegnie git at videolan.org
Tue Jan 5 20:25:41 UTC 2021


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Dec 30 10:48:50 2020 +0100| [aabb85b7aa20368d441f2e9ef56e2ab1d303a932] | committer: Francois Cartegnie

demux: adaptive: move definition

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

 modules/demux/adaptive/logic/BufferingLogic.cpp | 12 ++++++------
 modules/demux/adaptive/logic/BufferingLogic.hpp |  2 ++
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/modules/demux/adaptive/logic/BufferingLogic.cpp b/modules/demux/adaptive/logic/BufferingLogic.cpp
index b1430ddf0b..e758886b15 100644
--- a/modules/demux/adaptive/logic/BufferingLogic.cpp
+++ b/modules/demux/adaptive/logic/BufferingLogic.cpp
@@ -69,6 +69,12 @@ void AbstractBufferingLogic::setUserLiveDelay(vlc_tick_t v)
     userLiveDelay = v;
 }
 
+/* Try to never buffer up to really end */
+/* Enforce no overlap for demuxers segments 3.0.0 */
+/* FIXME: check duration instead ? */
+const unsigned DefaultBufferingLogic::SAFETY_BUFFERING_EDGE_OFFSET = 1;
+const unsigned DefaultBufferingLogic::SAFETY_EXPURGING_OFFSET = 2;
+
 DefaultBufferingLogic::DefaultBufferingLogic()
     : AbstractBufferingLogic()
 {
@@ -130,12 +136,6 @@ uint64_t DefaultBufferingLogic::getLiveStartSegmentNumber(BaseRepresentation *re
     /* Get buffering offset min <= max <= live delay */
     vlc_tick_t i_buffering = getBufferingOffset(playlist);
 
-    /* Try to never buffer up to really end */
-    /* Enforce no overlap for demuxers segments 3.0.0 */
-    /* FIXME: check duration instead ? */
-    const unsigned SAFETY_BUFFERING_EDGE_OFFSET = 1;
-    const unsigned SAFETY_EXPURGING_OFFSET = 2;
-
     SegmentList *segmentList = rep->inheritSegmentList();
     SegmentBase *segmentBase = rep->inheritSegmentBase();
     SegmentTemplate *mediaSegmentTemplate = rep->inheritSegmentTemplate();
diff --git a/modules/demux/adaptive/logic/BufferingLogic.hpp b/modules/demux/adaptive/logic/BufferingLogic.hpp
index e46c28818d..b9d19fecf0 100644
--- a/modules/demux/adaptive/logic/BufferingLogic.hpp
+++ b/modules/demux/adaptive/logic/BufferingLogic.hpp
@@ -71,6 +71,8 @@ namespace adaptive
                 virtual vlc_tick_t getMinBuffering(const BasePlaylist *) const; /* impl */
                 virtual vlc_tick_t getMaxBuffering(const BasePlaylist *) const; /* impl */
                 virtual vlc_tick_t getLiveDelay(const BasePlaylist *) const; /* impl */
+                static const unsigned SAFETY_BUFFERING_EDGE_OFFSET;
+                static const unsigned SAFETY_EXPURGING_OFFSET;
 
             protected:
                 vlc_tick_t getBufferingOffset(const BasePlaylist *) const;



More information about the vlc-commits mailing list