pub struct SampleFormat(/* private fields */);Expand description
Audio sample format identifier.
Implementations§
Source§impl SampleFormat
impl SampleFormat
Sourcepub const fn from_raw(raw: i32) -> Self
pub const fn from_raw(raw: i32) -> Self
Constructs a SampleFormat from the raw integer FFmpeg uses for
AVCodecContext::sample_fmt / AVFrame::format (audio).
Sourcepub const fn is_planar(self) -> bool
pub const fn is_planar(self) -> bool
Returns true if this is a planar (one buffer per channel) format.
Sourcepub const fn bytes_per_sample(self) -> Option<u32>
pub const fn bytes_per_sample(self) -> Option<u32>
Bytes per sample for known formats. None for Self::NONE or
values outside the closed set this newtype enumerates.
Trait Implementations§
Source§impl Clone for SampleFormat
impl Clone for SampleFormat
Source§fn clone(&self) -> SampleFormat
fn clone(&self) -> SampleFormat
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 moreSource§impl Debug for SampleFormat
impl Debug for SampleFormat
Source§impl Hash for SampleFormat
impl Hash for SampleFormat
Source§impl PartialEq for SampleFormat
impl PartialEq for SampleFormat
Source§fn eq(&self, other: &SampleFormat) -> bool
fn eq(&self, other: &SampleFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for SampleFormat
impl Eq for SampleFormat
impl StructuralPartialEq for SampleFormat
Auto Trait Implementations§
impl Freeze for SampleFormat
impl RefUnwindSafe for SampleFormat
impl Send for SampleFormat
impl Sync for SampleFormat
impl Unpin for SampleFormat
impl UnsafeUnpin for SampleFormat
impl UnwindSafe for SampleFormat
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