Commit d7020419 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: adaptative: allow timeline merging from local node

parent aa54a0f2
......@@ -375,6 +375,17 @@ void SegmentInformation::mergeWith(SegmentInformation *updated, mtime_t prunetim
/* FIXME: handle difference */
}
void SegmentInformation::mergeWithTimeline(SegmentTimeline *updated)
{
MediaSegmentTemplate *templ = inheritSegmentTemplate();
if(templ)
{
SegmentTimeline *timeline = templ->segmentTimeline.Get();
if(timeline)
timeline->mergeWith(*updated);
}
}
void SegmentInformation::pruneBySegmentNumber(uint64_t num)
{
if(segmentList)
......
......@@ -84,6 +84,7 @@ namespace adaptative
mtime_t getPlaybackTimeBySegmentNumber(uint64_t) const;
virtual void getDurationsRange(mtime_t *, mtime_t *) const;
virtual void mergeWith(SegmentInformation *, mtime_t);
virtual void mergeWithTimeline(SegmentTimeline *); /* ! don't use with global merge */
virtual void pruneBySegmentNumber(uint64_t);
virtual void runLocalUpdates(mtime_t, uint64_t);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment