pub struct AudioChannelLayout(/* private fields */);
Expand description
A thin wrapper around AVChannelLayout
to make it easier to use.
Implementations§
Source§impl AudioChannelLayout
impl AudioChannelLayout
Sourcepub fn new(channels: i32) -> Result<Self, FfmpegError>
pub fn new(channels: i32) -> Result<Self, FfmpegError>
Creates a new AudioChannelLayout
instance.
Sourcepub fn copy(&self) -> Result<Self, FfmpegError>
pub fn copy(&self) -> Result<Self, FfmpegError>
Copies this AudioChannelLayout
instance.
Sourcepub fn validate(&self) -> Result<(), FfmpegError>
pub fn validate(&self) -> Result<(), FfmpegError>
Validates the channel layout.
Sourcepub unsafe fn wrap(layout: AVChannelLayout) -> Self
pub unsafe fn wrap(layout: AVChannelLayout) -> Self
Wraps an AVChannelLayout
automatically calling av_channel_layout_uninit
on drop.
§Safety
Requires that the layout can be safely deallocated with av_channel_layout_uninit
Sourcepub fn channel_count(&self) -> i32
pub fn channel_count(&self) -> i32
Returns the number of channels in the layout.
Sourcepub fn into_inner(self) -> AVChannelLayout
pub fn into_inner(self) -> AVChannelLayout
Consumes the AudioChannelLayout
and returns the inner AVChannelLayout
.
The caller is responsible for calling av_channel_layout_uninit
on the returned value.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AudioChannelLayout
impl RefUnwindSafe for AudioChannelLayout
impl !Send for AudioChannelLayout
impl !Sync for AudioChannelLayout
impl Unpin for AudioChannelLayout
impl UnwindSafe for AudioChannelLayout
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