Expand description
Conversions from FFmpeg’s ffmpeg_next::ChannelLayout /
ffmpeg_next::ffi::AVChannelOrder to the channel-layout vocabulary
mediaframe owns (ChannelLayout, ChannelOrder,
ChannelSpec, ChannelLayoutDescription).
These live as free functions (not From trait impls) because of
Rust’s orphan rule: this crate owns neither From nor
mediaframe::audio::*, so we can’t write the impl here. Calling
mediadecode_ffmpeg::channel_layout_description_from_ffmpeg(layout)
is the ergonomic boundary instead.
FFmpeg’s own type is imported as AvChannelLayout so the name
ChannelLayout can stay with the vocabulary these functions
produce.
Enums§
- Channel
Layout Fault - Why a channel layout could not be described.
Functions§
- channel_
layout_ description_ from_ ffmpeg - Builds a fully-populated
ChannelLayoutDescriptionfrom an FFmpegAvChannelLayout. - channel_
layout_ ⚠description_ from_ raw_ ptr - Pointer variant of
channel_layout_description_from_ffmpeg, and the only road that reads a custom channel map. - channel_
layout_ from_ ffmpeg - Maps an FFmpeg
AvChannelLayoutto the namedChannelLayoutvocabulary. - channel_
order_ from_ ffmpeg - Maps FFmpeg’s
AVChannelOrderto theChannelOrdertag. - channel_
order_ from_ raw - Variant of
channel_order_from_ffmpegthat takes the raw integer directly. Use this when the caller has just readAVChannelLayout.orderfrom FFmpeg memory and doesn’t want to risk constructing an invalid bindgen enum value first.