vlc | branch: master | Francois Cartegnie <[email protected]> | Wed Nov 18 10:26:27 2020 +0100| [d3549e4fadb7e838b1314357d5d3e6c335f465ca] | committer: Francois Cartegnie
demux: smooth: use simple timescale member for forged segments > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d3549e4fadb7e838b1314357d5d3e6c335f465ca --- modules/demux/smooth/playlist/ForgedInitSegment.cpp | 10 ++++------ modules/demux/smooth/playlist/ForgedInitSegment.hpp | 5 ++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/modules/demux/smooth/playlist/ForgedInitSegment.cpp b/modules/demux/smooth/playlist/ForgedInitSegment.cpp index c254312b8b..fb376c976e 100644 --- a/modules/demux/smooth/playlist/ForgedInitSegment.cpp +++ b/modules/demux/smooth/playlist/ForgedInitSegment.cpp @@ -44,13 +44,13 @@ ForgedInitSegment::ForgedInitSegment(ICanonicalUrl *parent, const std::string &type_, uint64_t timescale_, vlc_tick_t duration_) : - InitSegment(parent), TimescaleAble() + InitSegment(parent) { type = type_; duration.Set(duration_); extradata = NULL; i_extradata = 0; - setTimescale(timescale_); + timescale = timescale_; formatex.cbSize = 0; formatex.nAvgBytesPerSec = 0; formatex.nBlockAlign = 0; @@ -210,8 +210,6 @@ void ForgedInitSegment::setLanguage(const std::string &lang) block_t * ForgedInitSegment::buildMoovBox() { - const Timescale &trackTimescale = inheritTimescale(); - es_format_t fmt; es_format_Init(&fmt, es_type, vlc_fourcc_GetCodec(es_type, fourcc)); fmt.i_original_fourcc = fourcc; @@ -282,12 +280,12 @@ block_t * ForgedInitSegment::buildMoovBox() { mp4mux_trackinfo_t *p_track = mp4mux_track_Add(muxh, 0x01, /* Will always be 1st and unique track; tfhd patched on block read */ - &fmt, (uint32_t) trackTimescale); + &fmt, (uint32_t) timescale); if(p_track) mp4mux_track_ForceDuration(p_track, duration.Get()); } - box = mp4mux_GetMoov(muxh, NULL, trackTimescale.ToTime(duration.Get())); + box = mp4mux_GetMoov(muxh, NULL, timescale.ToTime(duration.Get())); } es_format_Clean(&fmt); diff --git a/modules/demux/smooth/playlist/ForgedInitSegment.hpp b/modules/demux/smooth/playlist/ForgedInitSegment.hpp index f1aa361450..fd87c13c25 100644 --- a/modules/demux/smooth/playlist/ForgedInitSegment.hpp +++ b/modules/demux/smooth/playlist/ForgedInitSegment.hpp @@ -21,7 +21,6 @@ #define FORGEDINITSEGMENT_HPP #include "../../adaptive/playlist/Segment.h" -#include "../../adaptive/playlist/Inheritables.hpp" #include <vlc_es.h> #include <vlc_codecs.h> @@ -34,8 +33,7 @@ namespace smooth using namespace adaptive::playlist; using namespace adaptive::http; - class ForgedInitSegment : public InitSegment, - public TimescaleAble + class ForgedInitSegment : public InitSegment { public: ForgedInitSegment(ICanonicalUrl *parent, const std::string &, @@ -69,6 +67,7 @@ namespace smooth vlc_fourcc_t fourcc; enum es_format_category_e es_type; unsigned track_id; + Timescale timescale; }; } } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
