[vlc-commits] demux: adaptative: allow to refresh segments

Francois Cartegnie git at videolan.org
Tue Sep 22 00:38:50 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Sep 16 00:36:10 2015 +0200| [abf78a175f2f89a52a28e76492875772da346b5e] | committer: Francois Cartegnie

demux: adaptative: allow to refresh segments

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

 modules/demux/adaptative/SegmentTracker.cpp              |    3 +++
 modules/demux/adaptative/playlist/SegmentInformation.cpp |    5 +++++
 modules/demux/adaptative/playlist/SegmentInformation.hpp |    1 +
 3 files changed, 9 insertions(+)

diff --git a/modules/demux/adaptative/SegmentTracker.cpp b/modules/demux/adaptative/SegmentTracker.cpp
index ba24712..8928a56 100644
--- a/modules/demux/adaptative/SegmentTracker.cpp
+++ b/modules/demux/adaptative/SegmentTracker.cpp
@@ -84,6 +84,9 @@ SegmentChunk * SegmentTracker::getNextChunk(bool switch_allowed)
         initializing = true;
     }
 
+    /* Ensure content is loaded */
+    rep->runLocalUpdates();
+
     if(!init_sent)
     {
         init_sent = true;
diff --git a/modules/demux/adaptative/playlist/SegmentInformation.cpp b/modules/demux/adaptative/playlist/SegmentInformation.cpp
index e355493..4093fbc 100644
--- a/modules/demux/adaptative/playlist/SegmentInformation.cpp
+++ b/modules/demux/adaptative/playlist/SegmentInformation.cpp
@@ -308,6 +308,11 @@ void SegmentInformation::pruneBySegmentNumber(uint64_t num)
         childs.at(i)->pruneBySegmentNumber(num);
 }
 
+void SegmentInformation::runLocalUpdates()
+{
+
+}
+
 SegmentInformation::SwitchPolicy SegmentInformation::getSwitchPolicy() const
 {
     if(switchpolicy == SWITCH_UNKNOWN)
diff --git a/modules/demux/adaptative/playlist/SegmentInformation.hpp b/modules/demux/adaptative/playlist/SegmentInformation.hpp
index 2bd6eec..04e4b7f 100644
--- a/modules/demux/adaptative/playlist/SegmentInformation.hpp
+++ b/modules/demux/adaptative/playlist/SegmentInformation.hpp
@@ -84,6 +84,7 @@ namespace adaptative
                 void getDurationsRange(mtime_t *, mtime_t *) const;
                 virtual void mergeWith(SegmentInformation *, mtime_t);
                 virtual void pruneBySegmentNumber(uint64_t);
+                virtual void runLocalUpdates();
 
             protected:
                 std::size_t getAllSegments(std::vector<ISegment *> &) const;



More information about the vlc-commits mailing list