Expand description
Live edge, presentation delay and join (ISO/IEC 23009-1 5.3.9.5.3, A.2 step 4; DASH-IF IOP v4.3 4.3.3.2.2 and 4.3.4).
D=@suggestedPresentationDelaywhen present, elsemax(4 s, 3 x maxSegmentDuration)(IOP 4.3.3.2.2: 2-4 segment durations and not under 4 s), clamped toTSB - 2 x maxSegmentDurationwhen a time-shift buffer exists; an explicit override replaces it.- Join time (Period-relative)
T_join = utc_now - D - (AST + PeriodStart); the segment joined is the one containing it on the Representation’s own timeline (audio and video boundaries differ), clamped to the segments that are complete and still inside the time-shift window.
Structs§
- Live
Window - The plan indices of the segments obtainable now.
Constants§
- DELAY_
SEGMENT_ MULTIPLE - IOP 4.3.3.2.2: the delay is a small multiple of the segment duration.
- MIN_
PRESENTATION_ DELAY_ US - IOP 4.3.3.2.2: the presentation delay is not under four seconds.
- TSB_
GUARD_ SEGMENTS - Segment durations kept free inside the time-shift buffer.
Functions§
- join_
index - The segment to start with: the one containing
T_join, clamped into the window.Nonewhen nothing is obtainable. - join_
time_ us T_join, Period-relative microseconds.- newest_
complete - Index of the newest complete segment at
utc_now_us;Nonewhen none is complete yet or the plan is static. - oldest_
in_ window - Index of the oldest segment whose availability has not ended at
utc_now_us;Nonewhen none is complete or all have expired. - presentation_
delay_ us - The presentation delay
D, in microseconds. - window
- The obtainable window at
utc_now_us.