Skip to main content

channel_layout_description_from_ffmpeg

Function channel_layout_description_from_ffmpeg 

Source
pub fn channel_layout_description_from_ffmpeg(
    value: &ChannelLayout,
) -> ChannelLayoutDescription
Expand description

Builds a fully-populated ChannelLayoutDescription from an FFmpeg AvChannelLayout.

  • Native / Ambisonic layouts populate native_mask from AvChannelLayout::bits (clearing it to None if zero).
  • Custom layouts populate custom_channels from FFmpeg’s per-channel list (AVChannelLayout.u.map), with each label drawn from AVChannelCustom.name.
  • text carries the result of av_channel_layout_describe (FFmpeg’s human-readable rendering — e.g. "5.1(side)").
  • known_kind runs channel_layout_from_ffmpeg’s two rungs against that same single rendering: constant table first, then the describe rung.