[vlc-commits] demux: adaptive: remove unused playlist update parameters

Francois Cartegnie git at videolan.org
Mon Mar 30 16:16:36 CEST 2020


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Mar 13 14:55:30 2020 +0100| [eddc4e7240ecb277de445e58d04ad5a5b0c765bc] | committer: Francois Cartegnie

demux: adaptive: remove unused playlist update parameters

(cherry picked from commit 680109a375c97a4744de27a43c1df733daf6d5fc)

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

 modules/demux/adaptive/SegmentTracker.cpp              | 9 ++++-----
 modules/demux/adaptive/playlist/BaseRepresentation.cpp | 3 +--
 modules/demux/adaptive/playlist/BaseRepresentation.h   | 3 +--
 modules/demux/hls/playlist/Representation.cpp          | 3 +--
 modules/demux/hls/playlist/Representation.hpp          | 3 +--
 5 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/modules/demux/adaptive/SegmentTracker.cpp b/modules/demux/adaptive/SegmentTracker.cpp
index 357c7100f5..cafc30ac7d 100644
--- a/modules/demux/adaptive/SegmentTracker.cpp
+++ b/modules/demux/adaptive/SegmentTracker.cpp
@@ -111,7 +111,7 @@ StreamFormat SegmentTracker::getCurrentFormat() const
     {
         /* Ensure ephemere content is updated/loaded */
         if(rep->needsUpdate())
-            (void) rep->runLocalUpdates(resources, 0, curNumber, false);
+            (void) rep->runLocalUpdates(resources);
         return rep->getStreamFormat();
     }
     return StreamFormat();
@@ -203,7 +203,7 @@ SegmentChunk * SegmentTracker::getNextChunk(bool switch_allowed,
     bool b_updated = false;
     /* Ensure ephemere content is updated/loaded */
     if(rep->needsUpdate())
-        b_updated = rep->runLocalUpdates(resources, getPlaybackTime(), curNumber, false);
+        b_updated = rep->runLocalUpdates(resources);
 
     if(prevRep && !rep->consistentSegmentNumber())
     {
@@ -316,8 +316,7 @@ bool SegmentTracker::setPositionByTime(mtime_t time, bool restarted, bool tryonl
         rep = logic->getNextRepresentation(adaptationSet, NULL);
 
     /* Stream might not have been loaded at all (HLS) or expired */
-    if(rep && rep->needsUpdate() &&
-       !rep->runLocalUpdates(resources, time, curNumber, false))
+    if(rep && rep->needsUpdate() && !rep->runLocalUpdates(resources))
     {
         msg_Err(rep->getAdaptationSet()->getPlaylist()->getVLCObject(),
                 "Failed to update Representation %s", rep->getID().str().c_str());
@@ -398,7 +397,7 @@ void SegmentTracker::updateSelected()
 {
     if(curRepresentation && curRepresentation->needsUpdate())
     {
-        curRepresentation->runLocalUpdates(resources, getPlaybackTime(), curNumber, true);
+        curRepresentation->runLocalUpdates(resources);
         curRepresentation->scheduleNextUpdate(curNumber);
     }
 }
diff --git a/modules/demux/adaptive/playlist/BaseRepresentation.cpp b/modules/demux/adaptive/playlist/BaseRepresentation.cpp
index fd34e7e21b..e0055f1835 100644
--- a/modules/demux/adaptive/playlist/BaseRepresentation.cpp
+++ b/modules/demux/adaptive/playlist/BaseRepresentation.cpp
@@ -93,8 +93,7 @@ bool BaseRepresentation::needsUpdate() const
     return false;
 }
 
-bool BaseRepresentation::runLocalUpdates(SharedResources *,
-                                         mtime_t, uint64_t, bool)
+bool BaseRepresentation::runLocalUpdates(SharedResources *)
 {
     return false;
 }
diff --git a/modules/demux/adaptive/playlist/BaseRepresentation.h b/modules/demux/adaptive/playlist/BaseRepresentation.h
index f84c2de545..f11373fc4f 100644
--- a/modules/demux/adaptive/playlist/BaseRepresentation.h
+++ b/modules/demux/adaptive/playlist/BaseRepresentation.h
@@ -66,8 +66,7 @@ namespace adaptive
 
                 virtual mtime_t     getMinAheadTime         (uint64_t) const;
                 virtual bool        needsUpdate             () const;
-                virtual bool        runLocalUpdates         (SharedResources *,
-                                                             mtime_t, uint64_t, bool);
+                virtual bool        runLocalUpdates         (SharedResources *);
                 virtual void        scheduleNextUpdate      (uint64_t);
 
                 virtual void        debug                   (vlc_object_t *,int = 0) const;
diff --git a/modules/demux/hls/playlist/Representation.cpp b/modules/demux/hls/playlist/Representation.cpp
index 4e4971885b..9c8c979edb 100644
--- a/modules/demux/hls/playlist/Representation.cpp
+++ b/modules/demux/hls/playlist/Representation.cpp
@@ -136,8 +136,7 @@ bool Representation::needsUpdate() const
     return !b_loaded || (isLive() && nextUpdateTime < time(NULL));
 }
 
-bool Representation::runLocalUpdates(SharedResources *res,
-                                     mtime_t, uint64_t, bool)
+bool Representation::runLocalUpdates(SharedResources *res)
 {
     const time_t now = time(NULL);
     AbstractPlaylist *playlist = getPlaylist();
diff --git a/modules/demux/hls/playlist/Representation.hpp b/modules/demux/hls/playlist/Representation.hpp
index 3e800f8670..8659fe245b 100644
--- a/modules/demux/hls/playlist/Representation.hpp
+++ b/modules/demux/hls/playlist/Representation.hpp
@@ -50,8 +50,7 @@ namespace hls
                 virtual void scheduleNextUpdate(uint64_t); /* reimpl */
                 virtual bool needsUpdate() const;  /* reimpl */
                 virtual void debug(vlc_object_t *, int) const;  /* reimpl */
-                virtual bool runLocalUpdates(SharedResources *,
-                                             mtime_t, uint64_t, bool); /* reimpl */
+                virtual bool runLocalUpdates(SharedResources *); /* reimpl */
                 virtual uint64_t translateSegmentNumber(uint64_t, const SegmentInformation *) const; /* reimpl */
 
             private:



More information about the vlc-commits mailing list