pub fn channel_layout_from_ffmpeg(value: &ChannelLayout) -> ChannelLayoutExpand description
Maps an FFmpeg AvChannelLayout to the named
ChannelLayout vocabulary.
Two rungs, in order:
- the constant-arm table — exactly
ffmpeg_next’sChannelLayoutconstant set, compared throughav_channel_layout_compare; - the describe rung — for a layout that falls off the table,
FFmpeg names it via
av_channel_layout_describeand that name goes throughChannelLayout’s own total door (FromStr).
The second rung is what makes binaural / 5.1.2 / 9.1.6
reachable: ChannelLayout names all three, ffmpeg_next 9.0.0
mints no constant for any of them, so the table alone can never
produce them. It is also why a layout a later FFmpeg adds is
reachable with no edit here, as long as the vocabulary already
names it — FFmpeg speaks the name, the vocabulary reads the word,
one source.
Returns ChannelLayout::default — the Other("") absent sentinel
— when neither rung names the layout. The rendering itself is not
smuggled into Other: an unrecognised layout stays absent, and
ChannelLayoutDescription::text is where its FFmpeg rendering
lives.