[vlc-commits] demux: adaptive: store timeline directly
Francois Cartegnie
git at videolan.org
Mon Apr 15 18:26:04 CEST 2019
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Apr 15 09:04:03 2019 +0200| [a2f1435e12646de9c43c6d719529079086e6e539] | committer: Francois Cartegnie
demux: adaptive: store timeline directly
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a2f1435e12646de9c43c6d719529079086e6e539
---
modules/demux/adaptive/playlist/Inheritables.cpp | 11 -----------
modules/demux/adaptive/playlist/Inheritables.hpp | 10 ----------
modules/demux/adaptive/playlist/SegmentTemplate.cpp | 8 +++++++-
modules/demux/adaptive/playlist/SegmentTemplate.h | 4 +++-
4 files changed, 10 insertions(+), 23 deletions(-)
diff --git a/modules/demux/adaptive/playlist/Inheritables.cpp b/modules/demux/adaptive/playlist/Inheritables.cpp
index 825d11de8f..218160e84f 100644
--- a/modules/demux/adaptive/playlist/Inheritables.cpp
+++ b/modules/demux/adaptive/playlist/Inheritables.cpp
@@ -23,21 +23,10 @@
#endif
#include "Inheritables.hpp"
-#include "SegmentTimeline.h"
using namespace adaptive::playlist;
using namespace adaptive;
-Timelineable::Timelineable()
-{
- segmentTimeline.Set(NULL);
-}
-
-Timelineable::~Timelineable()
-{
- delete segmentTimeline.Get();
-}
-
TimescaleAble::TimescaleAble(TimescaleAble *parent)
{
parentTimescaleAble = parent;
diff --git a/modules/demux/adaptive/playlist/Inheritables.hpp b/modules/demux/adaptive/playlist/Inheritables.hpp
index d0b83cdc9e..a1dc597fdf 100644
--- a/modules/demux/adaptive/playlist/Inheritables.hpp
+++ b/modules/demux/adaptive/playlist/Inheritables.hpp
@@ -30,16 +30,6 @@ namespace adaptive
{
namespace playlist
{
- class SegmentTimeline;
-
- class Timelineable
- {
- public:
- Timelineable();
- ~Timelineable();
- Property<SegmentTimeline *> segmentTimeline;
- };
-
class TimescaleAble
{
public:
diff --git a/modules/demux/adaptive/playlist/SegmentTemplate.cpp b/modules/demux/adaptive/playlist/SegmentTemplate.cpp
index e1d13a11b0..f1437bbadd 100644
--- a/modules/demux/adaptive/playlist/SegmentTemplate.cpp
+++ b/modules/demux/adaptive/playlist/SegmentTemplate.cpp
@@ -37,16 +37,22 @@ BaseSegmentTemplate::BaseSegmentTemplate( ICanonicalUrl *parent ) :
MediaSegmentTemplate::MediaSegmentTemplate( SegmentInformation *parent ) :
- BaseSegmentTemplate( parent ), Timelineable(), TimescaleAble( parent )
+ BaseSegmentTemplate( parent ), TimescaleAble( parent )
{
debugName = "SegmentTemplate";
classId = Segment::CLASSID_SEGMENT;
startNumber.Set( 1 );
+ segmentTimeline.Set( NULL );
initialisationSegment.Set( NULL );
templated = true;
parentSegmentInformation = parent;
}
+MediaSegmentTemplate::~MediaSegmentTemplate()
+{
+ delete segmentTimeline.Get();
+}
+
void MediaSegmentTemplate::mergeWith(MediaSegmentTemplate *updated, vlc_tick_t prunebarrier)
{
SegmentTimeline *timeline = segmentTimeline.Get();
diff --git a/modules/demux/adaptive/playlist/SegmentTemplate.h b/modules/demux/adaptive/playlist/SegmentTemplate.h
index bcc109824b..b5608e29c0 100644
--- a/modules/demux/adaptive/playlist/SegmentTemplate.h
+++ b/modules/demux/adaptive/playlist/SegmentTemplate.h
@@ -34,6 +34,7 @@ namespace adaptive
class ICanonicalUrl;
class InitSegmentTemplate;
class SegmentInformation;
+ class SegmentTimeline;
class BaseSegmentTemplate : public Segment
{
@@ -43,11 +44,11 @@ namespace adaptive
class MediaSegmentTemplate : public BaseSegmentTemplate,
public Initializable<InitSegmentTemplate>,
- public Timelineable,
public TimescaleAble
{
public:
MediaSegmentTemplate( SegmentInformation * = NULL );
+ virtual ~MediaSegmentTemplate();
virtual void setSourceUrl( const std::string &url ); /* reimpl */
void mergeWith( MediaSegmentTemplate *, vlc_tick_t );
virtual uint64_t getSequenceNumber() const; /* reimpl */
@@ -57,6 +58,7 @@ namespace adaptive
size_t pruneBySequenceNumber(uint64_t);
virtual void debug(vlc_object_t *, int = 0) const; /* reimpl */
Property<size_t> startNumber;
+ Property<SegmentTimeline *> segmentTimeline;
protected:
SegmentInformation *parentSegmentInformation;
More information about the vlc-commits
mailing list