pub struct H264Payloader { /* private fields */ }Expand description
H264Payloader payloads H264 packets
Implementations§
Source§impl H264Payloader
impl H264Payloader
Sourcepub fn with_packetization_mode(packetization_mode: u8) -> Self
pub fn with_packetization_mode(packetization_mode: u8) -> Self
A payloader for the negotiated packetization-mode (RFC 6184 section 5.4).
Mode 1 (non-interleaved) is the default: STAP-A for runs of small non-VCL NAL units
(parameter sets, SEI), FU-A for NAL units over the MTU, everything in the order given.
Mode 0 (single NAL unit) sends every NAL unit in a packet of its own and refuses one
that does not fit the MTU, since a mode-0 receiver cannot reassemble fragments. Mode 2
(interleaved) sends STAP-B aggregates and FU-B / FU-A fragments, every NAL unit with a
decoding order number that counts up by one from with_initial_don,
in decoding order; single NAL unit packets, STAP-A and a leading FU-A are never used in
it (section 6.4). A value above 2 is not a packetization mode and is taken as mode 1;
try_with_packetization_mode refuses it instead.
Sourcepub fn try_with_packetization_mode(packetization_mode: u8) -> Result<Self>
pub fn try_with_packetization_mode(packetization_mode: u8) -> Result<Self>
As with_packetization_mode, refusing a value that is
not 0, 1 or 2 (RFC 6184 section 8.1).
§Errors
Fails for a mode above 2.
Sourcepub fn with_initial_don(self, don: u16) -> Self
pub fn with_initial_don(self, don: u16) -> Self
Interleaved mode: the decoding order number of the first NAL unit, which may be any value (RFC 6184 section 5.5). 0 unless set.
Trait Implementations§
Source§impl Clone for H264Payloader
impl Clone for H264Payloader
Source§impl Debug for H264Payloader
impl Debug for H264Payloader
Source§impl Default for H264Payloader
impl Default for H264Payloader
Source§impl Payloader for H264Payloader
impl Payloader for H264Payloader
Source§fn payload(&mut self, mtu: usize, payload: &Bytes) -> Result<Vec<Bytes>>
fn payload(&mut self, mtu: usize, payload: &Bytes) -> Result<Vec<Bytes>>
Payload fragments a H264 packet across one or more byte arrays
Source§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).