pub struct Av1Payloader {
pub sequence_header_per_spatial_layer: bool,
}Expand description
Packetizes AV1 temporal units into RTP payloads.
One call takes one temporal unit in low overhead format (or, with spatial layers, one
layer’s frame of it) and never mixes layers in a packet (AV1 RTP section 5): a packet ends
where the OBUs’ temporal_id / spatial_id change, and at a sequence header, which starts
its own packet. Temporal delimiter, tile list and padding OBUs are dropped and the OBU size
fields removed.
Fields§
§sequence_header_per_spatial_layer: boolRepeats the temporal unit’s sequence header in front of every spatial layer after the first. For an “S” mode (simulcast encodings in one RTP stream) “a sequence header OBU SHOULD be aggregated with each spatial layer”, so that a forwarder can drop the other encodings and still leave a decodable stream (AV1 RTP sections 5 and 6.1). Off by default: an encoder that writes a sequence header per layer needs no help, and with inter-layer prediction the base layer’s is enough.
Implementations§
Source§impl Av1Payloader
impl Av1Payloader
Sourcepub fn payload_frames(
&mut self,
mtu: usize,
temporal_unit: &Bytes,
) -> Result<Vec<Av1FramePayloads>>
pub fn payload_frames( &mut self, mtu: usize, temporal_unit: &Bytes, ) -> Result<Vec<Av1FramePayloads>>
Packetizes one temporal unit and returns its packets grouped by frame: one group per run of packets of one spatial layer.
This is the unit the Dependency Descriptor describes (AV1 RTP appendix A: “an RTP
frame”): start_of_frame belongs on a group’s first payload and end_of_frame on its
last. The RTP marker belongs on the last payload of the last group only (AV1 RTP
section 4.2). A packet of OBUs without an extension header (a sequence header, metadata)
is counted with the frame that follows it.
§Errors
The same as Payloader::payload.
Trait Implementations§
Source§impl Clone for Av1Payloader
impl Clone for Av1Payloader
Source§impl Debug for Av1Payloader
impl Debug for Av1Payloader
Source§impl Default for Av1Payloader
impl Default for Av1Payloader
Source§impl Payloader for Av1Payloader
impl Payloader for Av1Payloader
Source§fn payload(&mut self, mtu: usize, payload: &Bytes) -> Result<Vec<Bytes>>
fn payload(&mut self, mtu: usize, payload: &Bytes) -> Result<Vec<Bytes>>
mtu. Read moreSource§fn marker_rule(&self) -> MarkerRule
fn marker_rule(&self) -> MarkerRule
Source§fn payload_duration(&self, _payload: &Bytes) -> Option<u32>
fn payload_duration(&self, _payload: &Bytes) -> Option<u32>
payload covers, so that a frame split over several packets gets
a timestamp per packet (RFC 3551 section 4.3: the timestamp is the sampling instant of
the packet’s first sample). None, the default, is a frame-based format: every packet
of the frame carries the frame’s timestamp.Source§fn set_next_frame_info(&mut self, _info: &dyn Any)
fn set_next_frame_info(&mut self, _info: &dyn Any)
payload is given,
for a format whose payload describes more than the frame’s bytes (VP9’s layer indices,
Vp9FrameInfo); a type the payloader does not use
is ignored, as is the call by a payloader that uses none (the default).