# GstAudio meta

GstAudioDownmixMeta defines an audio downmix matrix to be send along with audio buffers. These functions in this module help to create and attach the meta as well as extracting it.

## GstAudioClippingMeta

Extra buffer metadata describing how much audio has to be clipped from the start or end of a buffer. This is used for compressed formats, where the first frame usually has some additional samples due to encoder and decoder delays, and the last frame usually has some additional samples to be able to fill the complete last frame.

This is used to ensure that decoded data in the end has the same amount of samples, and multiply decoded streams can be gaplessly concatenated.

Note: If clipping of the start is done by adjusting the segment, this meta has to be dropped from buffers as otherwise clipping could happen twice.

### Members

`meta` (GstMeta) –

parent GstMeta

`format` (GstFormat) –

GstFormat of start and stop, GST_FORMAT_DEFAULT is samples

`start` (guint64) –

Amount of audio to clip from start of buffer

`end` (guint64) –

Amount of to clip from end of buffer

Since : 1.8

## GstAudio.AudioClippingMeta

Extra buffer metadata describing how much audio has to be clipped from the start or end of a buffer. This is used for compressed formats, where the first frame usually has some additional samples due to encoder and decoder delays, and the last frame usually has some additional samples to be able to fill the complete last frame.

This is used to ensure that decoded data in the end has the same amount of samples, and multiply decoded streams can be gaplessly concatenated.

Note: If clipping of the start is done by adjusting the segment, this meta has to be dropped from buffers as otherwise clipping could happen twice.

### Members

`meta` (Gst.Meta) –

parent Gst.Meta

`format` (Gst.Format) –

GstFormat of start and stop, GST_FORMAT_DEFAULT is samples

`start` (Number) –

Amount of audio to clip from start of buffer

`end` (Number) –

Amount of to clip from end of buffer

Since : 1.8

## GstAudio.AudioClippingMeta

Extra buffer metadata describing how much audio has to be clipped from the start or end of a buffer. This is used for compressed formats, where the first frame usually has some additional samples due to encoder and decoder delays, and the last frame usually has some additional samples to be able to fill the complete last frame.

This is used to ensure that decoded data in the end has the same amount of samples, and multiply decoded streams can be gaplessly concatenated.

Note: If clipping of the start is done by adjusting the segment, this meta has to be dropped from buffers as otherwise clipping could happen twice.

### Members

`meta` (Gst.Meta) –

parent Gst.Meta

`format` (Gst.Format) –

GstFormat of start and stop, GST_FORMAT_DEFAULT is samples

`start` (int) –

Amount of audio to clip from start of buffer

`end` (int) –

Amount of to clip from end of buffer

Since : 1.8

### Functions

#### gst_audio_clipping_meta_get_info

    const GstMetaInfo *
    gst_audio_clipping_meta_get_info ()

Returns –
No description available

#### GstAudio.prototype.audio_clipping_meta_get_info

    function GstAudio.prototype.audio_clipping_meta_get_info(): {
        // javascript wrapper for 'gst_audio_clipping_meta_get_info'
    }

Returns (Gst.MetaInfo) –
No description available

#### GstAudio.audio_clipping_meta_get_info

    def GstAudio.audio_clipping_meta_get_info ():
        #python wrapper for 'gst_audio_clipping_meta_get_info'

Returns (Gst.MetaInfo) –
No description available

## GstAudioDownmixMeta

Extra buffer metadata describing audio downmixing matrix. This metadata is attached to audio buffers and contains a matrix to downmix the buffer number of channels to channels.

matrix is an two-dimensional array of to_channels times from_channels coefficients, i.e. the i-th output channels is constructed by multiplicating the input channels with the coefficients in matrix[i] and taking the sum of the results.

### Members

`meta` (GstMeta) –

parent GstMeta

`from_position` (GstAudioChannelPosition *) –

the channel positions of the source

`to_position` (GstAudioChannelPosition *) –

the channel positions of the destination

`from_channels` (gint) –

the number of channels of the source

`to_channels` (gint) –

the number of channels of the destination

`matrix` (gfloat **) –

the matrix coefficients.

## GstAudio.AudioDownmixMeta

Extra buffer metadata describing audio downmixing matrix. This metadata is attached to audio buffers and contains a matrix to downmix the buffer number of channels to channels.

matrix is an two-dimensional array of to_channels times from_channels coefficients, i.e. the i-th output channels is constructed by multiplicating the input channels with the coefficients in matrix[i] and taking the sum of the results.

### Members

`meta` (Gst.Meta) –

parent Gst.Meta

`from_position` ([ GstAudio.AudioChannelPosition ]) –

the channel positions of the source

`to_position` ([ GstAudio.AudioChannelPosition ]) –

the channel positions of the destination

`from_channels` (Number) –

the number of channels of the source

`to_channels` (Number) –

the number of channels of the destination

`matrix` ([ Number ]) –

the matrix coefficients.

## GstAudio.AudioDownmixMeta

Extra buffer metadata describing audio downmixing matrix. This metadata is attached to audio buffers and contains a matrix to downmix the buffer number of channels to channels.

matrix is an two-dimensional array of to_channels times from_channels coefficients, i.e. the i-th output channels is constructed by multiplicating the input channels with the coefficients in matrix[i] and taking the sum of the results.

### Members

`meta` (Gst.Meta) –

parent Gst.Meta

`from_position` ([ GstAudio.AudioChannelPosition ]) –

the channel positions of the source

`to_position` ([ GstAudio.AudioChannelPosition ]) –

the channel positions of the destination

`from_channels` (int) –

the number of channels of the source

`to_channels` (int) –

the number of channels of the destination

`matrix` ([ float ]) –

the matrix coefficients.

### Functions

#### gst_audio_downmix_meta_get_info

    const GstMetaInfo *
    gst_audio_downmix_meta_get_info ()

Returns –
No description available

#### GstAudio.prototype.audio_downmix_meta_get_info

    function GstAudio.prototype.audio_downmix_meta_get_info(): {
        // javascript wrapper for 'gst_audio_downmix_meta_get_info'
    }

Returns (Gst.MetaInfo) –
No description available

#### GstAudio.audio_downmix_meta_get_info

    def GstAudio.audio_downmix_meta_get_info ():
        #python wrapper for 'gst_audio_downmix_meta_get_info'

Returns (Gst.MetaInfo) –
No description available

## GstAudioLevelMeta

Meta containing Audio Level Indication: https://tools.ietf.org/html/rfc6464

### Members

`meta` (GstMeta) –

parent GstMeta

`level` (guint8) –

the -dBov from 0-127 (127 is silence).

`voice_activity` (gboolean) –

whether the buffer contains voice activity

Since : 1.20

## GstAudio.AudioLevelMeta

Meta containing Audio Level Indication: https://tools.ietf.org/html/rfc6464

### Members

`meta` (Gst.Meta) –

parent Gst.Meta

`level` (Number) –

the -dBov from 0-127 (127 is silence).

`voice_activity` (Number) –

whether the buffer contains voice activity

Since : 1.20

## GstAudio.AudioLevelMeta

Meta containing Audio Level Indication: https://tools.ietf.org/html/rfc6464

### Members

`meta` (Gst.Meta) –

parent Gst.Meta

`level` (int) –

the -dBov from 0-127 (127 is silence).

`voice_activity` (bool) –

whether the buffer contains voice activity

Since : 1.20

### Functions

#### gst_audio_level_meta_get_info

    const GstMetaInfo *
    gst_audio_level_meta_get_info ()

Return the GstMetaInfo associated with GstAudioLevelMeta.

Returns ( [transfer: none]) –

a GstMetaInfo

Since : 1.20

#### GstAudio.prototype.audio_level_meta_get_info

    function GstAudio.prototype.audio_level_meta_get_info(): {
        // javascript wrapper for 'gst_audio_level_meta_get_info'
    }

Return the Gst.MetaInfo associated with GstAudio.AudioLevelMeta.

Returns (Gst.MetaInfo) –

a Gst.MetaInfo

Since : 1.20

#### GstAudio.audio_level_meta_get_info

    def GstAudio.audio_level_meta_get_info ():
        #python wrapper for 'gst_audio_level_meta_get_info'

Return the Gst.MetaInfo associated with GstAudio.AudioLevelMeta.

Returns (Gst.MetaInfo) –

a Gst.MetaInfo

Since : 1.20

## GstAudioMeta

Buffer metadata describing how data is laid out inside the buffer. This is useful for non-interleaved (planar) buffers, where it is necessary to have a place to store where each plane starts and how long each plane is.

It is a requirement for non-interleaved buffers to have this metadata attached and to be mapped with gst_audio_buffer_map in order to ensure correct handling of clipping and channel reordering.

The different channels in offsets are always in the GStreamer channel order. Zero-copy channel reordering can be implemented by swapping the values in offsets.

It is not allowed for channels to overlap in memory, i.e. for each i in [0, channels), the range [@offsets[i], offsets[i] + samples * sample_stride) must not overlap with any other such range.

It is, however, allowed to have parts of the buffer memory unused, by using offsets and samples in such a way that leave gaps on it. This is used to implement zero-copy clipping in non-interleaved buffers.

Obviously, due to the above, it is not safe to infer the number of valid samples from the size of the buffer. You should always use the samples variable of this metadata.

Note that for interleaved audio it is not a requirement to have this metadata attached and at the moment of writing, there is actually no use case to do so. It is, however, allowed to attach it, for some potential future use case.

Since 1.24 it can be serialized using gst_meta_serialize and gst_meta_deserialize.

### Members

`meta` (GstMeta) –

parent GstMeta

`info` (GstAudioInfo) –

the audio properties of the buffer

`samples` (gsize) –

the number of valid samples in the buffer

`offsets` (gsize *) –

the offsets (in bytes) where each channel plane starts in the buffer or NULL if the buffer has interleaved layout; if not NULL, this is guaranteed to be an array of info.channels elements

Since : 1.16

## GstAudio.AudioMeta

Buffer metadata describing how data is laid out inside the buffer. This is useful for non-interleaved (planar) buffers, where it is necessary to have a place to store where each plane starts and how long each plane is.

It is a requirement for non-interleaved buffers to have this metadata attached and to be mapped with GstAudio.prototype.audio_buffer_map in order to ensure correct handling of clipping and channel reordering.

The different channels in offsets are always in the GStreamer channel order. Zero-copy channel reordering can be implemented by swapping the values in offsets.

It is not allowed for channels to overlap in memory, i.e. for each i in [0, channels), the range [@offsets[i], offsets[i] + samples * sample_stride) must not overlap with any other such range.

It is, however, allowed to have parts of the buffer memory unused, by using offsets and samples in such a way that leave gaps on it. This is used to implement zero-copy clipping in non-interleaved buffers.

Obviously, due to the above, it is not safe to infer the number of valid samples from the size of the buffer. You should always use the samples variable of this metadata.

Note that for interleaved audio it is not a requirement to have this metadata attached and at the moment of writing, there is actually no use case to do so. It is, however, allowed to attach it, for some potential future use case.

Since 1.24 it can be serialized using Gst.Meta.prototype.serialize and Gst.prototype.meta_deserialize.

### Members

`meta` (Gst.Meta) –

parent Gst.Meta

`info` (GstAudio.AudioInfo) –

the audio properties of the buffer

`samples` (Number) –

the number of valid samples in the buffer

`offsets` ([ Number ]) –

the offsets (in bytes) where each channel plane starts in the buffer or null if the buffer has interleaved layout; if not null, this is guaranteed to be an array of info.channels elements

Since : 1.16

## GstAudio.AudioMeta

Buffer metadata describing how data is laid out inside the buffer. This is useful for non-interleaved (planar) buffers, where it is necessary to have a place to store where each plane starts and how long each plane is.

It is a requirement for non-interleaved buffers to have this metadata attached and to be mapped with GstAudio.audio_buffer_map in order to ensure correct handling of clipping and channel reordering.

The different channels in offsets are always in the GStreamer channel order. Zero-copy channel reordering can be implemented by swapping the values in offsets.

It is not allowed for channels to overlap in memory, i.e. for each i in [0, channels), the range [@offsets[i], offsets[i] + samples * sample_stride) must not overlap with any other such range.

It is, however, allowed to have parts of the buffer memory unused, by using offsets and samples in such a way that leave gaps on it. This is used to implement zero-copy clipping in non-interleaved buffers.

Obviously, due to the above, it is not safe to infer the number of valid samples from the size of the buffer. You should always use the samples variable of this metadata.

Note that for interleaved audio it is not a requirement to have this metadata attached and at the moment of writing, there is actually no use case to do so. It is, however, allowed to attach it, for some potential future use case.

Since 1.24 it can be serialized using Gst.Meta.serialize and Gst.meta_deserialize.

### Members

`meta` (Gst.Meta) –

parent Gst.Meta

`info` (GstAudio.AudioInfo) –

the audio properties of the buffer

`samples` (int) –

the number of valid samples in the buffer

`offsets` ([ int ]) –

the offsets (in bytes) where each channel plane starts in the buffer or None if the buffer has interleaved layout; if not None, this is guaranteed to be an array of info.channels elements

Since : 1.16

### Functions

#### gst_audio_meta_get_info

    const GstMetaInfo *
    gst_audio_meta_get_info ()

Returns –
No description available

#### GstAudio.prototype.audio_meta_get_info

    function GstAudio.prototype.audio_meta_get_info(): {
        // javascript wrapper for 'gst_audio_meta_get_info'
    }

Returns (Gst.MetaInfo) –
No description available

#### GstAudio.audio_meta_get_info

    def GstAudio.audio_meta_get_info ():
        #python wrapper for 'gst_audio_meta_get_info'

Returns (Gst.MetaInfo) –
No description available

## Functions

### gst_audio_clipping_meta_api_get_type

    GType
    gst_audio_clipping_meta_api_get_type ()

Returns –
No description available

### GstAudio.prototype.audio_clipping_meta_api_get_type

    function GstAudio.prototype.audio_clipping_meta_api_get_type(): {
        // javascript wrapper for 'gst_audio_clipping_meta_api_get_type'
    }

Returns (GObject.Type) –
No description available

### GstAudio.audio_clipping_meta_api_get_type

    def GstAudio.audio_clipping_meta_api_get_type ():
        #python wrapper for 'gst_audio_clipping_meta_api_get_type'

Returns (GObject.Type) –
No description available

### gst_audio_downmix_meta_api_get_type

    GType
    gst_audio_downmix_meta_api_get_type ()

Returns –
No description available

### GstAudio.prototype.audio_downmix_meta_api_get_type

    function GstAudio.prototype.audio_downmix_meta_api_get_type(): {
        // javascript wrapper for 'gst_audio_downmix_meta_api_get_type'
    }

Returns (GObject.Type) –
No description available

### GstAudio.audio_downmix_meta_api_get_type

    def GstAudio.audio_downmix_meta_api_get_type ():
        #python wrapper for 'gst_audio_downmix_meta_api_get_type'

Returns (GObject.Type) –
No description available

### gst_audio_level_meta_api_get_type

    GType
    gst_audio_level_meta_api_get_type ()

Return the GType associated with GstAudioLevelMeta.

Returns –

a GType

Since : 1.20

### GstAudio.prototype.audio_level_meta_api_get_type

    function GstAudio.prototype.audio_level_meta_api_get_type(): {
        // javascript wrapper for 'gst_audio_level_meta_api_get_type'
    }

Return the GObject.Type associated with GstAudio.AudioLevelMeta.

Returns (GObject.Type) –

a GObject.Type

Since : 1.20

### GstAudio.audio_level_meta_api_get_type

    def GstAudio.audio_level_meta_api_get_type ():
        #python wrapper for 'gst_audio_level_meta_api_get_type'

Return the GObject.Type associated with GstAudio.AudioLevelMeta.

Returns (GObject.Type) –

a GObject.Type

Since : 1.20

### gst_audio_meta_api_get_type

    GType
    gst_audio_meta_api_get_type ()

Returns –
No description available

### GstAudio.prototype.audio_meta_api_get_type

    function GstAudio.prototype.audio_meta_api_get_type(): {
        // javascript wrapper for 'gst_audio_meta_api_get_type'
    }

Returns (GObject.Type) –
No description available

### GstAudio.audio_meta_api_get_type

    def GstAudio.audio_meta_api_get_type ():
        #python wrapper for 'gst_audio_meta_api_get_type'

Returns (GObject.Type) –
No description available

### gst_buffer_add_audio_clipping_meta

    GstAudioClippingMeta *
    gst_buffer_add_audio_clipping_meta (GstBuffer * buffer,
                                        GstFormat format,
                                        guint64 start,
                                        guint64 end)

Attaches GstAudioClippingMeta metadata to buffer with the given parameters.

Parameters:

`buffer` –

a GstBuffer

`format` –

GstFormat of start and stop, GST_FORMAT_DEFAULT is samples

`start` –

Amount of audio to clip from start of buffer

`end` –

Amount of to clip from end of buffer

Returns ( [transfer: none]) –

the GstAudioClippingMeta on buffer.

Since : 1.8

### GstAudio.prototype.buffer_add_audio_clipping_meta

    function GstAudio.prototype.buffer_add_audio_clipping_meta(buffer: Gst.Buffer, format: Gst.Format, start: Number, end: Number): {
        // javascript wrapper for 'gst_buffer_add_audio_clipping_meta'
    }

Attaches GstAudio.AudioClippingMeta metadata to buffer with the given parameters.

Parameters:

`buffer` (Gst.Buffer) –

a Gst.Buffer

`format` (Gst.Format) –

GstFormat of start and stop, GST_FORMAT_DEFAULT is samples

`start` (Number) –

Amount of audio to clip from start of buffer

`end` (Number) –

Amount of to clip from end of buffer

Returns (GstAudio.AudioClippingMeta) –

the GstAudio.AudioClippingMeta on buffer.

Since : 1.8

### GstAudio.buffer_add_audio_clipping_meta

    def GstAudio.buffer_add_audio_clipping_meta (buffer, format, start, end):
        #python wrapper for 'gst_buffer_add_audio_clipping_meta'

Attaches GstAudio.AudioClippingMeta metadata to buffer with the given parameters.

Parameters:

`buffer` (Gst.Buffer) –

a Gst.Buffer

`format` (Gst.Format) –

GstFormat of start and stop, GST_FORMAT_DEFAULT is samples

`start` (int) –

Amount of audio to clip from start of buffer

`end` (int) –

Amount of to clip from end of buffer

Returns (GstAudio.AudioClippingMeta) –

the GstAudio.AudioClippingMeta on buffer.

Since : 1.8

### gst_buffer_add_audio_downmix_meta

    GstAudioDownmixMeta *
    gst_buffer_add_audio_downmix_meta (GstBuffer * buffer,
                                       const GstAudioChannelPosition * from_position,
                                       gint from_channels,
                                       const GstAudioChannelPosition * to_position,
                                       gint to_channels,
                                       const gfloat ** matrix)

Attaches GstAudioDownmixMeta metadata to buffer with the given parameters.

matrix is an two-dimensional array of to_channels times from_channels coefficients, i.e. the i-th output channels is constructed by multiplicating the input channels with the coefficients in matrix[i] and taking the sum of the results.

Parameters:

`buffer` –

a GstBuffer

`from_position` ( [array length=from_channels]) –

the channel positions of the source

`from_channels` –

The number of channels of the source

`to_position` ( [array length=to_channels]) –

the channel positions of the destination

`to_channels` –

The number of channels of the destination

`matrix` ( [array][element-type gpointer]) –

The matrix coefficients.

Returns ( [transfer: none]) –

the GstAudioDownmixMeta on buffer.

### gst_buffer_add_audio_level_meta

    GstAudioLevelMeta *
    gst_buffer_add_audio_level_meta (GstBuffer * buffer,
                                     guint8 level,
                                     gboolean voice_activity)

Attaches audio level information to buffer. (RFC 6464)

Parameters:

`buffer` –

a GstBuffer

`level` –

the -dBov from 0-127 (127 is silence).

`voice_activity` –

whether the buffer contains voice activity.

Returns ( [transfer: none][nullable]) –

the GstAudioLevelMeta on buffer.

Since : 1.20

### GstAudio.prototype.buffer_add_audio_level_meta

    function GstAudio.prototype.buffer_add_audio_level_meta(buffer: Gst.Buffer, level: Number, voice_activity: Number): {
        // javascript wrapper for 'gst_buffer_add_audio_level_meta'
    }

Attaches audio level information to buffer. (RFC 6464)

Parameters:

`buffer` (Gst.Buffer) –

a Gst.Buffer

`level` (Number) –

the -dBov from 0-127 (127 is silence).

`voice_activity` (Number) –

whether the buffer contains voice activity.

Returns (GstAudio.AudioLevelMeta) –

the GstAudio.AudioLevelMeta on buffer.

Since : 1.20

### GstAudio.buffer_add_audio_level_meta

    def GstAudio.buffer_add_audio_level_meta (buffer, level, voice_activity):
        #python wrapper for 'gst_buffer_add_audio_level_meta'

Attaches audio level information to buffer. (RFC 6464)

Parameters:

`buffer` (Gst.Buffer) –

a Gst.Buffer

`level` (int) –

the -dBov from 0-127 (127 is silence).

`voice_activity` (bool) –

whether the buffer contains voice activity.

Returns (GstAudio.AudioLevelMeta) –

the GstAudio.AudioLevelMeta on buffer.

Since : 1.20

### gst_buffer_add_audio_meta

    GstAudioMeta *
    gst_buffer_add_audio_meta (GstBuffer * buffer,
                               const GstAudioInfo * info,
                               gsize samples,
                               gsize * offsets)

Allocates and attaches a GstAudioMeta on buffer, which must be writable for that purpose. The fields of the GstAudioMeta are directly populated from the arguments of this function.

When info->layout is GST_AUDIO_LAYOUT_NON_INTERLEAVED and offsets is NULL, the offsets are calculated with a formula that assumes the planes are tightly packed and in sequence: offsets[channel] = channel * samples * sample_stride

It is not allowed for channels to overlap in memory, i.e. for each i in [0, channels), the range [@offsets[i], offsets[i] + samples * sample_stride) must not overlap with any other such range. This function will assert if the parameters specified cause this restriction to be violated.

It is, obviously, also not allowed to specify parameters that would cause out-of-bounds memory access on buffer. This is also checked, which means that you must add enough memory on the buffer before adding this meta.

Parameters:

`buffer` –

a GstBuffer

`info` –

the audio properties of the buffer

`samples` –

the number of valid samples in the buffer

`offsets` ( [array][nullable]) –

the offsets (in bytes) where each channel plane starts in the buffer or NULL to calculate it (see below); must be NULL also when info->layout is GST_AUDIO_LAYOUT_INTERLEAVED

Returns ( [transfer: none]) –

the GstAudioMeta that was attached on the buffer

Since : 1.16

### GstAudio.prototype.buffer_add_audio_meta

    function GstAudio.prototype.buffer_add_audio_meta(buffer: Gst.Buffer, info: GstAudio.AudioInfo, samples: Number, offsets: [ Number ]): {
        // javascript wrapper for 'gst_buffer_add_audio_meta'
    }

Allocates and attaches a GstAudio.AudioMeta on buffer, which must be writable for that purpose. The fields of the GstAudio.AudioMeta are directly populated from the arguments of this function.

When info->layout is GstAudio.AudioLayout.NON_INTERLEAVED and offsets is null, the offsets are calculated with a formula that assumes the planes are tightly packed and in sequence: offsets[channel] = channel * samples * sample_stride

It is not allowed for channels to overlap in memory, i.e. for each i in [0, channels), the range [@offsets[i], offsets[i] + samples * sample_stride) must not overlap with any other such range. This function will assert if the parameters specified cause this restriction to be violated.

It is, obviously, also not allowed to specify parameters that would cause out-of-bounds memory access on buffer. This is also checked, which means that you must add enough memory on the buffer before adding this meta.

Parameters:

`buffer` (Gst.Buffer) –

a Gst.Buffer

`info` (GstAudio.AudioInfo) –

the audio properties of the buffer

`samples` (Number) –

the number of valid samples in the buffer

`offsets` ([ Number ]) –

the offsets (in bytes) where each channel plane starts in the buffer or null to calculate it (see below); must be null also when info->layout is GstAudio.AudioLayout.INTERLEAVED

Returns (GstAudio.AudioMeta) –

the GstAudio.AudioMeta that was attached on the buffer

Since : 1.16

### GstAudio.buffer_add_audio_meta

    def GstAudio.buffer_add_audio_meta (buffer, info, samples, offsets):
        #python wrapper for 'gst_buffer_add_audio_meta'

Allocates and attaches a GstAudio.AudioMeta on buffer, which must be writable for that purpose. The fields of the GstAudio.AudioMeta are directly populated from the arguments of this function.

When info->layout is GstAudio.AudioLayout.NON_INTERLEAVED and offsets is None, the offsets are calculated with a formula that assumes the planes are tightly packed and in sequence: offsets[channel] = channel * samples * sample_stride

It is not allowed for channels to overlap in memory, i.e. for each i in [0, channels), the range [@offsets[i], offsets[i] + samples * sample_stride) must not overlap with any other such range. This function will assert if the parameters specified cause this restriction to be violated.

It is, obviously, also not allowed to specify parameters that would cause out-of-bounds memory access on buffer. This is also checked, which means that you must add enough memory on the buffer before adding this meta.

Parameters:

`buffer` (Gst.Buffer) –

a Gst.Buffer

`info` (GstAudio.AudioInfo) –

the audio properties of the buffer

`samples` (int) –

the number of valid samples in the buffer

`offsets` ([ int ]) –

the offsets (in bytes) where each channel plane starts in the buffer or None to calculate it (see below); must be None also when info->layout is GstAudio.AudioLayout.INTERLEAVED

Returns (GstAudio.AudioMeta) –

the GstAudio.AudioMeta that was attached on the buffer

Since : 1.16

### gst_buffer_get_audio_downmix_meta_for_channels

    GstAudioDownmixMeta *
    gst_buffer_get_audio_downmix_meta_for_channels (GstBuffer * buffer,
                                                    const GstAudioChannelPosition * to_position,
                                                    gint to_channels)

Find the GstAudioDownmixMeta on buffer for the given destination channel positions.

Parameters:

`buffer` –

a GstBuffer

`to_position` ( [array length=to_channels]) –

the channel positions of the destination

`to_channels` –

The number of channels of the destination

Returns ( [transfer: none]) –

the GstAudioDownmixMeta on buffer.

### GstAudio.prototype.buffer_get_audio_downmix_meta_for_channels

    function GstAudio.prototype.buffer_get_audio_downmix_meta_for_channels(buffer: Gst.Buffer, to_position: [ GstAudio.AudioChannelPosition ], to_channels: Number): {
        // javascript wrapper for 'gst_buffer_get_audio_downmix_meta_for_channels'
    }

Find the GstAudio.AudioDownmixMeta on buffer for the given destination channel positions.

Parameters:

`buffer` (Gst.Buffer) –

a Gst.Buffer

`to_position` ([ GstAudio.AudioChannelPosition ]) –

the channel positions of the destination

`to_channels` (Number) –

The number of channels of the destination

Returns (GstAudio.AudioDownmixMeta) –

the GstAudio.AudioDownmixMeta on buffer.

### GstAudio.buffer_get_audio_downmix_meta_for_channels

    def GstAudio.buffer_get_audio_downmix_meta_for_channels (buffer, to_position, to_channels):
        #python wrapper for 'gst_buffer_get_audio_downmix_meta_for_channels'

Find the GstAudio.AudioDownmixMeta on buffer for the given destination channel positions.

Parameters:

`buffer` (Gst.Buffer) –

a Gst.Buffer

`to_position` ([ GstAudio.AudioChannelPosition ]) –

the channel positions of the destination

`to_channels` (int) –

The number of channels of the destination

Returns (GstAudio.AudioDownmixMeta) –

the GstAudio.AudioDownmixMeta on buffer.

### gst_buffer_get_audio_level_meta

    GstAudioLevelMeta *
    gst_buffer_get_audio_level_meta (GstBuffer * buffer)

Find the GstAudioLevelMeta on buffer.

Parameters:

`buffer` –

a GstBuffer

Returns ( [transfer: none][nullable]) –

the GstAudioLevelMeta or NULL when there is no such metadata on buffer.

Since : 1.20

### GstAudio.prototype.buffer_get_audio_level_meta

    function GstAudio.prototype.buffer_get_audio_level_meta(buffer: Gst.Buffer): {
        // javascript wrapper for 'gst_buffer_get_audio_level_meta'
    }

Find the GstAudio.AudioLevelMeta on buffer.

Parameters:

`buffer` (Gst.Buffer) –

a Gst.Buffer

Returns (GstAudio.AudioLevelMeta) –

the GstAudio.AudioLevelMeta or null when there is no such metadata on buffer.

Since : 1.20

### GstAudio.buffer_get_audio_level_meta

    def GstAudio.buffer_get_audio_level_meta (buffer):
        #python wrapper for 'gst_buffer_get_audio_level_meta'

Find the GstAudio.AudioLevelMeta on buffer.

Parameters:

`buffer` (Gst.Buffer) –

a Gst.Buffer

Returns (GstAudio.AudioLevelMeta) –

the GstAudio.AudioLevelMeta or None when there is no such metadata on buffer.

Since : 1.20

## Function Macros

### gst_buffer_get_audio_clipping_meta

    #define gst_buffer_get_audio_clipping_meta(b) ((GstAudioClippingMeta*)gst_buffer_get_meta((b), GST_AUDIO_CLIPPING_META_API_TYPE))

### gst_buffer_get_audio_downmix_meta

    #define gst_buffer_get_audio_downmix_meta(b) ((GstAudioDownmixMeta*)gst_buffer_get_meta((b), GST_AUDIO_DOWNMIX_META_API_TYPE))

### gst_buffer_get_audio_meta

    #define gst_buffer_get_audio_meta(b) \
        ((GstAudioMeta*)gst_buffer_get_meta((b), GST_AUDIO_META_API_TYPE))

## Constants

### GST_AUDIO_CLIPPING_META_API_TYPE

    #define GST_AUDIO_CLIPPING_META_API_TYPE (gst_audio_clipping_meta_api_get_type())

### GST_AUDIO_CLIPPING_META_INFO

    #define GST_AUDIO_CLIPPING_META_INFO  (gst_audio_clipping_meta_get_info())

### GST_AUDIO_DOWNMIX_META_API_TYPE

    #define GST_AUDIO_DOWNMIX_META_API_TYPE (gst_audio_downmix_meta_api_get_type())

### GST_AUDIO_DOWNMIX_META_INFO

    #define GST_AUDIO_DOWNMIX_META_INFO  (gst_audio_downmix_meta_get_info())

### GST_AUDIO_LEVEL_META_API_TYPE

    #define GST_AUDIO_LEVEL_META_API_TYPE  (gst_audio_level_meta_api_get_type())

The GType associated with GstAudioLevelMeta.

Since : 1.20

### GST_AUDIO_LEVEL_META_INFO

    #define GST_AUDIO_LEVEL_META_INFO  (gst_audio_level_meta_get_info())

The GstMetaInfo associated with GstAudioLevelMeta.

Since : 1.20

### GST_AUDIO_META_API_TYPE

    #define GST_AUDIO_META_API_TYPE (gst_audio_meta_api_get_type())

### GST_AUDIO_META_INFO

    #define GST_AUDIO_META_INFO  (gst_audio_meta_get_info())

The results of the search are