pub unsafe extern "C" fn av_channel_layout_from_string(
channel_layout: *mut AVChannelLayout,
str_: *const i8,
) -> i32
Expand description
Initialize a channel layout from a given string description. The input string can be represented by:
- the formal channel layout name (returned by av_channel_layout_describe())
- single or multiple channel names (returned by av_channel_name(), eg. “FL”, or concatenated with “+”, each optionally containing a custom name after a “@”, eg. “FL@Left+FR@Right+LFE”)
- a decimal or hexadecimal value of a native channel layout (eg. “4” or “0x4”)
- the number of channels with default layout (eg. “4c”)
- the number of unordered channels (eg. “4C” or “4 channels”)
- the ambisonic order followed by optional non-diegetic channels (eg. “ambisonic 2+stereo”) On error, the channel layout will remain uninitialized, but not necessarily untouched.
@param channel_layout uninitialized channel layout for the result @param str string describing the channel layout @return 0 on success parsing the channel layout AVERROR(EINVAL) if an invalid channel layout string was provided AVERROR(ENOMEM) if there was not enough memory