pub struct Vp8Packet {}Expand description
Vp8Packet represents the VP8 header that is stored in the payload of an RTP Packet
Every field describes the packet last given to Depacketizer::depacketize: a field the
packet did not carry reads 0.
Fields§
§x: u8Required Header extended controlbits present
n: u8when set to 1 this frame can be discarded
s: u8start of VP8 partition
pid: u8partition index
i: u8Extended control bits 1 if PictureID is present
l: u81 if tl0picidx is present
t: u81 if tid is present
k: u81 if KEYIDX is present
picture_id: u16Optional extension 7 or 15 bits, picture ID
picture_id_15_bits: boolWhether the picture ID was sent in 15 bits (M=1) rather than 7. The width can change
during a session (RFC 7741 section 4.2); a PictureID wraps at the width it was sent in.
tl0_pic_idx: u88 bits temporal level zero index
tid: u82 bits temporal layer index
y: u81 bit layer sync bit
key_idx: u85 bits temporal key frame index
Implementations§
Trait Implementations§
Source§impl Depacketizer for Vp8Packet
impl Depacketizer for Vp8Packet
Source§fn depacketize(&mut self, packet: &Bytes) -> Result<Bytes>
fn depacketize(&mut self, packet: &Bytes) -> Result<Bytes>
depacketize parses the passed byte slice and stores the result in the VP8Packet this method is called upon
A packet is its descriptor and at least one octet of VP8 data (RFC 7741 section 4.2); anything shorter is an error.
Source§fn is_partition_head(&self, payload: &Bytes) -> bool
fn is_partition_head(&self, payload: &Bytes) -> bool
Whether the packet starts a frame: S=1 and PID=0 (RFC 7741 section 4.5.1). S=1
with another PID starts a later partition of a frame.
Source§fn is_key_frame_start(&self, payload: &Bytes) -> bool
fn is_key_frame_start(&self, payload: &Bytes) -> bool
The first packet of a frame (S=1, PID=0) whose payload header has P=0 (RFC 7741
section 4.3: “P: Inverse key frame flag. When set to 0, the current frame is a key
frame”; the payload header is in the first packet of each frame only, and key frames
“are decoded without reference to any other frame”, section 3).
Source§fn is_partition_tail(&self, marker: bool, _payload: &Bytes) -> bool
fn is_partition_tail(&self, marker: bool, _payload: &Bytes) -> bool
Source§fn has_key_frames(&self) -> bool
fn has_key_frames(&self) -> bool
false, the default, is a format whose
frames stand alone (audio) or one this depacketizer cannot speak for.