pub enum AudioCodec {
Pcmu,
Pcma,
Opus {
payload_type: u8,
},
}Expand description
An audio codec this stack can negotiate, with its wire identity.
This is negotiation metadata, not a codec implementation — encode
and decode stay with the consumer (wavekat-core provides G.711 and
Opus codecs).
Variants§
Pcmu
G.711 μ-law — static RTP payload type 0.
Pcma
G.711 A-law — static RTP payload type 8.
Opus
Opus at a dynamic payload type — whatever this side of the negotiation chose. The number alone is not self-describing the way 0/8 are; it only means Opus in the context of the SDP body that mapped it.
Implementations§
Source§impl AudioCodec
impl AudioCodec
Sourcepub fn payload_type(&self) -> u8
pub fn payload_type(&self) -> u8
The RTP payload-type number this codec rides on.
Sourcepub fn rtp_clock_rate(&self) -> u32
pub fn rtp_clock_rate(&self) -> u32
The RTP timestamp clock rate: 8 kHz for G.711, always 48 kHz for Opus (a wire constant — see the module docs).
Trait Implementations§
Source§impl Clone for AudioCodec
impl Clone for AudioCodec
Source§fn clone(&self) -> AudioCodec
fn clone(&self) -> AudioCodec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AudioCodec
Source§impl Debug for AudioCodec
impl Debug for AudioCodec
impl Eq for AudioCodec
Source§impl PartialEq for AudioCodec
impl PartialEq for AudioCodec
Source§fn eq(&self, other: &AudioCodec) -> bool
fn eq(&self, other: &AudioCodec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AudioCodec
Auto Trait Implementations§
impl Freeze for AudioCodec
impl RefUnwindSafe for AudioCodec
impl Send for AudioCodec
impl Sync for AudioCodec
impl Unpin for AudioCodec
impl UnsafeUnpin for AudioCodec
impl UnwindSafe for AudioCodec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.