pub struct AudioFrameDescriptor {
pub format: SampleFormat,
pub samples: NonZeroU32,
pub sample_rate: NonZeroU32,
pub channel_layout: ChannelLayout,
}Fields§
§format: SampleFormat§samples: NonZeroU32§sample_rate: NonZeroU32§channel_layout: ChannelLayoutImplementations§
Source§impl AudioFrameDescriptor
impl AudioFrameDescriptor
pub fn new( format: SampleFormat, channels: NonZeroU8, samples: NonZeroU32, sample_rate: NonZeroU32, ) -> Self
pub fn try_new( format: SampleFormat, channels: u8, samples: u32, sample_rate: u32, ) -> Result<Self>
pub fn from_channel_layout( format: SampleFormat, samples: NonZeroU32, sample_rate: NonZeroU32, channel_layout: ChannelLayout, ) -> Self
pub fn try_from_channel_layout( format: SampleFormat, samples: u32, sample_rate: u32, channel_layout: ChannelLayout, ) -> Result<Self>
pub fn channels(&self) -> NonZeroU8
pub fn duration_equal(&self, other: &AudioFrameDescriptor) -> bool
Trait Implementations§
Source§impl Clone for AudioFrameDescriptor
impl Clone for AudioFrameDescriptor
Source§fn clone(&self) -> AudioFrameDescriptor
fn clone(&self) -> AudioFrameDescriptor
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AudioFrameDescriptor
impl Debug for AudioFrameDescriptor
Source§impl FrameDescriptorSpec for AudioFrameDescriptor
impl FrameDescriptorSpec for AudioFrameDescriptor
fn media_type(&self) -> MediaType
fn create_frame(&self) -> Result<Frame<'static, Self>>
fn as_audio(&self) -> Option<&AudioFrameDescriptor>
fn as_video(&self) -> Option<&VideoFrameDescriptor>
fn as_data(&self) -> Option<&DataFrameDescriptor>
Source§impl FrameSpec<AudioFrameDescriptor> for AudioFrame<'_>
impl FrameSpec<AudioFrameDescriptor> for AudioFrame<'_>
fn new_with_descriptor( desc: AudioFrameDescriptor, ) -> Result<Frame<'static, AudioFrameDescriptor>>
fn media_type(&self) -> MediaType
Source§impl From<AudioFrameDescriptor> for FrameDescriptor
impl From<AudioFrameDescriptor> for FrameDescriptor
Source§fn from(desc: AudioFrameDescriptor) -> Self
fn from(desc: AudioFrameDescriptor) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AudioFrameDescriptor
impl PartialEq for AudioFrameDescriptor
impl Eq for AudioFrameDescriptor
impl StructuralPartialEq for AudioFrameDescriptor
Auto Trait Implementations§
impl Freeze for AudioFrameDescriptor
impl RefUnwindSafe for AudioFrameDescriptor
impl Send for AudioFrameDescriptor
impl Sync for AudioFrameDescriptor
impl Unpin for AudioFrameDescriptor
impl UnwindSafe for AudioFrameDescriptor
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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