Commit e2caa22e authored by Francois Cartegnie's avatar Francois Cartegnie

demux: adaptative: use threaded http chunks

parent d1815a42
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#include "AbstractPlaylist.hpp" #include "AbstractPlaylist.hpp"
#include "SegmentChunk.hpp" #include "SegmentChunk.hpp"
#include "../http/BytesRange.hpp" #include "../http/BytesRange.hpp"
#include "../http/HTTPConnectionManager.h"
#include "../http/Downloader.hpp"
#include <cassert> #include <cassert>
using namespace adaptative::http; using namespace adaptative::http;
...@@ -61,9 +63,10 @@ ISegment::~ISegment() ...@@ -61,9 +63,10 @@ ISegment::~ISegment()
SegmentChunk * ISegment::getChunk(const std::string &url, HTTPConnectionManager *connManager) SegmentChunk * ISegment::getChunk(const std::string &url, HTTPConnectionManager *connManager)
{ {
HTTPChunkSource *source = new HTTPChunkSource(url, connManager); HTTPChunkBufferedSource *source = new HTTPChunkBufferedSource(url, connManager);
if(startByte != endByte) if(startByte != endByte)
source->setBytesRange(BytesRange(startByte, endByte)); source->setBytesRange(BytesRange(startByte, endByte));
connManager->downloader->schedule(source);
return new (std::nothrow) SegmentChunk(this, source); return new (std::nothrow) SegmentChunk(this, source);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment