pub struct OpusPayloader;Expand description
Packetizes Opus audio: one RTP payload per Opus packet, never fragmented and never aggregated, whatever the MTU (RFC 7587 section 4.2).
The marker bit follows RFC 3551 (RFC 7587 section 4.1): set on the first packet after a
silence the caller skipped with
Packetizer::skip_samples, which is how a
DTX gap is sent, and clear otherwise.
Trait Implementations§
Source§impl Clone for OpusPayloader
impl Clone for OpusPayloader
impl Copy for OpusPayloader
Source§impl Debug for OpusPayloader
impl Debug for OpusPayloader
Source§impl Default for OpusPayloader
impl Default for OpusPayloader
Source§impl Payloader for OpusPayloader
impl Payloader for OpusPayloader
Source§fn marker_rule(&self) -> MarkerRule
fn marker_rule(&self) -> MarkerRule
Audio: the marker is for the first packet of a talkspurt (RFC 7587 section 4.1).
Source§fn payload(&mut self, mtu: usize, payload: &Bytes) -> Result<Vec<Bytes>>
fn payload(&mut self, mtu: usize, payload: &Bytes) -> Result<Vec<Bytes>>
Splits one encoded frame into payloads no larger than
mtu. Read moreSource§fn payload_duration(&self, _payload: &Bytes) -> Option<u32>
fn payload_duration(&self, _payload: &Bytes) -> Option<u32>
For a sample-based format, the RTP timestamp units one payload of
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)
What the encoder says about the next frame
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).Auto Trait Implementations§
impl Forget for OpusPayloader
impl Freeze for OpusPayloader
impl Move for OpusPayloader
impl RefUnwindSafe for OpusPayloader
impl Send for OpusPayloader
impl Sync for OpusPayloader
impl Unpin for OpusPayloader
impl UnsafeUnpin for OpusPayloader
impl UnwindSafe for OpusPayloader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more