pub struct LlHlsOrigin { /* private fields */ }std only.Expand description
The LL-HLS origin ServedEgress: renders playlists and resolves
blocking-reload/part-availability requests for one stream, backed by a
shared Trunk. See this module’s own doc for exactly what comes
straight from the Trunk and what needs the small synced Window.
Implementations§
Source§impl LlHlsOrigin
impl LlHlsOrigin
Sourcepub fn new(
trunk: Arc<Trunk>,
target_duration_secs: f64,
part_target_ms: u32,
window_segments: NonZeroUsize,
) -> Self
pub fn new( trunk: Arc<Trunk>, target_duration_secs: f64, part_target_ms: u32, window_segments: NonZeroUsize, ) -> Self
Build a fresh origin over trunk, subscribing its one SegmentCursor
immediately (so the window starts empty but never misses a segment
published from this point on).
window_segments bounds how many closed segments this origin
advertises in a rendered Media Playlist — independent of
media_plane::trunk::TrunkConfig::segment_capacity (the Trunk’s own
retention bound): a caller may legitimately want a shorter advertised
window than the Trunk retains for other consumers (e.g. a DVR
SegmentEgress reading the same Trunk).
Sourcepub fn set_init(&self, bytes: impl Into<Bytes>)
pub fn set_init(&self, bytes: impl Into<Bytes>)
Store the fMP4 init segment bytes — see this module’s doc for why an
init segment is not something any Trunk ring holds.
Sourcepub fn init_bytes(&self) -> Option<Bytes>
pub fn init_bytes(&self) -> Option<Bytes>
The fMP4 init segment bytes, if set.
Trait Implementations§
Source§impl ServedEgress for LlHlsOrigin
impl ServedEgress for LlHlsOrigin
Source§type Request = LlHlsRequest
type Request = LlHlsRequest
Source§type Body = LlHlsBody
type Body = LlHlsBody
Source§fn resolve(
&self,
request: LlHlsRequest,
now: Timestamp,
await_policy: AwaitPolicy,
) -> EgressResponse<LlHlsBody>
fn resolve( &self, request: LlHlsRequest, now: Timestamp, await_policy: AwaitPolicy, ) -> EgressResponse<LlHlsBody>
request against this implementation’s current state at
time now, bounded by await_policy — see
EgressResponse::Await’s contract.