pub struct IntervalPliInterceptor { /* private fields */ }Expand description
Requests a keyframe from every bound remote stream on a fixed interval.
§Where this belongs in the chain
It only generates, and what it generates is RTCP, so its position is fixed by nothing except being on the application side of the pacer — as everything that generates is, so that what it produces is still metered on its way out.
§Forcing a keyframe
Attach Attribute::ForcePli to a packet handed to handle_read. Under the nested design
this was an inherent method, force_pli, which became unreachable the moment anything wrapped
this interceptor — it was dead code in practice. An attribute rides on a packet through the
walk and reaches this interceptor wherever it sits, and is not consumed, so anything further
on sees both the request and the PLI it produced.
Sans-I/O has no clock of its own, so the interval is measured from the first Instant the
interceptor is handed, whether that arrives via handle_read or handle_timeout.
Implementations§
Source§impl IntervalPliInterceptor
impl IntervalPliInterceptor
Sourcepub fn new(interval: Duration) -> Self
pub fn new(interval: Duration) -> Self
A generator asking every bound stream for a keyframe every interval.
A zero interval disables periodic requests, leaving only Attribute::ForcePli —
matching upstream, which creates no ticker when its interval is not positive.
Sourcepub fn bound_streams(&self) -> impl Iterator<Item = u32> + '_
pub fn bound_streams(&self) -> impl Iterator<Item = u32> + '_
The streams currently being asked for keyframes.