pub struct Codecs { /* private fields */ }Expand description
Which codecs a call offers and accepts, in preference order (M-30, P-9).
The default is PCMU then PCMA. An explicit selection is exactly the ordered set supplied by the application; negotiation may choose no codec outside it. RFC 4733 telephone events remain alongside every non-empty audio set and are not themselves an audio codec.
Implementations§
Source§impl Codecs
impl Codecs
Sourcepub fn ordered(
preferences: &[CodecPreference],
) -> Result<Self, CodecSelectionError>
pub fn ordered( preferences: &[CodecPreference], ) -> Result<Self, CodecSelectionError>
Validate an application’s exact ordered preference list.
§Errors
Empty lists, duplicates and Opus in a build without Opus are refused before a call can bind media or send signalling.
Sourcepub fn preferences(self) -> impl Iterator<Item = CodecPreference>
pub fn preferences(self) -> impl Iterator<Item = CodecPreference>
The selected codecs, in preference order.
Trait Implementations§
impl Copy for Codecs
impl Eq for Codecs
impl StructuralPartialEq for Codecs
Auto Trait Implementations§
impl Freeze for Codecs
impl RefUnwindSafe for Codecs
impl Send for Codecs
impl Sync for Codecs
impl Unpin for Codecs
impl UnsafeUnpin for Codecs
impl UnwindSafe for Codecs
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more