pub struct Vp8TemporalLayerFilter { /* private fields */ }Expand description
Decides which packets of a VP8 stream with temporal layers to forward for a target frame
rate (RFC 7741 sections 4.2 and 8: discarding by TID).
A middlebox keeps one per receiver. Layers at or below the target are forwarded. Going down
takes effect at once. Going up waits for a switch point: a key frame, or a frame with the
layer sync bit Y (it depends on the base layer only, and no later frame depends on
anything older than that base layer frame). A stream without TID is forwarded whole.
Implementations§
Source§impl Vp8TemporalLayerFilter
impl Vp8TemporalLayerFilter
Sourcepub fn new(target_tid: u8) -> Self
pub fn new(target_tid: u8) -> Self
A filter that forwards the layers up to target_tid. It starts at the base layer and
adds the layers above it at a switch point.
Sourcepub fn set_target(&mut self, target_tid: u8)
pub fn set_target(&mut self, target_tid: u8)
Changes the target layer. A lower one applies to the next packet; a higher one at the next switch point.
Sourcepub fn forward(&mut self, descriptor: &Vp8Packet, vp8_data: &[u8]) -> bool
pub fn forward(&mut self, descriptor: &Vp8Packet, vp8_data: &[u8]) -> bool
Whether to forward a packet: descriptor is its parsed payload descriptor (a
Vp8Packet after Depacketizer::depacketize) and vp8_data the VP8 data that
follows the descriptor. Call it for every packet of the stream, in order.