Skip to content
Snippets Groups Projects
Commit 4e6e6ce0 authored by François Cartegnie's avatar François Cartegnie :fingers_crossed:
Browse files

demux: adaptive: pass ressources to chunk

parent c67934b0
No related branches found
No related tags found
No related merge requests found
......@@ -223,7 +223,7 @@ SegmentChunk * SegmentTracker::getNextChunk(bool switch_allowed,
init_sent = true;
segment = rep->getSegment(BaseRepresentation::INFOTYPE_INIT);
if(segment)
return segment->toChunk(next, rep, connManager);
return segment->toChunk(resources, connManager, next, rep);
}
if(!index_sent)
......@@ -231,7 +231,7 @@ SegmentChunk * SegmentTracker::getNextChunk(bool switch_allowed,
index_sent = true;
segment = rep->getSegment(BaseRepresentation::INFOTYPE_INDEX);
if(segment)
return segment->toChunk(next, rep, connManager);
return segment->toChunk(resources, connManager, next, rep);
}
bool b_gap = false;
......@@ -248,7 +248,7 @@ SegmentChunk * SegmentTracker::getNextChunk(bool switch_allowed,
initializing = false;
}
SegmentChunk *chunk = segment->toChunk(next, rep, connManager);
SegmentChunk *chunk = segment->toChunk(resources, connManager, next, rep);
/* Notify new segment length for stats / logic */
if(chunk)
......
......@@ -67,7 +67,8 @@ void ISegment::onChunkDownload(block_t **, SegmentChunk *, BaseRepresentation *)
}
SegmentChunk* ISegment::toChunk(size_t index, BaseRepresentation *rep, AbstractConnectionManager *connManager)
SegmentChunk* ISegment::toChunk(SharedResources *, AbstractConnectionManager *connManager,
size_t index, BaseRepresentation *rep)
{
const std::string url = getUrlSegment().toString(index, rep);
HTTPChunkBufferedSource *source = new (std::nothrow) HTTPChunkBufferedSource(url, connManager,
......
......@@ -35,6 +35,8 @@
namespace adaptive
{
class SharedResources;
namespace http
{
class AbstractConnectionManager;
......@@ -58,7 +60,8 @@ namespace adaptive
* That is basically true when using an Url, and false
* when using an UrlTemplate
*/
virtual SegmentChunk* toChunk (size_t, BaseRepresentation *, AbstractConnectionManager *);
virtual SegmentChunk* toChunk (SharedResources *, AbstractConnectionManager *,
size_t, BaseRepresentation *);
virtual void setByteRange (size_t start, size_t end);
virtual void setSequenceNumber(uint64_t);
virtual uint64_t getSequenceNumber() const;
......
......@@ -35,6 +35,7 @@ extern "C"
#include "../../demux/mp4/libmp4.h" /* majors */
}
using namespace adaptive;
using namespace adaptive::playlist;
using namespace smooth::playlist;
using namespace smooth::http;
......@@ -314,7 +315,8 @@ block_t * ForgedInitSegment::buildMoovBox()
return moov;
}
SegmentChunk* ForgedInitSegment::toChunk(size_t, BaseRepresentation *rep, AbstractConnectionManager *)
SegmentChunk* ForgedInitSegment::toChunk(SharedResources *, AbstractConnectionManager *,
size_t, BaseRepresentation *rep)
{
block_t *moov = buildMoovBox();
if(moov)
......
......@@ -30,6 +30,7 @@ namespace smooth
{
namespace playlist
{
using namespace adaptive;
using namespace adaptive::playlist;
using namespace adaptive::http;
......@@ -40,7 +41,8 @@ namespace smooth
ForgedInitSegment(ICanonicalUrl *parent, const std::string &,
uint64_t, vlc_tick_t);
virtual ~ForgedInitSegment();
virtual SegmentChunk* toChunk(size_t, BaseRepresentation *, AbstractConnectionManager *); /* reimpl */
virtual SegmentChunk* toChunk(SharedResources *, AbstractConnectionManager *,
size_t, BaseRepresentation *); /* reimpl */
void setWaveFormatEx(const std::string &);
void setCodecPrivateData(const std::string &);
void setChannels(uint16_t);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment