pub struct UlpfecPacket {
pub long_mask: bool,
pub padding_recovery: bool,
pub extension_recovery: bool,
pub csrc_count_recovery: u8,
pub marker_recovery: bool,
pub payload_type_recovery: u8,
pub sn_base: u16,
pub timestamp_recovery: u32,
pub length_recovery: u16,
pub levels: Vec<UlpfecLevel>,
}Expand description
A parsed ULPFEC payload: what follows the RTP header of a FEC packet, or what a RED block of the FEC payload type holds.
Fields§
§long_mask: boolThe L bit: masks are 48 bits long instead of 16.
padding_recovery: boolP recovery.
extension_recovery: boolX recovery.
csrc_count_recovery: u8CC recovery (4 bits).
marker_recovery: boolM recovery.
payload_type_recovery: u8PT recovery (7 bits).
sn_base: u16The lowest sequence number protected at any level.
timestamp_recovery: u32TS recovery.
length_recovery: u16Length recovery: the XOR of the protected packets’ lengths after the fixed RTP header.
levels: Vec<UlpfecLevel>The levels, level 0 first. A packet that holds level p holds every level below it
(RFC 5109 7.4 rule c), which the layout guarantees: levels are not numbered on the wire,
they are counted.
Implementations§
Source§impl UlpfecPacket
impl UlpfecPacket
Sourcepub fn parse(payload: &[u8]) -> Result<Self, UlpfecError>
pub fn parse(payload: &[u8]) -> Result<Self, UlpfecError>
Parse a ULPFEC payload.
The E bit is ignored (7.3). Levels are read until the payload ends; a level whose payload is cut short, a level with an empty mask and trailing octets too few for a level header are all refused, because a packet that is wrong about its own layout cannot be trusted to name what it protects.