pub struct CodecPreferences {
audio: [AudioCodecPreference; 3],
video: [VideoCodecPreference; 5],
}Expand description
Audio and video codec ordering for RTP profile compilation.
Partial orders should use Self::with_audio_order and
Self::with_video_order.
Fields§
§audio: [AudioCodecPreference; 3]§video: [VideoCodecPreference; 5]Implementations§
Source§impl CodecPreferences
impl CodecPreferences
Sourcepub const DEFAULT_AUDIO: [AudioCodecPreference; 3]
pub const DEFAULT_AUDIO: [AudioCodecPreference; 3]
canonical audio order used when operators do not override preferences
Sourcepub const DEFAULT_VIDEO: [VideoCodecPreference; 5]
pub const DEFAULT_VIDEO: [VideoCodecPreference; 5]
canonical video order used when operators do not override preferences
Sourcepub const fn new(
audio: [AudioCodecPreference; 3],
video: [VideoCodecPreference; 5],
) -> CodecPreferences
pub const fn new( audio: [AudioCodecPreference; 3], video: [VideoCodecPreference; 5], ) -> CodecPreferences
Stores caller-supplied complete audio and video orders.
Each array must contain every corresponding codec exactly once. This constructor does not validate the permutation.
Sourcepub fn with_audio_order(
self,
preferred: &[AudioCodecPreference],
) -> CodecPreferences
pub fn with_audio_order( self, preferred: &[AudioCodecPreference], ) -> CodecPreferences
Places each distinct preferred codec first in encounter order.
Every omitted codec follows in canonical default order. The previous audio order is not used.
Sourcepub fn with_video_order(
self,
preferred: &[VideoCodecPreference],
) -> CodecPreferences
pub fn with_video_order( self, preferred: &[VideoCodecPreference], ) -> CodecPreferences
Places each distinct preferred codec first in encounter order.
Every omitted codec follows in canonical default order. The previous video order is not used.
Sourcepub const fn audio_order(self) -> [AudioCodecPreference; 3]
pub const fn audio_order(self) -> [AudioCodecPreference; 3]
complete audio order after defaults filled any omitted codecs
Sourcepub const fn video_order(self) -> [VideoCodecPreference; 5]
pub const fn video_order(self) -> [VideoCodecPreference; 5]
complete video order after defaults filled any omitted codecs
Trait Implementations§
Source§impl Clone for CodecPreferences
impl Clone for CodecPreferences
Source§fn clone(&self) -> CodecPreferences
fn clone(&self) -> CodecPreferences
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodecPreferences
impl Debug for CodecPreferences
Source§impl Default for CodecPreferences
impl Default for CodecPreferences
Source§fn default() -> CodecPreferences
fn default() -> CodecPreferences
Source§impl PartialEq for CodecPreferences
impl PartialEq for CodecPreferences
impl Copy for CodecPreferences
impl Eq for CodecPreferences
impl StructuralPartialEq for CodecPreferences
Auto Trait Implementations§
impl Freeze for CodecPreferences
impl RefUnwindSafe for CodecPreferences
impl Send for CodecPreferences
impl Sync for CodecPreferences
impl Unpin for CodecPreferences
impl UnsafeUnpin for CodecPreferences
impl UnwindSafe for CodecPreferences
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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>
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>
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