pub struct SessionPlaylistBase { /* private fields */ }Expand description
A base playlist rendered once, so each viewer’s per-session playlist costs one tag line plus a copy of the text — not a deep clone of every segment and a full re-serialisation per viewer per reload (audit r14-SSAI-O1, issue #1125).
The tag line is spliced in immediately before the first #EXT-X-PART: or
#EXTINF: line, whichever comes first — i.e. before the first segment’s
part/EXTINF group, never between a segment’s parts and its EXTINF (an
EXT-X-DATERANGE is not positional within the playlist, RFC 8216bis
§4.4.5.1) — or before #EXT-X-ENDLIST / at the end when the base has
neither.
Implementations§
Source§impl SessionPlaylistBase
impl SessionPlaylistBase
Sourcepub fn new(base: &MediaPlaylist) -> Result<Self>
pub fn new(base: &MediaPlaylist) -> Result<Self>
Render base once. Errors as MediaPlaylist::to_m3u8.
Sourcepub fn render_plain(&self) -> String
pub fn render_plain(&self) -> String
The viewer-independent playlist text (no break).
Sourcepub fn render_into(
&self,
out: &mut String,
active: Option<&InterstitialDateRange>,
) -> Result<()>
pub fn render_into( &self, out: &mut String, active: Option<&InterstitialDateRange>, ) -> Result<()>
Append one viewer’s playlist to out: the base text, with
active’s tag line spliced in. Errors as render_session_playlist;
on error nothing is appended.