audio_reorder_channels


Description:

[ CCode ( cname = "gst_audio_reorder_channels" ) ]
public bool audio_reorder_channels (uint8[] data, Format format, ChannelPosition[] from, ChannelPosition[] to)

Reorders data from the channel positions from to the channel positions to.

from and to must contain the same number of positions and the same positions, only in a different order.

This function internally calls audio_get_channel_reorder_map and gst_audio_reorder_channels_with_reorder_map. It is more efficient to call audio_get_channel_reorder_map once to retrieve the reorder map and then call gst_audio_reorder_channels_with_reorder_map with the same reorder map until the channel positions change.

Note: this function assumes the audio data is in interleaved layout

Parameters:

data

The pointer to the memory.

format

The gstaudioformat of the buffer.

from

The channel positions in the buffer.

to

The channel positions to convert to.

channels

The number of channels.

size

The size of the memory.

Returns:

true if the reordering was possible.


Namespace: Gst.Audio