#[non_exhaustive]pub enum Container {
Fmp4,
MpegTs,
}std only.Expand description
Which container HlsOrigin serves segments/parts as — orthogonal to
whether LL-HLS is enabled (HlsOriginBuilder::low_latency); issue #873.
RFC 8216bis §3.1.1 / §3.1.2 give the two containers different
#EXT-X-MAP obligations:
- fMP4 (§3.1.2): “Each fMP4 Segment in a Media Playlist MUST have an
EXT-X-MAPtag applied to it” — unconditional, soContainer::Fmp4always emits one. - MPEG-2 TS (§3.1.1): “Each Transport Stream Segment MUST contain a PAT
and a PMT, or have an
EXT-X-MAPtag applied to it” — a disjunction, not a container restriction.EXT-X-MAPis legal for TS; it is not required when the segments carry their own PAT/PMT.
Container::MpegTs omits #EXT-X-MAP by default, on the
assumption that segments come from a self-initialising source (e.g.
transmux’s TS segmenter, which re-emits PAT+PMT at the head of every
segment) — it does not forbid the tag; a future caller feeding
pre-segmented TS without in-band PSI would need a way to opt back in,
which is not implemented here (out of scope for issue #873; the current
wiring never calls set_init from a MpegTs-configured pipeline, so the
gap has no live caller yet).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Fmp4
Fragmented MP4 / CMAF segments (.m4s), with an fMP4 init segment
(.mp4) referenced by an always-present #EXT-X-MAP.
MpegTs
Whole MPEG-2 Transport Stream segments (.ts), self-initialising
(in-band PAT/PMT) — no #EXT-X-MAP, no init segment served.
Implementations§
Trait Implementations§
impl Copy for Container
Source§impl Default for Container
impl Default for Container
Source§fn default() -> Self
fn default() -> Self
Container::Fmp4 — preserves every pre-#873 caller’s behaviour.