pub struct Playout {
pub delay: Delay,
pub warmup: Duration,
}Expand description
A Consumer’s Delay and the catalog rendition’s warmup, applied together.
The warmup is how much media a decoder needs before its output is clean, such as an Opus
decoder’s pre-roll: pass the catalog audio rendition’s warmup. Subscribe with
subscription, then build the consumer with consumer.
The subscription carries the min and max delay plus the warmup: the publisher starts a live join that far back, and it and the transport skip what falls outside that budget, while the consumer skips at the max delay alone.
A live join starts at the group covering the live edge less Delay::min and the warmup,
which the publisher resolves, and the ordered reader waits for the groups from there. Until the
reader is the warmup past its first frame, the skip also tolerates the warmup, so the media
leading up to the start is not dropped as stale.
Fields§
§delay: DelayThe delay the consumer plays at, and skips past.
warmup: DurationHow much further back than Delay::min the start reaches, at most 10 s.
Implementations§
Source§impl Playout
impl Playout
Sourcepub fn new(delay: Delay, warmup: Duration) -> Self
pub fn new(delay: Delay, warmup: Duration) -> Self
Play at delay, starting warmup further back.
Sourcepub fn subscription(&self, subscription: Subscription) -> Subscription
pub fn subscription(&self, subscription: Subscription) -> Subscription
subscription with this playout’s delay, both bounds widened by the warmup: see
Delay::subscription.
Sourcepub fn consumer<F: Container>(
&self,
track: Subscriber,
format: F,
) -> Consumer<F>
pub fn consumer<F: Container>( &self, track: Subscriber, format: F, ) -> Consumer<F>
Decode track as format at this playout.
Subscribe track with subscription: the publisher may already
have skipped what a narrower one left out, and the live join starts where it was
subscribed. A track subscribed otherwise has its max delay set here, widened or narrowed.
Trait Implementations§
impl Copy for Playout
impl Eq for Playout
impl StructuralPartialEq for Playout
Auto Trait Implementations§
impl Freeze for Playout
impl RefUnwindSafe for Playout
impl Send for Playout
impl Sync for Playout
impl Unpin for Playout
impl UnsafeUnpin for Playout
impl UnwindSafe for Playout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.