# Audio-channels

This library contains some helper functions for multichannel audio.

## Functions

### gst_audio_channel_get_fallback_mask

    guint64
    gst_audio_channel_get_fallback_mask (gint channels)

Get the fallback channel-mask for the given number of channels.

This function returns a reasonable fallback channel-mask and should be called as a last resort when the specific channel map is unknown.

Parameters:

`channels` –

the number of channels

Returns –

a fallback channel-mask for channels or 0 when there is no mask and mono.

Since : 1.8

### GstAudio.prototype.audio_channel_get_fallback_mask

    function GstAudio.prototype.audio_channel_get_fallback_mask(channels: Number): {
        // javascript wrapper for 'gst_audio_channel_get_fallback_mask'
    }

Get the fallback channel-mask for the given number of channels.

This function returns a reasonable fallback channel-mask and should be called as a last resort when the specific channel map is unknown.

Parameters:

`channels` (Number) –

the number of channels

Returns (Number) –

a fallback channel-mask for channels or 0 when there is no mask and mono.

Since : 1.8

### GstAudio.audio_channel_get_fallback_mask

    def GstAudio.audio_channel_get_fallback_mask (channels):
        #python wrapper for 'gst_audio_channel_get_fallback_mask'

Get the fallback channel-mask for the given number of channels.

This function returns a reasonable fallback channel-mask and should be called as a last resort when the specific channel map is unknown.

Parameters:

`channels` (int) –

the number of channels

Returns (int) –

a fallback channel-mask for channels or 0 when there is no mask and mono.

Since : 1.8

### gst_audio_channel_positions_from_mask

    gboolean
    gst_audio_channel_positions_from_mask (gint channels,
                                           guint64 channel_mask,
                                           GstAudioChannelPosition * position)

Convert the channels present in channel_mask to a position array (which should have at least channels entries ensured by caller). If channel_mask is set to 0, it is considered as 'not present' for purpose of conversion. A partially valid channel_mask with less bits set than the number of channels is considered valid.

Parameters:

`channels` –

The number of channels

`channel_mask` –

The input channel_mask

`position` ( [array length=channels]) –

The GstAudioChannelPositions

Returns –

TRUE if channel and channel mask are valid and could be converted

### GstAudio.prototype.audio_channel_positions_from_mask

    function GstAudio.prototype.audio_channel_positions_from_mask(channels: Number, channel_mask: Number, position: [ GstAudio.AudioChannelPosition ]): {
        // javascript wrapper for 'gst_audio_channel_positions_from_mask'
    }

Convert the channels present in channel_mask to a position array (which should have at least channels entries ensured by caller). If channel_mask is set to 0, it is considered as 'not present' for purpose of conversion. A partially valid channel_mask with less bits set than the number of channels is considered valid.

Parameters:

`channels` (Number) –

The number of channels

`channel_mask` (Number) –

The input channel_mask

`position` ([ GstAudio.AudioChannelPosition ]) –

The GstAudio.AudioChannelPositions

Returns (Number) –

true if channel and channel mask are valid and could be converted

### GstAudio.audio_channel_positions_from_mask

    def GstAudio.audio_channel_positions_from_mask (channels, channel_mask, position):
        #python wrapper for 'gst_audio_channel_positions_from_mask'

Convert the channels present in channel_mask to a position array (which should have at least channels entries ensured by caller). If channel_mask is set to 0, it is considered as 'not present' for purpose of conversion. A partially valid channel_mask with less bits set than the number of channels is considered valid.

Parameters:

`channels` (int) –

The number of channels

`channel_mask` (int) –

The input channel_mask

`position` ([ GstAudio.AudioChannelPosition ]) –

The GstAudio.AudioChannelPositions

Returns (bool) –

True if channel and channel mask are valid and could be converted

### gst_audio_channel_positions_to_mask

    gboolean
    gst_audio_channel_positions_to_mask (const GstAudioChannelPosition * position,
                                         gint channels,
                                         gboolean force_order,
                                         guint64 * channel_mask)

Convert the position array of channels channels to a bitmask.

If force_order is TRUE it additionally checks if the channels are in the order required by GStreamer.

Parameters:

`position` ( [array length=channels]) –

The GstAudioChannelPosition

`channels` –

The number of channels.

`force_order` –

Only consider the GStreamer channel order.

`channel_mask` ( [out]) –

the output channel mask

Returns –

TRUE if the channel positions are valid and could be converted.

### GstAudio.prototype.audio_channel_positions_to_mask

    function GstAudio.prototype.audio_channel_positions_to_mask(position: [ GstAudio.AudioChannelPosition ], channels: Number, force_order: Number): {
        // javascript wrapper for 'gst_audio_channel_positions_to_mask'
    }

Convert the position array of channels channels to a bitmask.

If force_order is true it additionally checks if the channels are in the order required by GStreamer.

Parameters:

`position` ([ GstAudio.AudioChannelPosition ]) –

The GstAudio.AudioChannelPosition

`channels` (Number) –

The number of channels.

`force_order` (Number) –

Only consider the GStreamer channel order.

Returns a tuple made of:

(Number ) –

true if the channel positions are valid and could be converted.

`channel_mask` (Number ) –

true if the channel positions are valid and could be converted.

### GstAudio.audio_channel_positions_to_mask

    def GstAudio.audio_channel_positions_to_mask (position, channels, force_order):
        #python wrapper for 'gst_audio_channel_positions_to_mask'

Convert the position array of channels channels to a bitmask.

If force_order is True it additionally checks if the channels are in the order required by GStreamer.

Parameters:

`position` ([ GstAudio.AudioChannelPosition ]) –

The GstAudio.AudioChannelPosition

`channels` (int) –

The number of channels.

`force_order` (bool) –

Only consider the GStreamer channel order.

Returns a tuple made of:

(bool ) –

True if the channel positions are valid and could be converted.

`channel_mask` (int ) –

True if the channel positions are valid and could be converted.

### gst_audio_channel_positions_to_string

    gchar *
    gst_audio_channel_positions_to_string (const GstAudioChannelPosition * position,
                                           gint channels)

Converts position to a human-readable string representation for debugging purposes.

Parameters:

`position` ( [array length=channels]) –

The GstAudioChannelPosition to convert.

`channels` –

The number of channels.

Returns ( [transfer: full]) –

a newly allocated string representing position

Since : 1.10

### GstAudio.prototype.audio_channel_positions_to_string

    function GstAudio.prototype.audio_channel_positions_to_string(position: [ GstAudio.AudioChannelPosition ], channels: Number): {
        // javascript wrapper for 'gst_audio_channel_positions_to_string'
    }

Converts position to a human-readable string representation for debugging purposes.

Parameters:

`position` ([ GstAudio.AudioChannelPosition ]) –

The GstAudio.AudioChannelPosition to convert.

`channels` (Number) –

The number of channels.

Returns (String) –

a newly allocated string representing position

Since : 1.10

### GstAudio.audio_channel_positions_to_string

    def GstAudio.audio_channel_positions_to_string (position, channels):
        #python wrapper for 'gst_audio_channel_positions_to_string'

Converts position to a human-readable string representation for debugging purposes.

Parameters:

`position` ([ GstAudio.AudioChannelPosition ]) –

The GstAudio.AudioChannelPosition to convert.

`channels` (int) –

The number of channels.

Returns (str) –

a newly allocated string representing position

Since : 1.10

### gst_audio_channel_positions_to_valid_order

    gboolean
    gst_audio_channel_positions_to_valid_order (GstAudioChannelPosition * position,
                                                gint channels)

Reorders the channel positions in position from any order to the GStreamer channel order.

Parameters:

`position` ( [array length=channels]) –

The channel positions to reorder to.

`channels` –

The number of channels.

Returns –

TRUE if the channel positions are valid and reordering was successful.

### GstAudio.prototype.audio_channel_positions_to_valid_order

    function GstAudio.prototype.audio_channel_positions_to_valid_order(position: [ GstAudio.AudioChannelPosition ], channels: Number): {
        // javascript wrapper for 'gst_audio_channel_positions_to_valid_order'
    }

Reorders the channel positions in position from any order to the GStreamer channel order.

Parameters:

`position` ([ GstAudio.AudioChannelPosition ]) –

The channel positions to reorder to.

`channels` (Number) –

The number of channels.

Returns (Number) –

true if the channel positions are valid and reordering was successful.

### GstAudio.audio_channel_positions_to_valid_order

    def GstAudio.audio_channel_positions_to_valid_order (position, channels):
        #python wrapper for 'gst_audio_channel_positions_to_valid_order'

Reorders the channel positions in position from any order to the GStreamer channel order.

Parameters:

`position` ([ GstAudio.AudioChannelPosition ]) –

The channel positions to reorder to.

`channels` (int) –

The number of channels.

Returns (bool) –

True if the channel positions are valid and reordering was successful.

### gst_audio_check_valid_channel_positions

    gboolean
    gst_audio_check_valid_channel_positions (const GstAudioChannelPosition * position,
                                             gint channels,
                                             gboolean force_order)

Checks if position contains valid channel positions for channels channels. If force_order is TRUE it additionally checks if the channels are in the order required by GStreamer.

Parameters:

`position` ( [array length=channels]) –

The GstAudioChannelPosition to check.

`channels` –

The number of channels.

`force_order` –

Only consider the GStreamer channel order.

Returns –

TRUE if the channel positions are valid.

### GstAudio.prototype.audio_check_valid_channel_positions

    function GstAudio.prototype.audio_check_valid_channel_positions(position: [ GstAudio.AudioChannelPosition ], channels: Number, force_order: Number): {
        // javascript wrapper for 'gst_audio_check_valid_channel_positions'
    }

Checks if position contains valid channel positions for channels channels. If force_order is true it additionally checks if the channels are in the order required by GStreamer.

Parameters:

`position` ([ GstAudio.AudioChannelPosition ]) –

The GstAudio.AudioChannelPosition to check.

`channels` (Number) –

The number of channels.

`force_order` (Number) –

Only consider the GStreamer channel order.

Returns (Number) –

true if the channel positions are valid.

### GstAudio.audio_check_valid_channel_positions

    def GstAudio.audio_check_valid_channel_positions (position, channels, force_order):
        #python wrapper for 'gst_audio_check_valid_channel_positions'

Checks if position contains valid channel positions for channels channels. If force_order is True it additionally checks if the channels are in the order required by GStreamer.

Parameters:

`position` ([ GstAudio.AudioChannelPosition ]) –

The GstAudio.AudioChannelPosition to check.

`channels` (int) –

The number of channels.

`force_order` (bool) –

Only consider the GStreamer channel order.

Returns (bool) –

True if the channel positions are valid.

### gst_audio_get_channel_reorder_map

    gboolean
    gst_audio_get_channel_reorder_map (gint channels,
                                       const GstAudioChannelPosition * from,
                                       const GstAudioChannelPosition * to,
                                       gint * reorder_map)

Returns a reorder map for from to to that can be used in custom channel reordering code, e.g. to convert from or to the GStreamer channel order. from and to must contain the same number of positions and the same positions, only in a different order.

The resulting reorder_map can be used for reordering by assigning channel i of the input to channel reorder_map[i] of the output.

Parameters:

`channels` –

The number of channels.

`from` ( [array length=channels]) –

The channel positions to reorder from.

`to` ( [array length=channels]) –

The channel positions to reorder to.

`reorder_map` ( [array length=channels]) –

Pointer to the reorder map.

Returns –

TRUE if the channel positions are valid and reordering is possible.

### GstAudio.prototype.audio_get_channel_reorder_map

    function GstAudio.prototype.audio_get_channel_reorder_map(channels: Number, from: [ GstAudio.AudioChannelPosition ], to: [ GstAudio.AudioChannelPosition ], reorder_map: [ Number ]): {
        // javascript wrapper for 'gst_audio_get_channel_reorder_map'
    }

Returns a reorder map for from to to that can be used in custom channel reordering code, e.g. to convert from or to the GStreamer channel order. from and to must contain the same number of positions and the same positions, only in a different order.

The resulting reorder_map can be used for reordering by assigning channel i of the input to channel reorder_map[i] of the output.

Parameters:

`channels` (Number) –

The number of channels.

`from` ([ GstAudio.AudioChannelPosition ]) –

The channel positions to reorder from.

`to` ([ GstAudio.AudioChannelPosition ]) –

The channel positions to reorder to.

`reorder_map` ([ Number ]) –

Pointer to the reorder map.

Returns (Number) –

true if the channel positions are valid and reordering is possible.

### GstAudio.audio_get_channel_reorder_map

    def GstAudio.audio_get_channel_reorder_map (channels, from, to, reorder_map):
        #python wrapper for 'gst_audio_get_channel_reorder_map'

Returns a reorder map for from to to that can be used in custom channel reordering code, e.g. to convert from or to the GStreamer channel order. from and to must contain the same number of positions and the same positions, only in a different order.

The resulting reorder_map can be used for reordering by assigning channel i of the input to channel reorder_map[i] of the output.

Parameters:

`channels` (int) –

The number of channels.

`from` ([ GstAudio.AudioChannelPosition ]) –

The channel positions to reorder from.

`to` ([ GstAudio.AudioChannelPosition ]) –

The channel positions to reorder to.

`reorder_map` ([ int ]) –

Pointer to the reorder map.

Returns (bool) –

True if the channel positions are valid and reordering is possible.

### gst_audio_reorder_channels

    gboolean
    gst_audio_reorder_channels (gpointer data,
                                gsize size,
                                GstAudioFormat format,
                                gint channels,
                                const GstAudioChannelPosition * from,
                                const GstAudioChannelPosition * 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 gst_audio_get_channel_reorder_map and gst_audio_reorder_channels_with_reorder_map. It is more efficient to call gst_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` ( [array length=size][element-type guint8]) –

The pointer to the memory.

`size` –

The size of the memory.

`format` –

The GstAudioFormat of the buffer.

`channels` –

The number of channels.

`from` ( [array length=channels]) –

The channel positions in the buffer.

`to` ( [array length=channels]) –

The channel positions to convert to.

Returns –

TRUE if the reordering was possible.

### GstAudio.prototype.audio_reorder_channels

    function GstAudio.prototype.audio_reorder_channels(data: [ Number ], size: Number, format: GstAudio.AudioFormat, channels: Number, from: [ GstAudio.AudioChannelPosition ], to: [ GstAudio.AudioChannelPosition ]): {
        // javascript wrapper for 'gst_audio_reorder_channels'
    }

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 GstAudio.prototype.audio_get_channel_reorder_map and GstAudio.prototype.audio_reorder_channels_with_reorder_map. It is more efficient to call GstAudio.prototype.audio_get_channel_reorder_map once to retrieve the reorder map and then call GstAudio.prototype.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` ([ Number ]) –

The pointer to the memory.

`size` (Number) –

The size of the memory.

`format` (GstAudio.AudioFormat) –

The GstAudio.AudioFormat of the buffer.

`channels` (Number) –

The number of channels.

`from` ([ GstAudio.AudioChannelPosition ]) –

The channel positions in the buffer.

`to` ([ GstAudio.AudioChannelPosition ]) –

The channel positions to convert to.

Returns (Number) –

true if the reordering was possible.

### GstAudio.audio_reorder_channels

    def GstAudio.audio_reorder_channels (data, size, format, channels, from, to):
        #python wrapper for 'gst_audio_reorder_channels'

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 GstAudio.audio_get_channel_reorder_map and GstAudio.audio_reorder_channels_with_reorder_map. It is more efficient to call GstAudio.audio_get_channel_reorder_map once to retrieve the reorder map and then call GstAudio.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` ([ int ]) –

The pointer to the memory.

`size` (int) –

The size of the memory.

`format` (GstAudio.AudioFormat) –

The GstAudio.AudioFormat of the buffer.

`channels` (int) –

The number of channels.

`from` ([ GstAudio.AudioChannelPosition ]) –

The channel positions in the buffer.

`to` ([ GstAudio.AudioChannelPosition ]) –

The channel positions to convert to.

Returns (bool) –

True if the reordering was possible.

### gst_audio_reorder_channels_with_reorder_map

    gst_audio_reorder_channels_with_reorder_map (gpointer data,
                                                 gsize size,
                                                 gint bps,
                                                 gint channels,
                                                 const gint * reorder_map)

Reorders data with the given reorder_map.

The reorder map can be retrieved for example with gst_audio_get_channel_reorder_map.

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

Parameters:

`data` ( [array length=size][element-type guint8]) –

The pointer to the memory.

`size` –

The size of the memory.

`bps` –

The number of bytes per sample.

`channels` –

The number of channels.

`reorder_map` ( [array length=channels]) –

The channel reorder map.

Since : 1.26

### GstAudio.prototype.audio_reorder_channels_with_reorder_map

    function GstAudio.prototype.audio_reorder_channels_with_reorder_map(data: [ Number ], size: Number, bps: Number, channels: Number, reorder_map: [ Number ]): {
        // javascript wrapper for 'gst_audio_reorder_channels_with_reorder_map'
    }

Reorders data with the given reorder_map.

The reorder map can be retrieved for example with GstAudio.prototype.audio_get_channel_reorder_map.

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

Parameters:

`data` ([ Number ]) –

The pointer to the memory.

`size` (Number) –

The size of the memory.

`bps` (Number) –

The number of bytes per sample.

`channels` (Number) –

The number of channels.

`reorder_map` ([ Number ]) –

The channel reorder map.

Since : 1.26

### GstAudio.audio_reorder_channels_with_reorder_map

    def GstAudio.audio_reorder_channels_with_reorder_map (data, size, bps, channels, reorder_map):
        #python wrapper for 'gst_audio_reorder_channels_with_reorder_map'

Reorders data with the given reorder_map.

The reorder map can be retrieved for example with GstAudio.audio_get_channel_reorder_map.

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

Parameters:

`data` ([ int ]) –

The pointer to the memory.

`size` (int) –

The size of the memory.

`bps` (int) –

The number of bytes per sample.

`channels` (int) –

The number of channels.

`reorder_map` ([ int ]) –

The channel reorder map.

Since : 1.26

## Function Macros

### GST_AUDIO_CHANNEL_POSITION_MASK

    #define GST_AUDIO_CHANNEL_POSITION_MASK(pos) (G_GUINT64_CONSTANT(1)<< GST_AUDIO_CHANNEL_POSITION_ ## pos)

## Enumerations

### GstAudioChannelPosition

Audio channel positions.

These are the channels defined in SMPTE 2036-2-2008 Table 1 for 22.2 audio systems with the Surround and Wide channels from DTS Coherent Acoustics (v.1.3.1) and 10.2 and 7.1 layouts. In the caps the actual channel layout is expressed with a channel count and a channel mask, which describes the existing channels. The positions in the bit mask correspond to the enum values. For negotiation it is allowed to have more bits set in the channel mask than the number of channels to specify the allowed channel positions but this is not allowed in negotiated caps. It is not allowed in any situation other than the one mentioned below to have less bits set in the channel mask than the number of channels.

GST_AUDIO_CHANNEL_POSITION_MONO can only be used with a single mono channel that has no direction information and would be mixed into all directional channels. This is expressed in caps by having a single channel and no channel mask.

GST_AUDIO_CHANNEL_POSITION_NONE can only be used if all channels have this position. This is expressed in caps by having a channel mask with no bits set.

As another special case it is allowed to have two channels without a channel mask. This implicitly means that this is a stereo stream with a front left and front right channel.

##### Members

`GST_AUDIO_CHANNEL_POSITION_NONE` (-3) –

used for position-less channels, e.g. from a sound card that records 1024 channels; mutually exclusive with any other channel position

`GST_AUDIO_CHANNEL_POSITION_MONO` (-2) –

Mono without direction; can only be used with 1 channel

`GST_AUDIO_CHANNEL_POSITION_INVALID` (-1) –

invalid position

`GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT` (0) –

Front left

`GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT` (1) –

Front right

`GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER` (2) –

Front center

`GST_AUDIO_CHANNEL_POSITION_LFE1` (3) –

Low-frequency effects 1 (subwoofer)

`GST_AUDIO_CHANNEL_POSITION_REAR_LEFT` (4) –

Rear left

`GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT` (5) –

Rear right

`GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER` (6) –

Front left of center

`GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER` (7) –

Front right of center

`GST_AUDIO_CHANNEL_POSITION_REAR_CENTER` (8) –

Rear center

`GST_AUDIO_CHANNEL_POSITION_LFE2` (9) –

Low-frequency effects 2 (subwoofer)

`GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT` (10) –

Side left

`GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT` (11) –

Side right

`GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_LEFT` (12) –

Top front left

`GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_RIGHT` (13) –

Top front right

`GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_CENTER` (14) –

Top front center

`GST_AUDIO_CHANNEL_POSITION_TOP_CENTER` (15) –

Top center

`GST_AUDIO_CHANNEL_POSITION_TOP_REAR_LEFT` (16) –

Top rear left

`GST_AUDIO_CHANNEL_POSITION_TOP_REAR_RIGHT` (17) –

Top rear right

`GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_LEFT` (18) –

Top side right

`GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_RIGHT` (19) –

Top rear right

`GST_AUDIO_CHANNEL_POSITION_TOP_REAR_CENTER` (20) –

Top rear center

`GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_CENTER` (21) –

Bottom front center

`GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_LEFT` (22) –

Bottom front left

`GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_RIGHT` (23) –

Bottom front right

`GST_AUDIO_CHANNEL_POSITION_WIDE_LEFT` (24) –

Wide left (between front left and side left)

`GST_AUDIO_CHANNEL_POSITION_WIDE_RIGHT` (25) –

Wide right (between front right and side right)

`GST_AUDIO_CHANNEL_POSITION_SURROUND_LEFT` (26) –

Surround left (between rear left and side left)

`GST_AUDIO_CHANNEL_POSITION_SURROUND_RIGHT` (27) –

Surround right (between rear right and side right)

`GST_AUDIO_CHANNEL_POSITION_TOP_SURROUND_LEFT` (28) –

Top surround left (between rear left and side left).

(Since: 1.26)
`GST_AUDIO_CHANNEL_POSITION_TOP_SURROUND_RIGHT` (29) –

Top surround right (between rear right and side right).

(Since: 1.26)

### GstAudio.AudioChannelPosition

Audio channel positions.

These are the channels defined in SMPTE 2036-2-2008 Table 1 for 22.2 audio systems with the Surround and Wide channels from DTS Coherent Acoustics (v.1.3.1) and 10.2 and 7.1 layouts. In the caps the actual channel layout is expressed with a channel count and a channel mask, which describes the existing channels. The positions in the bit mask correspond to the enum values. For negotiation it is allowed to have more bits set in the channel mask than the number of channels to specify the allowed channel positions but this is not allowed in negotiated caps. It is not allowed in any situation other than the one mentioned below to have less bits set in the channel mask than the number of channels.

GST_AUDIO_CHANNEL_POSITION_MONO can only be used with a single mono channel that has no direction information and would be mixed into all directional channels. This is expressed in caps by having a single channel and no channel mask.

GST_AUDIO_CHANNEL_POSITION_NONE can only be used if all channels have this position. This is expressed in caps by having a channel mask with no bits set.

As another special case it is allowed to have two channels without a channel mask. This implicitly means that this is a stereo stream with a front left and front right channel.

##### Members

`GstAudio.AudioChannelPosition.NONE` (-3) –

used for position-less channels, e.g. from a sound card that records 1024 channels; mutually exclusive with any other channel position

`GstAudio.AudioChannelPosition.MONO` (-2) –

Mono without direction; can only be used with 1 channel

`GstAudio.AudioChannelPosition.INVALID` (-1) –

invalid position

`GstAudio.AudioChannelPosition.FRONT_LEFT` (0) –

Front left

`GstAudio.AudioChannelPosition.FRONT_RIGHT` (1) –

Front right

`GstAudio.AudioChannelPosition.FRONT_CENTER` (2) –

Front center

`GstAudio.AudioChannelPosition.LFE1` (3) –

Low-frequency effects 1 (subwoofer)

`GstAudio.AudioChannelPosition.REAR_LEFT` (4) –

Rear left

`GstAudio.AudioChannelPosition.REAR_RIGHT` (5) –

Rear right

`GstAudio.AudioChannelPosition.FRONT_LEFT_OF_CENTER` (6) –

Front left of center

`GstAudio.AudioChannelPosition.FRONT_RIGHT_OF_CENTER` (7) –

Front right of center

`GstAudio.AudioChannelPosition.REAR_CENTER` (8) –

Rear center

`GstAudio.AudioChannelPosition.LFE2` (9) –

Low-frequency effects 2 (subwoofer)

`GstAudio.AudioChannelPosition.SIDE_LEFT` (10) –

Side left

`GstAudio.AudioChannelPosition.SIDE_RIGHT` (11) –

Side right

`GstAudio.AudioChannelPosition.TOP_FRONT_LEFT` (12) –

Top front left

`GstAudio.AudioChannelPosition.TOP_FRONT_RIGHT` (13) –

Top front right

`GstAudio.AudioChannelPosition.TOP_FRONT_CENTER` (14) –

Top front center

`GstAudio.AudioChannelPosition.TOP_CENTER` (15) –

Top center

`GstAudio.AudioChannelPosition.TOP_REAR_LEFT` (16) –

Top rear left

`GstAudio.AudioChannelPosition.TOP_REAR_RIGHT` (17) –

Top rear right

`GstAudio.AudioChannelPosition.TOP_SIDE_LEFT` (18) –

Top side right

`GstAudio.AudioChannelPosition.TOP_SIDE_RIGHT` (19) –

Top rear right

`GstAudio.AudioChannelPosition.TOP_REAR_CENTER` (20) –

Top rear center

`GstAudio.AudioChannelPosition.BOTTOM_FRONT_CENTER` (21) –

Bottom front center

`GstAudio.AudioChannelPosition.BOTTOM_FRONT_LEFT` (22) –

Bottom front left

`GstAudio.AudioChannelPosition.BOTTOM_FRONT_RIGHT` (23) –

Bottom front right

`GstAudio.AudioChannelPosition.WIDE_LEFT` (24) –

Wide left (between front left and side left)

`GstAudio.AudioChannelPosition.WIDE_RIGHT` (25) –

Wide right (between front right and side right)

`GstAudio.AudioChannelPosition.SURROUND_LEFT` (26) –

Surround left (between rear left and side left)

`GstAudio.AudioChannelPosition.SURROUND_RIGHT` (27) –

Surround right (between rear right and side right)

`GstAudio.AudioChannelPosition.TOP_SURROUND_LEFT` (28) –

Top surround left (between rear left and side left).

(Since: 1.26)
`GstAudio.AudioChannelPosition.TOP_SURROUND_RIGHT` (29) –

Top surround right (between rear right and side right).

(Since: 1.26)

### GstAudio.AudioChannelPosition

Audio channel positions.

These are the channels defined in SMPTE 2036-2-2008 Table 1 for 22.2 audio systems with the Surround and Wide channels from DTS Coherent Acoustics (v.1.3.1) and 10.2 and 7.1 layouts. In the caps the actual channel layout is expressed with a channel count and a channel mask, which describes the existing channels. The positions in the bit mask correspond to the enum values. For negotiation it is allowed to have more bits set in the channel mask than the number of channels to specify the allowed channel positions but this is not allowed in negotiated caps. It is not allowed in any situation other than the one mentioned below to have less bits set in the channel mask than the number of channels.

GST_AUDIO_CHANNEL_POSITION_MONO can only be used with a single mono channel that has no direction information and would be mixed into all directional channels. This is expressed in caps by having a single channel and no channel mask.

GST_AUDIO_CHANNEL_POSITION_NONE can only be used if all channels have this position. This is expressed in caps by having a channel mask with no bits set.

As another special case it is allowed to have two channels without a channel mask. This implicitly means that this is a stereo stream with a front left and front right channel.

##### Members

`GstAudio.AudioChannelPosition.NONE` (-3) –

used for position-less channels, e.g. from a sound card that records 1024 channels; mutually exclusive with any other channel position

`GstAudio.AudioChannelPosition.MONO` (-2) –

Mono without direction; can only be used with 1 channel

`GstAudio.AudioChannelPosition.INVALID` (-1) –

invalid position

`GstAudio.AudioChannelPosition.FRONT_LEFT` (0) –

Front left

`GstAudio.AudioChannelPosition.FRONT_RIGHT` (1) –

Front right

`GstAudio.AudioChannelPosition.FRONT_CENTER` (2) –

Front center

`GstAudio.AudioChannelPosition.LFE1` (3) –

Low-frequency effects 1 (subwoofer)

`GstAudio.AudioChannelPosition.REAR_LEFT` (4) –

Rear left

`GstAudio.AudioChannelPosition.REAR_RIGHT` (5) –

Rear right

`GstAudio.AudioChannelPosition.FRONT_LEFT_OF_CENTER` (6) –

Front left of center

`GstAudio.AudioChannelPosition.FRONT_RIGHT_OF_CENTER` (7) –

Front right of center

`GstAudio.AudioChannelPosition.REAR_CENTER` (8) –

Rear center

`GstAudio.AudioChannelPosition.LFE2` (9) –

Low-frequency effects 2 (subwoofer)

`GstAudio.AudioChannelPosition.SIDE_LEFT` (10) –

Side left

`GstAudio.AudioChannelPosition.SIDE_RIGHT` (11) –

Side right

`GstAudio.AudioChannelPosition.TOP_FRONT_LEFT` (12) –

Top front left

`GstAudio.AudioChannelPosition.TOP_FRONT_RIGHT` (13) –

Top front right

`GstAudio.AudioChannelPosition.TOP_FRONT_CENTER` (14) –

Top front center

`GstAudio.AudioChannelPosition.TOP_CENTER` (15) –

Top center

`GstAudio.AudioChannelPosition.TOP_REAR_LEFT` (16) –

Top rear left

`GstAudio.AudioChannelPosition.TOP_REAR_RIGHT` (17) –

Top rear right

`GstAudio.AudioChannelPosition.TOP_SIDE_LEFT` (18) –

Top side right

`GstAudio.AudioChannelPosition.TOP_SIDE_RIGHT` (19) –

Top rear right

`GstAudio.AudioChannelPosition.TOP_REAR_CENTER` (20) –

Top rear center

`GstAudio.AudioChannelPosition.BOTTOM_FRONT_CENTER` (21) –

Bottom front center

`GstAudio.AudioChannelPosition.BOTTOM_FRONT_LEFT` (22) –

Bottom front left

`GstAudio.AudioChannelPosition.BOTTOM_FRONT_RIGHT` (23) –

Bottom front right

`GstAudio.AudioChannelPosition.WIDE_LEFT` (24) –

Wide left (between front left and side left)

`GstAudio.AudioChannelPosition.WIDE_RIGHT` (25) –

Wide right (between front right and side right)

`GstAudio.AudioChannelPosition.SURROUND_LEFT` (26) –

Surround left (between rear left and side left)

`GstAudio.AudioChannelPosition.SURROUND_RIGHT` (27) –

Surround right (between rear right and side right)

`GstAudio.AudioChannelPosition.TOP_SURROUND_LEFT` (28) –

Top surround left (between rear left and side left).

(Since: 1.26)
`GstAudio.AudioChannelPosition.TOP_SURROUND_RIGHT` (29) –

Top surround right (between rear right and side right).

(Since: 1.26)

The results of the search are