[vlc-commits] demux: adaptive: store timeline directly
Francois Cartegnie
git at videolan.org
Wed Oct 23 16:01:32 CEST 2019
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Apr 15 09:04:03 2019 +0200| [47aebf48b54d575b5dca5f48d6e6219288168533] | committer: Francois Cartegnie
demux: adaptive: store timeline directly
(cherry picked from commit a2f1435e12646de9c43c6d719529079086e6e539)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=47aebf48b54d575b5dca5f48d6e6219288168533
---
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 9b93366e98..e285cbb5a6 100644
--- a/modules/demux/adaptive/playlist/SegmentTemplate.cpp
+++ b/modules/demux/adaptive/playlist/SegmentTemplate.cpp
@@ -38,16 +38,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, mtime_t prunebarrier)
{
SegmentTimeline *timeline = segmentTimeline.Get();
diff --git a/modules/demux/adaptive/playlist/SegmentTemplate.h b/modules/demux/adaptive/playlist/SegmentTemplate.h
index 3c1d08084c..5250050e98 100644
--- a/modules/demux/adaptive/playlist/SegmentTemplate.h
+++ b/modules/demux/adaptive/playlist/SegmentTemplate.h
@@ -35,6 +35,7 @@ namespace adaptive
class ICanonicalUrl;
class InitSegmentTemplate;
class SegmentInformation;
+ class SegmentTimeline;
class BaseSegmentTemplate : public Segment
{
@@ -44,11 +45,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 *, mtime_t );
virtual uint64_t getSequenceNumber() const; /* reimpl */
@@ -58,6 +59,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