std only.Expand description
LL-HLS origin engine (issue #663/#717 Stage 2; plan step 4): the
blocking-reload + part-availability decision logic and playlist
rendering, driven directly from a shared media_plane::Trunk — not a
push-fed rolling-window store of its own.
§Sans-IO shape
Nothing here ever .awaits or opens a socket. LlHlsOrigin implements
media_plane::egress::ServedEgress: its
resolve is a poll method
returning media_plane::egress::EgressResponse — Ready, Await,
BadRequest, or NotFound — never blocking the caller. The only
asynchrony is media_plane::Trunk::listen, which hands back a
runtime-agnostic event_listener::EventListener (a plain
Future<Output = ()>) that any executor can await or time out — not a
tokio::sync::watch.
§The caller-driven wait loop
An async adapter (e.g. multimux’s Step 5 LL-HLS route) turns an Await
into an actual wait like this — the same shape MediaStore’s own
(now-deleted) wait loop used, unchanged in spirit:
loop {
let listener = trunk.listen(); // register BEFORE re-checking (no missed-wakeup race)
match origin.resolve(request, now, await_policy) {
EgressResponse::Ready { body, .. } => return Ready(body),
EgressResponse::BadRequest { .. } => return BadRequest,
EgressResponse::NotFound => return NotFound,
EgressResponse::Await { .. } => {
// caller's own bounded timeout wraps `listener.await` here
}
}
}The blocking-reload cap is media_plane::egress::AwaitPolicy; the
actual .await/tokio::time::timeout lives entirely in the adapter —
this module never assumes a clock.
§std-only
Like media_plane::Trunk itself, this module needs std::sync::Mutex,
so it is only compiled when this crate’s std feature is enabled (the
default, and the only thing that pulls in the media-plane dependency at
all — see this crate’s Cargo.toml). A caller building
--no-default-features (e.g. an embedded playback-only client) gets
crate::client but not server.
Structs§
- Blocking
Query - Blocking playlist reload query parameters (RFC 8216bis §6.2.5.2) — the
sans-IO counterpart of an adapter’s own (likely serde-
Deserialize) query-string type; the adapter maps its wire query params into this. - LlHls
Origin - The LL-HLS origin
ServedEgress: renders playlists and resolves blocking-reload/part-availability requests for one stream, backed by a sharedTrunk. See this module’s own doc for exactly what comes straight from theTrunkand what needs the small syncedWindow.
Enums§
- LlHls
Body ServedEgress::BodyforLlHlsOrigin: the resolved body, typed by whichLlHlsRequestproduced it. A data-carrying ADT — seetests/label_coverage.rs’s SKIP list.- LlHls
Request ServedEgress::RequestforLlHlsOrigin: which wire resource is being asked for. A data-carrying dispatch ADT (matches this crate’sclient::action::Action/ResourceIdconvention) — seetests/label_coverage.rs’s SKIP list.
Constants§
- DEFAULT_
TRACK_ ID - Track id for the single rendition served per stream (no multi-track/ multi-rendition support yet).
Functions§
- master_
playlist_ m3u8 - A minimal single-variant master playlist pointing at
media_playlist_name(the caller’s configured media-playlist filename — e.g. multimux’sConfig::playlist_name, defaulting to"media.m3u8") — the same regardless of any stream state (no multi-rendition support yet), so this takes noTrunk/origin argument.