Expand description
Conversions from FFmpeg’s ffmpeg_next::ChannelLayout /
ffmpeg_next::ffi::AVChannelOrder to the channel-layout types
mediadecode owns (mediadecode::channel::ChannelLayoutKind,
mediadecode::channel::AudioChannelOrderKind,
mediadecode::channel::AudioChannelSpec,
mediadecode::channel::AudioChannelLayout).
These live as free functions (not From trait impls) because of
Rust’s orphan rule: this crate owns neither From nor
mediadecode::channel::*, so we can’t write the impl here. Calling
mediadecode_ffmpeg::audio_channel_layout_from_ffmpeg(layout) is the
ergonomic boundary instead.
Functions§
- audio_
channel_ layout_ from_ ffmpeg - Builds a fully-populated
AudioChannelLayoutfrom an FFmpegChannelLayout. - audio_
channel_ ⚠layout_ from_ raw_ ptr - Pointer variant of
audio_channel_layout_from_ffmpeg. Safe-API callers that already hold a&ChannelLayoutshould prefer that function; the pointer form exists so the convert path (which never forms&AVFrame) can passaddr_of!((*av_frame).ch_layout)straight through without materializing a typed reference. - audio_
channel_ order_ kind_ from_ ffmpeg - Maps FFmpeg’s
AVChannelOrderto theAudioChannelOrderKindtag. - audio_
channel_ order_ kind_ from_ raw - Variant of
audio_channel_order_kind_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. - channel_
layout_ kind_ from_ ffmpeg - Maps an FFmpeg
ChannelLayoutto the high-levelChannelLayoutKindtag.