# GstAudio IEC61937

This module contains some helper functions for encapsulating various audio formats in IEC 61937 headers and padding.

## Functions

### gst_audio_iec61937_frame_size

    guint
    gst_audio_iec61937_frame_size (const GstAudioRingBufferSpec * spec)

Calculated the size of the buffer expected by gst_audio_iec61937_payload for payloading type from spec.

Parameters:

`spec` –

the ringbufer spec

Returns –

the size or 0 if the given type is not supported or cannot be payloaded.

### GstAudio.prototype.audio_iec61937_frame_size

    function GstAudio.prototype.audio_iec61937_frame_size(spec: GstAudio.AudioRingBufferSpec): {
        // javascript wrapper for 'gst_audio_iec61937_frame_size'
    }

Calculated the size of the buffer expected by GstAudio.prototype.audio_iec61937_payload for payloading type from spec.

Parameters:

`spec` ( GstAudio.AudioRingBufferSpec ) –

the ringbufer spec

Returns ( Number ) –

the size or 0 if the given type is not supported or cannot be payloaded.

### GstAudio.audio_iec61937_frame_size

    def GstAudio.audio_iec61937_frame_size (spec):
        #python wrapper for 'gst_audio_iec61937_frame_size'

Calculated the size of the buffer expected by GstAudio.audio_iec61937_payload for payloading type from spec.

Parameters:

`spec` ( GstAudio.AudioRingBufferSpec ) –

the ringbufer spec

Returns ( int ) –

the size or 0 if the given type is not supported or cannot be payloaded.

### gst_audio_iec61937_payload

    gboolean
    gst_audio_iec61937_payload (const guint8 * src,
                                guint src_n,
                                guint8 * dst,
                                guint dst_n,
                                const GstAudioRingBufferSpec * spec,
                                gint endianness)

Payloads src in the form specified by IEC 61937 for the type from spec and stores the result in dst. src must contain exactly one frame of data and the frame is not checked for errors.

Parameters:

`src` ( [arraylength=src_n] ) –

a buffer containing the data to payload

`src_n` –

size of src in bytes

`dst` ( [arraylength=dst_n] ) –

the destination buffer to store the payloaded contents in. Should not overlap with src

`dst_n` –

size of dst in bytes

`spec` –

the ringbufer spec for src

`endianness` –

the expected byte order of the payloaded data

Returns –

transfer-full: TRUE if the payloading was successful, FALSE otherwise.

### GstAudio.prototype.audio_iec61937_payload

    function GstAudio.prototype.audio_iec61937_payload(src: [ Number ], src_n: Number, dst: [ Number ], dst_n: Number, spec: GstAudio.AudioRingBufferSpec, endianness: Number): {
        // javascript wrapper for 'gst_audio_iec61937_payload'
    }

Payloads src in the form specified by IEC 61937 for the type from spec and stores the result in dst. src must contain exactly one frame of data and the frame is not checked for errors.

Parameters:

`src` ( [ Number ] ) –

a buffer containing the data to payload

`src_n` ( Number ) –

size of src in bytes

`dst` ( [ Number ] ) –

the destination buffer to store the payloaded contents in. Should not overlap with src

`dst_n` ( Number ) –

size of dst in bytes

`spec` ( GstAudio.AudioRingBufferSpec ) –

the ringbufer spec for src

`endianness` ( Number ) –

the expected byte order of the payloaded data

Returns ( Number ) –

transfer-full: true if the payloading was successful, false otherwise.

### GstAudio.audio_iec61937_payload

    def GstAudio.audio_iec61937_payload (src, src_n, dst, dst_n, spec, endianness):
        #python wrapper for 'gst_audio_iec61937_payload'

Payloads src in the form specified by IEC 61937 for the type from spec and stores the result in dst. src must contain exactly one frame of data and the frame is not checked for errors.

Parameters:

`src` ( [ int ] ) –

a buffer containing the data to payload

`src_n` ( int ) –

size of src in bytes

`dst` ( [ int ] ) –

the destination buffer to store the payloaded contents in. Should not overlap with src

`dst_n` ( int ) –

size of dst in bytes

`spec` ( GstAudio.AudioRingBufferSpec ) –

the ringbufer spec for src

`endianness` ( int ) –

the expected byte order of the payloaded data

Returns ( bool ) –

transfer-full: True if the payloading was successful, False otherwise.

The results of the search are