[vlc-commits] demux: adaptive: use single connection manager

Francois Cartegnie git at videolan.org
Wed Oct 16 20:21:11 CEST 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct 16 17:37:37 2019 +0200| [e6d79a19b58c6cfe4dd09753e53afc36d35f76f9] | committer: Francois Cartegnie

demux: adaptive: use single connection manager

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

 modules/demux/adaptive/PlaylistManager.cpp | 15 +++------------
 modules/demux/adaptive/PlaylistManager.h   |  1 -
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp
index 71498da06a..9d065579c5 100644
--- a/modules/demux/adaptive/PlaylistManager.cpp
+++ b/modules/demux/adaptive/PlaylistManager.cpp
@@ -53,7 +53,6 @@ PlaylistManager::PlaylistManager( demux_t *p_demux_,
                                   AbstractPlaylist *pl,
                                   AbstractStreamFactory *factory,
                                   AbstractAdaptationLogic::LogicType type ) :
-             conManager     ( NULL ),
              logicType      ( type ),
              logic          ( NULL ),
              playlist       ( pl ),
@@ -87,7 +86,6 @@ PlaylistManager::~PlaylistManager   ()
     delete streamFactory;
     unsetPeriod();
     delete playlist;
-    delete conManager;
     delete logic;
     delete resources;
     vlc_cond_destroy(&waitcond);
@@ -110,7 +108,7 @@ bool PlaylistManager::setupPeriod()
     if(!currentPeriod)
         return false;
 
-    if(!logic && !(logic = createLogic(logicType, conManager)))
+    if(!logic && !(logic = createLogic(logicType, resources->getConnManager())))
         return false;
 
     std::vector<BaseAdaptationSet*> sets = currentPeriod->getAdaptationSets();
@@ -125,7 +123,7 @@ bool PlaylistManager::setupPeriod()
                 continue;
 
             AbstractStream *st = streamFactory->create(p_demux, set->getStreamFormat(),
-                                                       tracker, conManager);
+                                                       tracker, resources->getConnManager());
             if(!st)
             {
                 delete tracker;
@@ -147,13 +145,6 @@ bool PlaylistManager::setupPeriod()
 
 bool PlaylistManager::init()
 {
-    if(!conManager &&
-       !(conManager =
-         new (std::nothrow) HTTPConnectionManager(VLC_OBJECT(p_demux->s),
-                                                  resources->getAuthStorage()))
-      )
-        return false;
-
     if(!setupPeriod())
         return false;
 
@@ -167,7 +158,7 @@ bool PlaylistManager::init()
 
 bool PlaylistManager::start()
 {
-    if(b_thread || !conManager)
+    if(b_thread)
         return false;
 
     b_thread = !vlc_clone(&thread, managerThread,
diff --git a/modules/demux/adaptive/PlaylistManager.h b/modules/demux/adaptive/PlaylistManager.h
index b94f59d7de..d766cead80 100644
--- a/modules/demux/adaptive/PlaylistManager.h
+++ b/modules/demux/adaptive/PlaylistManager.h
@@ -92,7 +92,6 @@ namespace adaptive
                                                          AbstractConnectionManager *);
 
             SharedResources                     *resources;
-            AbstractConnectionManager           *conManager;
             AbstractAdaptationLogic::LogicType  logicType;
             AbstractAdaptationLogic             *logic;
             AbstractPlaylist                    *playlist;



More information about the vlc-commits mailing list