#[repr(C)]pub struct AVChannelLayout {
pub order: u32,
pub nb_channels: i32,
pub u: AVChannelLayout__bindgen_ty_1,
pub opaque: *mut c_void,
}
Expand description
An AVChannelLayout holds information about the channel layout of audio data.
A channel layout here is defined as a set of channels ordered in a specific way (unless the channel order is AV_CHANNEL_ORDER_UNSPEC, in which case an AVChannelLayout carries only the channel count). All orders may be treated as if they were AV_CHANNEL_ORDER_UNSPEC by ignoring everything but the channel count, as long as av_channel_layout_check() considers they are valid.
Unlike most structures in FFmpeg, sizeof(AVChannelLayout) is a part of the public ABI and may be used by the caller. E.g. it may be allocated on stack or embedded in caller-defined structs.
AVChannelLayout can be initialized as follows:
- default initialization with {0}, followed by setting all used fields correctly;
- by assigning one of the predefined AV_CHANNEL_LAYOUT_* initializers;
- with a constructor function, such as av_channel_layout_default(), av_channel_layout_from_mask() or av_channel_layout_from_string().
The channel layout must be unitialized with av_channel_layout_uninit()
Copying an AVChannelLayout via assigning is forbidden, av_channel_layout_copy() must be used instead (and its return value should be checked)
No new fields may be added to it without a major version bump, except for new elements of the union fitting in sizeof(uint64_t).
Fields§
§order: u32
Channel order used in this layout. This is a mandatory field.
nb_channels: i32
Number of channels in this layout. Mandatory field.
u: AVChannelLayout__bindgen_ty_1
§opaque: *mut c_void
For some private data of the user.
Trait Implementations§
Source§impl Clone for AVChannelLayout
impl Clone for AVChannelLayout
Source§fn clone(&self) -> AVChannelLayout
fn clone(&self) -> AVChannelLayout
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more