[vlc-commits] demux: adaptive: pass ressources to chunk
Francois Cartegnie
git at videolan.org
Fri May 10 10:37:24 CEST 2019
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Apr 18 16:12:20 2019 +0200| [4e6e6ce029823ce9f53e398f5b558dcd98799d33] | committer: Francois Cartegnie
demux: adaptive: pass ressources to chunk
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4e6e6ce029823ce9f53e398f5b558dcd98799d33
---
modules/demux/adaptive/SegmentTracker.cpp | 6 +++---
modules/demux/adaptive/playlist/Segment.cpp | 3 ++-
modules/demux/adaptive/playlist/Segment.h | 5 ++++-
modules/demux/smooth/playlist/ForgedInitSegment.cpp | 4 +++-
modules/demux/smooth/playlist/ForgedInitSegment.hpp | 4 +++-
5 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/modules/demux/adaptive/SegmentTracker.cpp b/modules/demux/adaptive/SegmentTracker.cpp
index 8a08d39b82..9e835c1c15 100644
--- a/modules/demux/adaptive/SegmentTracker.cpp
+++ b/modules/demux/adaptive/SegmentTracker.cpp
@@ -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)
diff --git a/modules/demux/adaptive/playlist/Segment.cpp b/modules/demux/adaptive/playlist/Segment.cpp
index 7eb23aa236..40cba1acdf 100644
--- a/modules/demux/adaptive/playlist/Segment.cpp
+++ b/modules/demux/adaptive/playlist/Segment.cpp
@@ -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,
diff --git a/modules/demux/adaptive/playlist/Segment.h b/modules/demux/adaptive/playlist/Segment.h
index 8dca5e9538..1a2c217d58 100644
--- a/modules/demux/adaptive/playlist/Segment.h
+++ b/modules/demux/adaptive/playlist/Segment.h
@@ -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;
diff --git a/modules/demux/smooth/playlist/ForgedInitSegment.cpp b/modules/demux/smooth/playlist/ForgedInitSegment.cpp
index 001a6d86f6..78f614ef35 100644
--- a/modules/demux/smooth/playlist/ForgedInitSegment.cpp
+++ b/modules/demux/smooth/playlist/ForgedInitSegment.cpp
@@ -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)
diff --git a/modules/demux/smooth/playlist/ForgedInitSegment.hpp b/modules/demux/smooth/playlist/ForgedInitSegment.hpp
index e132e5cbb2..4f0b1aaf03 100644
--- a/modules/demux/smooth/playlist/ForgedInitSegment.hpp
+++ b/modules/demux/smooth/playlist/ForgedInitSegment.hpp
@@ -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);
More information about the vlc-commits
mailing list