[vlc-commits] demux: adaptative: do lazy connect step

Francois Cartegnie git at videolan.org
Thu Feb 25 23:00:45 CET 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Feb 25 15:11:10 2016 +0100| [2b80ce5c3e44ec76675ba0d669fe47056911cf22] | committer: Francois Cartegnie

demux: adaptative: do lazy connect step

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

 modules/demux/adaptive/http/HTTPConnection.hpp        |    3 +--
 modules/demux/adaptive/http/HTTPConnectionManager.cpp |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/demux/adaptive/http/HTTPConnection.hpp b/modules/demux/adaptive/http/HTTPConnection.hpp
index d6cffc3..633e5cb 100644
--- a/modules/demux/adaptive/http/HTTPConnection.hpp
+++ b/modules/demux/adaptive/http/HTTPConnection.hpp
@@ -49,7 +49,6 @@ namespace adaptive
                 virtual bool    prepare     (const ConnectionParams &);
                 virtual bool    canReuse     (const ConnectionParams &) const = 0;
 
-                virtual bool    connect     () = 0;
                 virtual int     query       (const std::string& path, const BytesRange & = BytesRange()) = 0;
                 virtual ssize_t read        (void *p_buffer, size_t len) = 0;
 
@@ -72,7 +71,6 @@ namespace adaptive
                 virtual ~HTTPConnection();
 
                 virtual bool    canReuse     (const ConnectionParams &) const;
-                virtual bool    connect     ();
                 virtual int     query       (const std::string& path, const BytesRange & = BytesRange());
                 virtual ssize_t read        (void *p_buffer, size_t len);
 
@@ -80,6 +78,7 @@ namespace adaptive
 
             protected:
                 virtual bool    connected   () const;
+                virtual bool    connect     ();
                 virtual void    disconnect  ();
                 virtual bool    send        (const void *buf, size_t size);
                 virtual bool    send        (const std::string &data);
diff --git a/modules/demux/adaptive/http/HTTPConnectionManager.cpp b/modules/demux/adaptive/http/HTTPConnectionManager.cpp
index 7287f38..371756b 100644
--- a/modules/demux/adaptive/http/HTTPConnectionManager.cpp
+++ b/modules/demux/adaptive/http/HTTPConnectionManager.cpp
@@ -94,7 +94,7 @@ AbstractConnection * HTTPConnectionManager::getConnection(ConnectionParams &para
 
         connectionPool.push_back(conn);
 
-        if (!conn->prepare(params) || !conn->connect())
+        if (!conn->prepare(params))
         {
             vlc_mutex_unlock(&lock);
             return NULL;



More information about the vlc-commits mailing list