#[repr(transparent)]pub struct AVChannelOrder(pub u32);Expand description
Audio channel ordering schemes used in FFmpeg’s AVChannelOrder.
This enum defines how channels are arranged in an audio stream, determining their order and mapping.
See the official FFmpeg documentation: https://ffmpeg.org/doxygen/trunk/channel__layout_8h.html
Tuple Fields§
§0: u32Implementations§
Source§impl AVChannelOrder
impl AVChannelOrder
Sourcepub const Unspecified: Self
pub const Unspecified: Self
Only the channel count is specified, without any further information about the channel order.
- Used for: Unspecified channel layouts.
- Equivalent to:
AV_CHANNEL_ORDER_UNSPEC
Sourcepub const Native: Self
pub const Native: Self
Channels are in the native order defined in AVChannel (up to 63 channels).
- Used for: Standard layouts where channels are ordered as per the
AVChannelenum. - Equivalent to:
AV_CHANNEL_ORDER_NATIVE
Sourcepub const Custom: Self
pub const Custom: Self
The channel order does not correspond to any predefined order and is stored as an explicit map.
- Used for:
- Layouts with 64 or more channels.
- Layouts with empty/skipped (
AV_CHAN_UNUSED) channels at arbitrary positions.
- Example: Custom surround sound layouts.
- Equivalent to:
AV_CHANNEL_ORDER_CUSTOM
Sourcepub const Ambisonic: Self
pub const Ambisonic: Self
Ambisonic channel order, where each channel represents a spherical harmonic expansion component.
Channel arrangement (ACN - Ambisonic Channel Number):
- Channel index n is mapped to spherical harmonic degree l and order m:
l = floor(sqrt(n))m = n - l * (l + 1)
- Conversely, given degree l and order m, the channel index is:
n = l * (l + 1) + m
Normalization: SN3D (Schmidt Semi-Normalization) as defined in AmbiX format §2.1.
- Used for: Ambisonic (3D spatial audio) representations.
- Equivalent to:
AV_CHANNEL_ORDER_AMBISONIC
Trait Implementations§
Source§impl Clone for AVChannelOrder
impl Clone for AVChannelOrder
Source§fn clone(&self) -> AVChannelOrder
fn clone(&self) -> AVChannelOrder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more