pub struct ChannelLayout {
pub order: ChannelOrder,
pub nb_channels: i32,
pub channels: Vec<Channel>,
}Expand description
Audio channel layout.
Fields§
§order: ChannelOrder§nb_channels: i32§channels: Vec<Channel>Implementations§
Source§impl ChannelLayout
impl ChannelLayout
Sourcepub fn surround_5_1() -> Self
pub fn surround_5_1() -> Self
5.1 surround layout.
Sourcepub fn surround_7_1() -> Self
pub fn surround_7_1() -> Self
7.1 surround layout.
Sourcepub fn from_wav_channel_mask(mask: u32) -> Self
pub fn from_wav_channel_mask(mask: u32) -> Self
Construct a channel layout from a WAV/WAVEFORMATEXTENSIBLE channel mask.
The WAV channel mask bits correspond to:
- bit 0: FRONT_LEFT
- bit 1: FRONT_RIGHT
- bit 2: FRONT_CENTER
- bit 3: LOW_FREQUENCY
- bit 4: BACK_LEFT
- bit 5: BACK_RIGHT
- bit 6: FRONT_LEFT_OF_CENTER
- bit 7: FRONT_RIGHT_OF_CENTER
- bit 8: BACK_CENTER
- bit 9: SIDE_LEFT
- bit 10: SIDE_RIGHT
Source§impl ChannelLayout
impl ChannelLayout
Sourcepub fn standard_name(&self) -> Option<&'static str>
pub fn standard_name(&self) -> Option<&'static str>
Return the FFmpeg standard layout name if this matches a known configuration.
The layout names and channel compositions match FFmpeg’s channel_layout_map
table in libavutil/channel_layout.c. Channels are listed in native order
(ascending enum/bit-position order).
Trait Implementations§
Source§impl Clone for ChannelLayout
impl Clone for ChannelLayout
Source§fn clone(&self) -> ChannelLayout
fn clone(&self) -> ChannelLayout
Returns a duplicate of the value. Read more
1.0.0 · 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 ChannelLayout
impl Debug for ChannelLayout
Auto Trait Implementations§
impl Freeze for ChannelLayout
impl RefUnwindSafe for ChannelLayout
impl Send for ChannelLayout
impl Sync for ChannelLayout
impl Unpin for ChannelLayout
impl UnsafeUnpin for ChannelLayout
impl UnwindSafe for ChannelLayout
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