[vlc-devel] [PATCH] demux/adaptive: remove dead code

Zhao Zhili quinkblack at foxmail.com
Sat Oct 14 11:16:38 CEST 2017


---
 modules/demux/adaptive/PlaylistManager.cpp    | 24 ------------------------
 modules/demux/adaptive/PlaylistManager.h      |  1 -
 modules/demux/adaptive/Streams.cpp            |  5 -----
 modules/demux/adaptive/Streams.hpp            |  1 -
 modules/demux/adaptive/plumbing/FakeESOut.cpp |  7 -------
 modules/demux/adaptive/plumbing/FakeESOut.hpp |  1 -
 6 files changed, 39 deletions(-)

diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp
index 3ee5014ae0..1da3934b99 100644
--- a/modules/demux/adaptive/PlaylistManager.cpp
+++ b/modules/demux/adaptive/PlaylistManager.cpp
@@ -274,30 +274,6 @@ AbstractStream::status PlaylistManager::dequeue(mtime_t i_floor, mtime_t *pi_nzb
     return i_return;
 }
 
-void PlaylistManager::drain()
-{
-    for(;;)
-    {
-        bool b_drained = true;
-        std::vector<AbstractStream *>::iterator it;
-        for(it=streams.begin(); it!=streams.end(); ++it)
-        {
-            AbstractStream *st = *it;
-
-            if (st->isDisabled())
-                continue;
-
-            b_drained &= st->decodersDrained();
-        }
-
-        if(b_drained)
-            break;
-
-        msleep(20*1000); /* ugly, but we have no way to get feedback */
-    }
-    es_out_Control(p_demux->out, ES_OUT_RESET_PCR);
-}
-
 mtime_t PlaylistManager::getPCR() const
 {
     mtime_t minpcr = VLC_TS_INVALID;
diff --git a/modules/demux/adaptive/PlaylistManager.h b/modules/demux/adaptive/PlaylistManager.h
index ac5a872cae..c8682f44c2 100644
--- a/modules/demux/adaptive/PlaylistManager.h
+++ b/modules/demux/adaptive/PlaylistManager.h
@@ -56,7 +56,6 @@ namespace adaptive
 
             AbstractStream::buffering_status bufferize(mtime_t, unsigned, unsigned);
             AbstractStream::status dequeue(mtime_t, mtime_t *);
-            void drain();
 
             virtual bool needsUpdate() const;
             virtual bool updatePlaylist();
diff --git a/modules/demux/adaptive/Streams.cpp b/modules/demux/adaptive/Streams.cpp
index 96543d3187..7f38c8473b 100644
--- a/modules/demux/adaptive/Streams.cpp
+++ b/modules/demux/adaptive/Streams.cpp
@@ -270,11 +270,6 @@ bool AbstractStream::canActivate() const
     return !dead;
 }
 
-bool AbstractStream::decodersDrained()
-{
-    return fakeesout->decodersDrained();
-}
-
 AbstractStream::buffering_status AbstractStream::getLastBufferStatus() const
 {
     return last_buffer_status;
diff --git a/modules/demux/adaptive/Streams.hpp b/modules/demux/adaptive/Streams.hpp
index b6c188d081..aae8cabe0f 100644
--- a/modules/demux/adaptive/Streams.hpp
+++ b/modules/demux/adaptive/Streams.hpp
@@ -86,7 +86,6 @@ namespace adaptive
         buffering_status getLastBufferStatus() const;
         mtime_t getDemuxedAmount() const;
         status dequeue(mtime_t, mtime_t *);
-        bool decodersDrained();
         virtual bool setPosition(mtime_t, bool);
         mtime_t getPlaybackTime() const;
         void runUpdates();
diff --git a/modules/demux/adaptive/plumbing/FakeESOut.cpp b/modules/demux/adaptive/plumbing/FakeESOut.cpp
index bc1517ebc7..1367ebb0fc 100644
--- a/modules/demux/adaptive/plumbing/FakeESOut.cpp
+++ b/modules/demux/adaptive/plumbing/FakeESOut.cpp
@@ -248,13 +248,6 @@ bool FakeESOut::hasSelectedEs() const
     return b_selected;
 }
 
-bool FakeESOut::decodersDrained()
-{
-    bool b_empty = true;
-    es_out_Control( real_es_out, ES_OUT_GET_EMPTY, &b_empty );
-    return b_empty;
-}
-
 bool FakeESOut::restarting() const
 {
     vlc_mutex_lock(const_cast<vlc_mutex_t *>(&lock));
diff --git a/modules/demux/adaptive/plumbing/FakeESOut.hpp b/modules/demux/adaptive/plumbing/FakeESOut.hpp
index 1c1d686918..45f8d2c4e2 100644
--- a/modules/demux/adaptive/plumbing/FakeESOut.hpp
+++ b/modules/demux/adaptive/plumbing/FakeESOut.hpp
@@ -44,7 +44,6 @@ namespace adaptive
             void setExpectedTimestampOffset(mtime_t);
             size_t esCount() const;
             bool hasSelectedEs() const;
-            bool decodersDrained();
             bool restarting() const;
             void setExtraInfoProvider( ExtraFMTInfoInterface * );
             void checkTimestampsStart(mtime_t);
-- 
2.14.2



More information about the vlc-devel mailing list