[][src]Function ffmpeg_dev::sys::avresample_set_channel_mapping

pub unsafe extern "C" fn avresample_set_channel_mapping(
    avr: *mut AVAudioResampleContext,
    channel_map: *const c_int
) -> c_int

@deprecated use libswresample

Set a customized input channel mapping.

This function can only be called when the allocated context is not open. Also, the input channel layout must have already been set.

Calling avresample_close() on the context will clear the channel mapping.

The map for each input channel specifies the channel index in the source to use for that particular channel, or -1 to mute the channel. Source channels can be duplicated by using the same index for multiple input channels.

Examples:

Reordering 5.1 AAC order (C,L,R,Ls,Rs,LFE) to FFmpeg order (L,R,C,LFE,Ls,Rs): { 1, 2, 0, 5, 3, 4 }

Muting the 3rd channel in 4-channel input: { 0, 1, -1, 3 }

Duplicating the left channel of stereo input: { 0, 0 }

@param avr audio resample context @param channel_map customized input channel mapping @return 0 on success, negative AVERROR code on failure