pub struct Av1Depacketizer {
pub z: bool,
pub y: bool,
pub n: bool,
/* private fields */
}Expand description
AV1 RTP Depacketizer
Depacketizes AV1 RTP packets into low overhead bitstream format with obu_size fields.
Fields§
§z: boolZ flag from aggregation header - first OBU is continuation
y: boolY flag from aggregation header - last OBU will continue
n: boolN flag from aggregation header - new coded video sequence
Implementations§
Trait Implementations§
Source§impl Clone for Av1Depacketizer
impl Clone for Av1Depacketizer
Source§impl Debug for Av1Depacketizer
impl Debug for Av1Depacketizer
Source§impl Default for Av1Depacketizer
impl Default for Av1Depacketizer
Source§impl Depacketizer for Av1Depacketizer
impl Depacketizer for Av1Depacketizer
Source§fn depacketize(&mut self, payload: &Bytes) -> Result<Bytes>
fn depacketize(&mut self, payload: &Bytes) -> Result<Bytes>
Depacketize parses an AV1 RTP payload into OBU stream with obu_size_field.
A malformed packet is an error and drops any OBU being reassembled: what follows it cannot be trusted to continue it.
Reference: https://aomediacodec.github.io/av1-rtp-spec/
Source§fn is_partition_head(&self, payload: &Bytes) -> bool
fn is_partition_head(&self, payload: &Bytes) -> bool
Whether the packet can start a temporal unit: Z is not set (its first OBU element is not the continuation of a fragment), and that first OBU is not one that only follows a frame header of the same unit (a tile group or a redundant frame header). Z = 0 alone used to count, so a unit whose first packet was lost was taken up from its second.
This is as much as the payload says. A unit whose later frames each start a packet with
their own frame header (spatial layers) still looks like a start there; the Dependency
Descriptor’s start_of_frame and the RTP timestamp tell those apart.
Source§fn is_partition_tail(&self, marker: bool, _payload: &Bytes) -> bool
fn is_partition_tail(&self, marker: bool, _payload: &Bytes) -> bool
Returns true if marker bit is set (end of frame)
Source§fn is_key_frame_start(&self, payload: &Bytes) -> bool
fn is_key_frame_start(&self, payload: &Bytes) -> bool
A packet with the aggregation header’s N bit set that starts a temporal unit: “N:
MUST be set to 1 if the packet is the first packet of a coded video sequence, and MUST
be set to 0 otherwise” (AV1 RTP specification, section 4.4). A coded video sequence
begins with a key frame and is decoded without anything before it.
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.