# Codec utilities

Provides codec-specific ulility functions such as functions to provide the codec profile and level in human-readable string form from header data.

## GstH264LevelLimits

H.264 level limits from Table A-1 of the specification.

### Members

`name` (const gchar *) –

the level name (e.g. "3.1", "4", "4.2")

`level_idc` (guint8) –

the level_idc value

`max_mbps` (guint32) –

maximum macroblock processing rate (MB/s)

`max_fs` (guint32) –

maximum frame size (MB)

`max_dpb_mbs` (guint32) –

maximum decoded picture buffer size (MB)

`max_br` (guint32) –

maximum video bit rate (kbps)

`max_cpb` (guint32) –

maximum CPB size (kbits)

`min_cr` (guint32) –

minimum compression ratio

Since : 1.30

## GstPbutils.H264LevelLimits

H.264 level limits from Table A-1 of the specification.

### Members

`name` (String) –

the level name (e.g. "3.1", "4", "4.2")

`level_idc` (Number) –

the level_idc value

`max_mbps` (Number) –

maximum macroblock processing rate (MB/s)

`max_fs` (Number) –

maximum frame size (MB)

`max_dpb_mbs` (Number) –

maximum decoded picture buffer size (MB)

`max_br` (Number) –

maximum video bit rate (kbps)

`max_cpb` (Number) –

maximum CPB size (kbits)

`min_cr` (Number) –

minimum compression ratio

Since : 1.30

## GstPbutils.H264LevelLimits

H.264 level limits from Table A-1 of the specification.

### Members

`name` (str) –

the level name (e.g. "3.1", "4", "4.2")

`level_idc` (int) –

the level_idc value

`max_mbps` (int) –

maximum macroblock processing rate (MB/s)

`max_fs` (int) –

maximum frame size (MB)

`max_dpb_mbs` (int) –

maximum decoded picture buffer size (MB)

`max_br` (int) –

maximum video bit rate (kbps)

`max_cpb` (int) –

maximum CPB size (kbits)

`min_cr` (int) –

minimum compression ratio

Since : 1.30

## Functions

### gst_codec_utils_aac_caps_set_level_and_profile

    gboolean
    gst_codec_utils_aac_caps_set_level_and_profile (GstCaps * caps,
                                                    const guint8 * audio_config,
                                                    guint len)

Sets the level and profile on caps if it can be determined from audio_config. See gst_codec_utils_aac_get_level and gst_codec_utils_aac_get_profile for more details on the parameters. caps must be audio/mpeg caps with an "mpegversion" field of either 2 or 4. If mpegversion is 4, the "base-profile" field is also set in caps.

Parameters:

`caps` –

the GstCaps to which level and profile fields are to be added

`audio_config` ( [array length=len]) –

a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1. (See below for more details)

`len` –

Length of audio_config in bytes

Returns –

TRUE if the level and profile could be set, FALSE otherwise.

### GstPbutils.prototype.codec_utils_aac_caps_set_level_and_profile

    function GstPbutils.prototype.codec_utils_aac_caps_set_level_and_profile(caps: Gst.Caps, audio_config: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_aac_caps_set_level_and_profile'
    }

Sets the level and profile on caps if it can be determined from audio_config. See GstPbutils.prototype.codec_utils_aac_get_level and GstPbutils.prototype.codec_utils_aac_get_profile for more details on the parameters. caps must be audio/mpeg caps with an "mpegversion" field of either 2 or 4. If mpegversion is 4, the "base-profile" field is also set in caps.

Parameters:

`caps` (Gst.Caps) –

the Gst.Caps to which level and profile fields are to be added

`audio_config` ([ Number ]) –

a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1. (See below for more details)

`len` (Number) –

Length of audio_config in bytes

Returns (Number) –

true if the level and profile could be set, false otherwise.

### GstPbutils.codec_utils_aac_caps_set_level_and_profile

    def GstPbutils.codec_utils_aac_caps_set_level_and_profile (caps, audio_config, len):
        #python wrapper for 'gst_codec_utils_aac_caps_set_level_and_profile'

Sets the level and profile on caps if it can be determined from audio_config. See GstPbutils.codec_utils_aac_get_level and GstPbutils.codec_utils_aac_get_profile for more details on the parameters. caps must be audio/mpeg caps with an "mpegversion" field of either 2 or 4. If mpegversion is 4, the "base-profile" field is also set in caps.

Parameters:

`caps` (Gst.Caps) –

the Gst.Caps to which level and profile fields are to be added

`audio_config` ([ int ]) –

a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1. (See below for more details)

`len` (int) –

Length of audio_config in bytes

Returns (bool) –

True if the level and profile could be set, False otherwise.

### gst_codec_utils_aac_get_channels

    guint
    gst_codec_utils_aac_get_channels (const guint8 * audio_config,
                                      guint len)

Returns the channels of the given AAC stream.

Parameters:

`audio_config` ( [array length=len]) –

a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.

`len` –

Length of audio_config in bytes

Returns –

The channels or 0 if the channel could not be determined.

Since : 1.10

### GstPbutils.prototype.codec_utils_aac_get_channels

    function GstPbutils.prototype.codec_utils_aac_get_channels(audio_config: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_aac_get_channels'
    }

Returns the channels of the given AAC stream.

Parameters:

`audio_config` ([ Number ]) –

a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.

`len` (Number) –

Length of audio_config in bytes

Returns (Number) –

The channels or 0 if the channel could not be determined.

Since : 1.10

### GstPbutils.codec_utils_aac_get_channels

    def GstPbutils.codec_utils_aac_get_channels (audio_config, len):
        #python wrapper for 'gst_codec_utils_aac_get_channels'

Returns the channels of the given AAC stream.

Parameters:

`audio_config` ([ int ]) –

a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.

`len` (int) –

Length of audio_config in bytes

Returns (int) –

The channels or 0 if the channel could not be determined.

Since : 1.10

### gst_codec_utils_aac_get_index_from_sample_rate

    gint
    gst_codec_utils_aac_get_index_from_sample_rate (guint rate)

Translates the sample rate to the index corresponding to it in AAC spec.

Parameters:

`rate` –

Sample rate

Returns –

The AAC index for this sample rate, -1 if the rate is not a valid AAC sample rate.

### GstPbutils.prototype.codec_utils_aac_get_index_from_sample_rate

    function GstPbutils.prototype.codec_utils_aac_get_index_from_sample_rate(rate: Number): {
        // javascript wrapper for 'gst_codec_utils_aac_get_index_from_sample_rate'
    }

Translates the sample rate to the index corresponding to it in AAC spec.

Parameters:

`rate` (Number) –

Sample rate

Returns (Number) –

The AAC index for this sample rate, -1 if the rate is not a valid AAC sample rate.

### GstPbutils.codec_utils_aac_get_index_from_sample_rate

    def GstPbutils.codec_utils_aac_get_index_from_sample_rate (rate):
        #python wrapper for 'gst_codec_utils_aac_get_index_from_sample_rate'

Translates the sample rate to the index corresponding to it in AAC spec.

Parameters:

`rate` (int) –

Sample rate

Returns (int) –

The AAC index for this sample rate, -1 if the rate is not a valid AAC sample rate.

### gst_codec_utils_aac_get_level

    const gchar *
    gst_codec_utils_aac_get_level (const guint8 * audio_config,
                                   guint len)

Determines the level of a stream as defined in ISO/IEC 14496-3. For AAC LC streams, the constraints from the AAC audio profile are applied. For AAC Main, LTP, SSR and others, the Main profile is used.

The audio_config parameter follows the following format, starting from the most significant bit of the first byte:

- Bit 0:4 contains the AudioObjectType (if this is 0x5, then the real AudioObjectType is carried after the rate and channel data)
- Bit 5:8 contains the sample frequency index (if this is 0xf, then the next 24 bits define the actual sample frequency, and subsequent fields are appropriately shifted).
- Bit 9:12 contains the channel configuration

Parameters:

`audio_config` ( [array length=len]) –

a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.

`len` –

Length of audio_config in bytes

Returns ( [nullable]) –

The level as a const string and NULL if the level could not be determined.

### GstPbutils.prototype.codec_utils_aac_get_level

    function GstPbutils.prototype.codec_utils_aac_get_level(audio_config: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_aac_get_level'
    }

Determines the level of a stream as defined in ISO/IEC 14496-3. For AAC LC streams, the constraints from the AAC audio profile are applied. For AAC Main, LTP, SSR and others, the Main profile is used.

The audio_config parameter follows the following format, starting from the most significant bit of the first byte:

- Bit 0:4 contains the AudioObjectType (if this is 0x5, then the real AudioObjectType is carried after the rate and channel data)
- Bit 5:8 contains the sample frequency index (if this is 0xf, then the next 24 bits define the actual sample frequency, and subsequent fields are appropriately shifted).
- Bit 9:12 contains the channel configuration

Parameters:

`audio_config` ([ Number ]) –

a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.

`len` (Number) –

Length of audio_config in bytes

Returns (String) –

The level as a const string and null if the level could not be determined.

### GstPbutils.codec_utils_aac_get_level

    def GstPbutils.codec_utils_aac_get_level (audio_config, len):
        #python wrapper for 'gst_codec_utils_aac_get_level'

Determines the level of a stream as defined in ISO/IEC 14496-3. For AAC LC streams, the constraints from the AAC audio profile are applied. For AAC Main, LTP, SSR and others, the Main profile is used.

The audio_config parameter follows the following format, starting from the most significant bit of the first byte:

- Bit 0:4 contains the AudioObjectType (if this is 0x5, then the real AudioObjectType is carried after the rate and channel data)
- Bit 5:8 contains the sample frequency index (if this is 0xf, then the next 24 bits define the actual sample frequency, and subsequent fields are appropriately shifted).
- Bit 9:12 contains the channel configuration

Parameters:

`audio_config` ([ int ]) –

a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.

`len` (int) –

Length of audio_config in bytes

Returns (str) –

The level as a const string and None if the level could not be determined.

### gst_codec_utils_aac_get_profile

    const gchar *
    gst_codec_utils_aac_get_profile (const guint8 * audio_config,
                                     guint len)

Returns the profile of the given AAC stream as a string. The profile is normally determined using the AudioObjectType field which is in the first 5 bits of audio_config

Parameters:

`audio_config` ( [array length=len]) –

a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.

`len` –

Length of audio_config in bytes

Returns ( [nullable]) –

The profile as a const string and NULL if the profile could not be determined.

### GstPbutils.prototype.codec_utils_aac_get_profile

    function GstPbutils.prototype.codec_utils_aac_get_profile(audio_config: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_aac_get_profile'
    }

Returns the profile of the given AAC stream as a string. The profile is normally determined using the AudioObjectType field which is in the first 5 bits of audio_config

Parameters:

`audio_config` ([ Number ]) –

a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.

`len` (Number) –

Length of audio_config in bytes

Returns (String) –

The profile as a const string and null if the profile could not be determined.

### GstPbutils.codec_utils_aac_get_profile

    def GstPbutils.codec_utils_aac_get_profile (audio_config, len):
        #python wrapper for 'gst_codec_utils_aac_get_profile'

Returns the profile of the given AAC stream as a string. The profile is normally determined using the AudioObjectType field which is in the first 5 bits of audio_config

Parameters:

`audio_config` ([ int ]) –

a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.

`len` (int) –

Length of audio_config in bytes

Returns (str) –

The profile as a const string and None if the profile could not be determined.

### gst_codec_utils_aac_get_sample_rate

    guint
    gst_codec_utils_aac_get_sample_rate (const guint8 * audio_config,
                                         guint len)

Translates the sample rate index found in AAC headers to the actual sample rate.

Parameters:

`audio_config` ( [array length=len]) –

a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.

`len` –

Length of audio_config

Returns –

The sample rate if sr_idx is valid, 0 otherwise.

Since : 1.10

### GstPbutils.prototype.codec_utils_aac_get_sample_rate

    function GstPbutils.prototype.codec_utils_aac_get_sample_rate(audio_config: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_aac_get_sample_rate'
    }

Translates the sample rate index found in AAC headers to the actual sample rate.

Parameters:

`audio_config` ([ Number ]) –

a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.

`len` (Number) –

Length of audio_config

Returns (Number) –

The sample rate if sr_idx is valid, 0 otherwise.

Since : 1.10

### GstPbutils.codec_utils_aac_get_sample_rate

    def GstPbutils.codec_utils_aac_get_sample_rate (audio_config, len):
        #python wrapper for 'gst_codec_utils_aac_get_sample_rate'

Translates the sample rate index found in AAC headers to the actual sample rate.

Parameters:

`audio_config` ([ int ]) –

a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.

`len` (int) –

Length of audio_config

Returns (int) –

The sample rate if sr_idx is valid, 0 otherwise.

Since : 1.10

### gst_codec_utils_aac_get_sample_rate_from_index

    guint
    gst_codec_utils_aac_get_sample_rate_from_index (guint sr_idx)

Translates the sample rate index found in AAC headers to the actual sample rate.

Parameters:

`sr_idx` –

Sample rate index as from the AudioSpecificConfig (MPEG-4 container) or ADTS frame header

Returns –

The sample rate if sr_idx is valid, 0 otherwise.

### GstPbutils.prototype.codec_utils_aac_get_sample_rate_from_index

    function GstPbutils.prototype.codec_utils_aac_get_sample_rate_from_index(sr_idx: Number): {
        // javascript wrapper for 'gst_codec_utils_aac_get_sample_rate_from_index'
    }

Translates the sample rate index found in AAC headers to the actual sample rate.

Parameters:

`sr_idx` (Number) –

Sample rate index as from the AudioSpecificConfig (MPEG-4 container) or ADTS frame header

Returns (Number) –

The sample rate if sr_idx is valid, 0 otherwise.

### GstPbutils.codec_utils_aac_get_sample_rate_from_index

    def GstPbutils.codec_utils_aac_get_sample_rate_from_index (sr_idx):
        #python wrapper for 'gst_codec_utils_aac_get_sample_rate_from_index'

Translates the sample rate index found in AAC headers to the actual sample rate.

Parameters:

`sr_idx` (int) –

Sample rate index as from the AudioSpecificConfig (MPEG-4 container) or ADTS frame header

Returns (int) –

The sample rate if sr_idx is valid, 0 otherwise.

### gst_codec_utils_av1_create_av1c_from_caps

    GstBuffer *
    gst_codec_utils_av1_create_av1c_from_caps (GstCaps * caps)

Creates the corresponding AV1 Codec Configuration Record

Parameters:

`caps` –

a video/x-av1 GstCaps

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

The AV1 Codec Configuration Record, or NULL if there was an error.

Since : 1.26

### GstPbutils.prototype.codec_utils_av1_create_av1c_from_caps

    function GstPbutils.prototype.codec_utils_av1_create_av1c_from_caps(caps: Gst.Caps): {
        // javascript wrapper for 'gst_codec_utils_av1_create_av1c_from_caps'
    }

Creates the corresponding AV1 Codec Configuration Record

Parameters:

`caps` (Gst.Caps) –

a video/x-av1 Gst.Caps

Returns (Gst.Buffer) –

The AV1 Codec Configuration Record, or null if there was an error.

Since : 1.26

### GstPbutils.codec_utils_av1_create_av1c_from_caps

    def GstPbutils.codec_utils_av1_create_av1c_from_caps (caps):
        #python wrapper for 'gst_codec_utils_av1_create_av1c_from_caps'

Creates the corresponding AV1 Codec Configuration Record

Parameters:

`caps` (Gst.Caps) –

a video/x-av1 Gst.Caps

Returns (Gst.Buffer) –

The AV1 Codec Configuration Record, or None if there was an error.

Since : 1.26

### gst_codec_utils_av1_create_caps_from_av1c

    GstCaps *
    gst_codec_utils_av1_create_caps_from_av1c (GstBuffer * av1c)

Parses the provided av1c and returns the corresponding caps

Parameters:

`av1c` ( [transfer: none]) –

a GstBuffer containing a AV1CodecConfigurationRecord

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

The parsed AV1 caps, or NULL if there is an error

Since : 1.26

### GstPbutils.prototype.codec_utils_av1_create_caps_from_av1c

    function GstPbutils.prototype.codec_utils_av1_create_caps_from_av1c(av1c: Gst.Buffer): {
        // javascript wrapper for 'gst_codec_utils_av1_create_caps_from_av1c'
    }

Parses the provided av1c and returns the corresponding caps

Parameters:

`av1c` (Gst.Buffer) –

a Gst.Buffer containing a AV1CodecConfigurationRecord

Returns (Gst.Caps) –

The parsed AV1 caps, or null if there is an error

Since : 1.26

### GstPbutils.codec_utils_av1_create_caps_from_av1c

    def GstPbutils.codec_utils_av1_create_caps_from_av1c (av1c):
        #python wrapper for 'gst_codec_utils_av1_create_caps_from_av1c'

Parses the provided av1c and returns the corresponding caps

Parameters:

`av1c` (Gst.Buffer) –

a Gst.Buffer containing a AV1CodecConfigurationRecord

Returns (Gst.Caps) –

The parsed AV1 caps, or None if there is an error

Since : 1.26

### gst_codec_utils_av1_get_level

    const gchar *
    gst_codec_utils_av1_get_level (guint8 seq_level_idx)

Transform a seq_level_idx into the level string

Parameters:

`seq_level_idx` –

A seq_level_idx

Returns ( [nullable]) –

the level string or NULL if the seq_level_idx is unknown

Since : 1.26

### GstPbutils.prototype.codec_utils_av1_get_level

    function GstPbutils.prototype.codec_utils_av1_get_level(seq_level_idx: Number): {
        // javascript wrapper for 'gst_codec_utils_av1_get_level'
    }

Transform a seq_level_idx into the level string

Parameters:

`seq_level_idx` (Number) –

A seq_level_idx

Returns (String) –

the level string or null if the seq_level_idx is unknown

Since : 1.26

### GstPbutils.codec_utils_av1_get_level

    def GstPbutils.codec_utils_av1_get_level (seq_level_idx):
        #python wrapper for 'gst_codec_utils_av1_get_level'

Transform a seq_level_idx into the level string

Parameters:

`seq_level_idx` (int) –

A seq_level_idx

Returns (str) –

the level string or None if the seq_level_idx is unknown

Since : 1.26

### gst_codec_utils_av1_get_seq_level_idx

    guint8
    gst_codec_utils_av1_get_seq_level_idx (const gchar * level)

Transform a level string from the caps into the seq_level_idx

Parameters:

`level` –

A level string from caps

Returns –

the seq_level_idx or 31 (max-level) if the level is unknown

Since : 1.26

### GstPbutils.prototype.codec_utils_av1_get_seq_level_idx

    function GstPbutils.prototype.codec_utils_av1_get_seq_level_idx(level: String): {
        // javascript wrapper for 'gst_codec_utils_av1_get_seq_level_idx'
    }

Transform a level string from the caps into the seq_level_idx

Parameters:

`level` (String) –

A level string from caps

Returns (Number) –

the seq_level_idx or 31 (max-level) if the level is unknown

Since : 1.26

### GstPbutils.codec_utils_av1_get_seq_level_idx

    def GstPbutils.codec_utils_av1_get_seq_level_idx (level):
        #python wrapper for 'gst_codec_utils_av1_get_seq_level_idx'

Transform a level string from the caps into the seq_level_idx

Parameters:

`level` (str) –

A level string from caps

Returns (int) –

the seq_level_idx or 31 (max-level) if the level is unknown

Since : 1.26

### gst_codec_utils_caps_from_mime_codec

    GstCaps *
    gst_codec_utils_caps_from_mime_codec (const gchar * codecs_field)

Converts a RFC 6381 compatible codec string to GstCaps. More than one codec string can be present (separated by `,`).

Registered codecs can be found at http://mp4ra.org/#/codecs

Parameters:

`codecs_field` –

A mime codec string field

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

The corresponding GstCaps or NULL

Since : 1.22

### GstPbutils.prototype.codec_utils_caps_from_mime_codec

    function GstPbutils.prototype.codec_utils_caps_from_mime_codec(codecs_field: String): {
        // javascript wrapper for 'gst_codec_utils_caps_from_mime_codec'
    }

Converts a RFC 6381 compatible codec string to Gst.Caps. More than one codec string can be present (separated by `,`).

Registered codecs can be found at http://mp4ra.org/#/codecs

Parameters:

`codecs_field` (String) –

A mime codec string field

Returns (Gst.Caps) –

The corresponding Gst.Caps or null

Since : 1.22

### GstPbutils.codec_utils_caps_from_mime_codec

    def GstPbutils.codec_utils_caps_from_mime_codec (codecs_field):
        #python wrapper for 'gst_codec_utils_caps_from_mime_codec'

Converts a RFC 6381 compatible codec string to Gst.Caps. More than one codec string can be present (separated by `,`).

Registered codecs can be found at http://mp4ra.org/#/codecs

Parameters:

`codecs_field` (str) –

A mime codec string field

Returns (Gst.Caps) –

The corresponding Gst.Caps or None

Since : 1.22

### gst_codec_utils_caps_get_mime_codec

    gchar *
    gst_codec_utils_caps_get_mime_codec (GstCaps * caps)

Converts caps to a RFC 6381 compatible codec string if possible.

Useful for providing the 'codecs' field inside the 'Content-Type' HTTP header for containerized formats, such as mp4 or matroska.

Registered codecs can be found at http://mp4ra.org/#/codecs

Parameters:

`caps` –

A GstCaps to convert to mime codec

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

a RFC 6381 compatible codec string or NULL

Since : 1.20

### GstPbutils.prototype.codec_utils_caps_get_mime_codec

    function GstPbutils.prototype.codec_utils_caps_get_mime_codec(caps: Gst.Caps): {
        // javascript wrapper for 'gst_codec_utils_caps_get_mime_codec'
    }

Converts caps to a RFC 6381 compatible codec string if possible.

Useful for providing the 'codecs' field inside the 'Content-Type' HTTP header for containerized formats, such as mp4 or matroska.

Registered codecs can be found at http://mp4ra.org/#/codecs

Parameters:

`caps` (Gst.Caps) –

A Gst.Caps to convert to mime codec

Returns (String) –

a RFC 6381 compatible codec string or null

Since : 1.20

### GstPbutils.codec_utils_caps_get_mime_codec

    def GstPbutils.codec_utils_caps_get_mime_codec (caps):
        #python wrapper for 'gst_codec_utils_caps_get_mime_codec'

Converts caps to a RFC 6381 compatible codec string if possible.

Useful for providing the 'codecs' field inside the 'Content-Type' HTTP header for containerized formats, such as mp4 or matroska.

Registered codecs can be found at http://mp4ra.org/#/codecs

Parameters:

`caps` (Gst.Caps) –

A Gst.Caps to convert to mime codec

Returns (str) –

a RFC 6381 compatible codec string or None

Since : 1.20

### gst_codec_utils_h264_caps_set_level_and_profile

    gboolean
    gst_codec_utils_h264_caps_set_level_and_profile (GstCaps * caps,
                                                     const guint8 * sps,
                                                     guint len)

Sets the level and profile in caps if it can be determined from sps. See gst_codec_utils_h264_get_level and gst_codec_utils_h264_get_profile for more details on the parameters.

Parameters:

`caps` –

the GstCaps to which the level and profile are to be added

`sps` ( [array length=len]) –

Pointer to the sequence parameter set for the stream.

`len` –

Length of the data available in sps.

Returns –

TRUE if the level and profile could be set, FALSE otherwise.

### GstPbutils.prototype.codec_utils_h264_caps_set_level_and_profile

    function GstPbutils.prototype.codec_utils_h264_caps_set_level_and_profile(caps: Gst.Caps, sps: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_h264_caps_set_level_and_profile'
    }

Sets the level and profile in caps if it can be determined from sps. See GstPbutils.prototype.codec_utils_h264_get_level and GstPbutils.prototype.codec_utils_h264_get_profile for more details on the parameters.

Parameters:

`caps` (Gst.Caps) –

the Gst.Caps to which the level and profile are to be added

`sps` ([ Number ]) –

Pointer to the sequence parameter set for the stream.

`len` (Number) –

Length of the data available in sps.

Returns (Number) –

true if the level and profile could be set, false otherwise.

### GstPbutils.codec_utils_h264_caps_set_level_and_profile

    def GstPbutils.codec_utils_h264_caps_set_level_and_profile (caps, sps, len):
        #python wrapper for 'gst_codec_utils_h264_caps_set_level_and_profile'

Sets the level and profile in caps if it can be determined from sps. See GstPbutils.codec_utils_h264_get_level and GstPbutils.codec_utils_h264_get_profile for more details on the parameters.

Parameters:

`caps` (Gst.Caps) –

the Gst.Caps to which the level and profile are to be added

`sps` ([ int ]) –

Pointer to the sequence parameter set for the stream.

`len` (int) –

Length of the data available in sps.

Returns (bool) –

True if the level and profile could be set, False otherwise.

### gst_codec_utils_h264_get_level

    const gchar *
    gst_codec_utils_h264_get_level (const guint8 * sps,
                                    guint len)

Converts the level indication (level_idc) in the stream's sequence parameter set into a string. The SPS is expected to have the same format as for gst_codec_utils_h264_get_profile.

Parameters:

`sps` ( [array length=len]) –

Pointer to the sequence parameter set for the stream.

`len` –

Length of the data available in sps.

Returns ( [nullable]) –

The level as a const string, or NULL if there is an error.

### GstPbutils.prototype.codec_utils_h264_get_level

    function GstPbutils.prototype.codec_utils_h264_get_level(sps: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_h264_get_level'
    }

Converts the level indication (level_idc) in the stream's sequence parameter set into a string. The SPS is expected to have the same format as for GstPbutils.prototype.codec_utils_h264_get_profile.

Parameters:

`sps` ([ Number ]) –

Pointer to the sequence parameter set for the stream.

`len` (Number) –

Length of the data available in sps.

Returns (String) –

The level as a const string, or null if there is an error.

### GstPbutils.codec_utils_h264_get_level

    def GstPbutils.codec_utils_h264_get_level (sps, len):
        #python wrapper for 'gst_codec_utils_h264_get_level'

Converts the level indication (level_idc) in the stream's sequence parameter set into a string. The SPS is expected to have the same format as for GstPbutils.codec_utils_h264_get_profile.

Parameters:

`sps` ([ int ]) –

Pointer to the sequence parameter set for the stream.

`len` (int) –

Length of the data available in sps.

Returns (str) –

The level as a const string, or None if there is an error.

### gst_codec_utils_h264_get_level_idc

    guint8
    gst_codec_utils_h264_get_level_idc (const gchar * level)

Transform a level string from the caps into the level_idc

Parameters:

`level` –

A level string from caps

Returns –

the level_idc or 0 if the level is unknown

### GstPbutils.prototype.codec_utils_h264_get_level_idc

    function GstPbutils.prototype.codec_utils_h264_get_level_idc(level: String): {
        // javascript wrapper for 'gst_codec_utils_h264_get_level_idc'
    }

Transform a level string from the caps into the level_idc

Parameters:

`level` (String) –

A level string from caps

Returns (Number) –

the level_idc or 0 if the level is unknown

### GstPbutils.codec_utils_h264_get_level_idc

    def GstPbutils.codec_utils_h264_get_level_idc (level):
        #python wrapper for 'gst_codec_utils_h264_get_level_idc'

Transform a level string from the caps into the level_idc

Parameters:

`level` (str) –

A level string from caps

Returns (int) –

the level_idc or 0 if the level is unknown

### gst_codec_utils_h264_get_level_limits

    const GstH264LevelLimits *
    gst_codec_utils_h264_get_level_limits (gint width,
                                           gint height,
                                           gint fps_n,
                                           gint fps_d,
                                           guint bitrate,
                                           guint max_dec_frame_buffering,
                                           guint8 profile_idc)

Finds the minimum H.264 level that can handle the given video parameters based on the constraints defined in H.264 specification Annex A.

Parameters:

`width` –

the video width in pixels

`height` –

the video height in pixels

`fps_n` –

the video frame rate numerator

`fps_d` –

the video frame rate denominator

`bitrate` –

the video bitrate in bits per second (0 if unknown)

`max_dec_frame_buffering` –

the max size of DPB (0 if unknown)

`profile_idc` –

the H.264 profile idc value (e.g., 66 for Baseline, 77 for Main, 100 for High)

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

the GstH264LevelLimits for the minimum level matching the parameters, or NULL if no suitable level is found.

Since : 1.30

### GstPbutils.prototype.codec_utils_h264_get_level_limits

    function GstPbutils.prototype.codec_utils_h264_get_level_limits(width: Number, height: Number, fps_n: Number, fps_d: Number, bitrate: Number, max_dec_frame_buffering: Number, profile_idc: Number): {
        // javascript wrapper for 'gst_codec_utils_h264_get_level_limits'
    }

Finds the minimum H.264 level that can handle the given video parameters based on the constraints defined in H.264 specification Annex A.

Parameters:

`width` (Number) –

the video width in pixels

`height` (Number) –

the video height in pixels

`fps_n` (Number) –

the video frame rate numerator

`fps_d` (Number) –

the video frame rate denominator

`bitrate` (Number) –

the video bitrate in bits per second (0 if unknown)

`max_dec_frame_buffering` (Number) –

the max size of DPB (0 if unknown)

`profile_idc` (Number) –

the H.264 profile idc value (e.g., 66 for Baseline, 77 for Main, 100 for High)

Returns (GstPbutils.H264LevelLimits) –

the GstPbutils.H264LevelLimits for the minimum level matching the parameters, or null if no suitable level is found.

Since : 1.30

### GstPbutils.codec_utils_h264_get_level_limits

    def GstPbutils.codec_utils_h264_get_level_limits (width, height, fps_n, fps_d, bitrate, max_dec_frame_buffering, profile_idc):
        #python wrapper for 'gst_codec_utils_h264_get_level_limits'

Finds the minimum H.264 level that can handle the given video parameters based on the constraints defined in H.264 specification Annex A.

Parameters:

`width` (int) –

the video width in pixels

`height` (int) –

the video height in pixels

`fps_n` (int) –

the video frame rate numerator

`fps_d` (int) –

the video frame rate denominator

`bitrate` (int) –

the video bitrate in bits per second (0 if unknown)

`max_dec_frame_buffering` (int) –

the max size of DPB (0 if unknown)

`profile_idc` (int) –

the H.264 profile idc value (e.g., 66 for Baseline, 77 for Main, 100 for High)

Returns (GstPbutils.H264LevelLimits) –

the GstPbutils.H264LevelLimits for the minimum level matching the parameters, or None if no suitable level is found.

Since : 1.30

### gst_codec_utils_h264_get_profile

    const gchar *
    gst_codec_utils_h264_get_profile (const guint8 * sps,
                                      guint len)

Converts the profile indication (profile_idc) in the stream's sequence parameter set into a string. The SPS is expected to have the following format, as defined in the H.264 specification. The SPS is viewed as a bitstream here, with bit 0 being the most significant bit of the first byte.

- Bit 0:7 - Profile indication
- Bit 8 - constraint_set0_flag
- Bit 9 - constraint_set1_flag
- Bit 10 - constraint_set2_flag
- Bit 11 - constraint_set3_flag
- Bit 12 - constraint_set3_flag
- Bit 13:15 - Reserved
- Bit 16:24 - Level indication

Parameters:

`sps` ( [array length=len]) –

Pointer to the sequence parameter set for the stream.

`len` –

Length of the data available in sps.

Returns ( [nullable]) –

The profile as a const string, or NULL if there is an error.

### GstPbutils.prototype.codec_utils_h264_get_profile

    function GstPbutils.prototype.codec_utils_h264_get_profile(sps: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_h264_get_profile'
    }

Converts the profile indication (profile_idc) in the stream's sequence parameter set into a string. The SPS is expected to have the following format, as defined in the H.264 specification. The SPS is viewed as a bitstream here, with bit 0 being the most significant bit of the first byte.

- Bit 0:7 - Profile indication
- Bit 8 - constraint_set0_flag
- Bit 9 - constraint_set1_flag
- Bit 10 - constraint_set2_flag
- Bit 11 - constraint_set3_flag
- Bit 12 - constraint_set3_flag
- Bit 13:15 - Reserved
- Bit 16:24 - Level indication

Parameters:

`sps` ([ Number ]) –

Pointer to the sequence parameter set for the stream.

`len` (Number) –

Length of the data available in sps.

Returns (String) –

The profile as a const string, or null if there is an error.

### GstPbutils.codec_utils_h264_get_profile

    def GstPbutils.codec_utils_h264_get_profile (sps, len):
        #python wrapper for 'gst_codec_utils_h264_get_profile'

Converts the profile indication (profile_idc) in the stream's sequence parameter set into a string. The SPS is expected to have the following format, as defined in the H.264 specification. The SPS is viewed as a bitstream here, with bit 0 being the most significant bit of the first byte.

- Bit 0:7 - Profile indication
- Bit 8 - constraint_set0_flag
- Bit 9 - constraint_set1_flag
- Bit 10 - constraint_set2_flag
- Bit 11 - constraint_set3_flag
- Bit 12 - constraint_set3_flag
- Bit 13:15 - Reserved
- Bit 16:24 - Level indication

Parameters:

`sps` ([ int ]) –

Pointer to the sequence parameter set for the stream.

`len` (int) –

Length of the data available in sps.

Returns (str) –

The profile as a const string, or None if there is an error.

### gst_codec_utils_h264_get_profile_flags_level

    gboolean
    gst_codec_utils_h264_get_profile_flags_level (const guint8 * codec_data,
                                                  guint len,
                                                  guint8 * profile,
                                                  guint8 * flags,
                                                  guint8 * level)

Parses profile, flags, and level from a H264 AVCC extradata/sequence_header. These are most commonly retrieved from a video/x-h264 caps with a codec_data buffer.

The format of H264 AVCC extradata/sequence_header is documented in the ITU-T H.264 specification section 7.3.2.1.1 as well as in ISO/IEC 14496-15 section 5.3.3.1.2.

Parameters:

`codec_data` ( [array length=len]) –

H264 AVCC extradata

`len` –

length of codec_data

`profile` ( [optional][out]) –

return location for h264 profile_idc or NULL

`flags` ( [optional][out]) –

return location for h264 constraint set flags or NULL

`level` ( [optional][out]) –

return location h264 level_idc or NULL

Returns –

TRUE on success, FALSE on failure

Since : 1.20

### GstPbutils.prototype.codec_utils_h264_get_profile_flags_level

    function GstPbutils.prototype.codec_utils_h264_get_profile_flags_level(codec_data: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_h264_get_profile_flags_level'
    }

Parses profile, flags, and level from a H264 AVCC extradata/sequence_header. These are most commonly retrieved from a video/x-h264 caps with a codec_data buffer.

The format of H264 AVCC extradata/sequence_header is documented in the ITU-T H.264 specification section 7.3.2.1.1 as well as in ISO/IEC 14496-15 section 5.3.3.1.2.

Parameters:

`codec_data` ([ Number ]) –

H264 AVCC extradata

`len` (Number) –

length of codec_data

Returns a tuple made of:

(Number ) –

true on success, false on failure

`profile` (Number ) –

true on success, false on failure

`flags` (Number ) –

true on success, false on failure

`level` (Number ) –

true on success, false on failure

Since : 1.20

### GstPbutils.codec_utils_h264_get_profile_flags_level

    def GstPbutils.codec_utils_h264_get_profile_flags_level (codec_data, len):
        #python wrapper for 'gst_codec_utils_h264_get_profile_flags_level'

Parses profile, flags, and level from a H264 AVCC extradata/sequence_header. These are most commonly retrieved from a video/x-h264 caps with a codec_data buffer.

The format of H264 AVCC extradata/sequence_header is documented in the ITU-T H.264 specification section 7.3.2.1.1 as well as in ISO/IEC 14496-15 section 5.3.3.1.2.

Parameters:

`codec_data` ([ int ]) –

H264 AVCC extradata

`len` (int) –

length of codec_data

Returns a tuple made of:

(bool ) –

True on success, False on failure

`profile` (int ) –

True on success, False on failure

`flags` (int ) –

True on success, False on failure

`level` (int ) –

True on success, False on failure

Since : 1.20

### gst_codec_utils_h265_caps_set_level_tier_and_profile

    gboolean
    gst_codec_utils_h265_caps_set_level_tier_and_profile (GstCaps * caps,
                                                          const guint8 * profile_tier_level,
                                                          guint len)

Sets the level, tier and profile in caps if it can be determined from profile_tier_level. See gst_codec_utils_h265_get_level, gst_codec_utils_h265_get_tier and gst_codec_utils_h265_get_profile for more details on the parameters.

Parameters:

`caps` –

the GstCaps to which the level, tier and profile are to be added

`profile_tier_level` ( [array length=len]) –

Pointer to the profile_tier_level struct

`len` –

Length of the data available in profile_tier_level.

Returns –

TRUE if the level, tier, profile could be set, FALSE otherwise.

Since : 1.4

### GstPbutils.prototype.codec_utils_h265_caps_set_level_tier_and_profile

    function GstPbutils.prototype.codec_utils_h265_caps_set_level_tier_and_profile(caps: Gst.Caps, profile_tier_level: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_h265_caps_set_level_tier_and_profile'
    }

Sets the level, tier and profile in caps if it can be determined from profile_tier_level. See GstPbutils.prototype.codec_utils_h265_get_level, GstPbutils.prototype.codec_utils_h265_get_tier and GstPbutils.prototype.codec_utils_h265_get_profile for more details on the parameters.

Parameters:

`caps` (Gst.Caps) –

the Gst.Caps to which the level, tier and profile are to be added

`profile_tier_level` ([ Number ]) –

Pointer to the profile_tier_level struct

`len` (Number) –

Length of the data available in profile_tier_level.

Returns (Number) –

true if the level, tier, profile could be set, false otherwise.

Since : 1.4

### GstPbutils.codec_utils_h265_caps_set_level_tier_and_profile

    def GstPbutils.codec_utils_h265_caps_set_level_tier_and_profile (caps, profile_tier_level, len):
        #python wrapper for 'gst_codec_utils_h265_caps_set_level_tier_and_profile'

Sets the level, tier and profile in caps if it can be determined from profile_tier_level. See GstPbutils.codec_utils_h265_get_level, GstPbutils.codec_utils_h265_get_tier and GstPbutils.codec_utils_h265_get_profile for more details on the parameters.

Parameters:

`caps` (Gst.Caps) –

the Gst.Caps to which the level, tier and profile are to be added

`profile_tier_level` ([ int ]) –

Pointer to the profile_tier_level struct

`len` (int) –

Length of the data available in profile_tier_level.

Returns (bool) –

True if the level, tier, profile could be set, False otherwise.

Since : 1.4

### gst_codec_utils_h265_get_level

    const gchar *
    gst_codec_utils_h265_get_level (const guint8 * profile_tier_level,
                                    guint len)

Converts the level indication (general_level_idc) in the stream's profile_tier_level structure into a string. The profiel_tier_level is expected to have the same format as for gst_codec_utils_h264_get_profile.

Parameters:

`profile_tier_level` ( [array length=len]) –

Pointer to the profile_tier_level for the stream

`len` –

Length of the data available in profile_tier_level.

Returns ( [nullable]) –

The level as a const string, or NULL if there is an error.

Since : 1.4

### GstPbutils.prototype.codec_utils_h265_get_level

    function GstPbutils.prototype.codec_utils_h265_get_level(profile_tier_level: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_h265_get_level'
    }

Converts the level indication (general_level_idc) in the stream's profile_tier_level structure into a string. The profiel_tier_level is expected to have the same format as for GstPbutils.prototype.codec_utils_h264_get_profile.

Parameters:

`profile_tier_level` ([ Number ]) –

Pointer to the profile_tier_level for the stream

`len` (Number) –

Length of the data available in profile_tier_level.

Returns (String) –

The level as a const string, or null if there is an error.

Since : 1.4

### GstPbutils.codec_utils_h265_get_level

    def GstPbutils.codec_utils_h265_get_level (profile_tier_level, len):
        #python wrapper for 'gst_codec_utils_h265_get_level'

Converts the level indication (general_level_idc) in the stream's profile_tier_level structure into a string. The profiel_tier_level is expected to have the same format as for GstPbutils.codec_utils_h264_get_profile.

Parameters:

`profile_tier_level` ([ int ]) –

Pointer to the profile_tier_level for the stream

`len` (int) –

Length of the data available in profile_tier_level.

Returns (str) –

The level as a const string, or None if there is an error.

Since : 1.4

### gst_codec_utils_h265_get_level_idc

    guint8
    gst_codec_utils_h265_get_level_idc (const gchar * level)

Transform a level string from the caps into the level_idc

Parameters:

`level` –

A level string from caps

Returns –

the level_idc or 0 if the level is unknown

Since : 1.4

### GstPbutils.prototype.codec_utils_h265_get_level_idc

    function GstPbutils.prototype.codec_utils_h265_get_level_idc(level: String): {
        // javascript wrapper for 'gst_codec_utils_h265_get_level_idc'
    }

Transform a level string from the caps into the level_idc

Parameters:

`level` (String) –

A level string from caps

Returns (Number) –

the level_idc or 0 if the level is unknown

Since : 1.4

### GstPbutils.codec_utils_h265_get_level_idc

    def GstPbutils.codec_utils_h265_get_level_idc (level):
        #python wrapper for 'gst_codec_utils_h265_get_level_idc'

Transform a level string from the caps into the level_idc

Parameters:

`level` (str) –

A level string from caps

Returns (int) –

the level_idc or 0 if the level is unknown

Since : 1.4

### gst_codec_utils_h265_get_profile

    const gchar *
    gst_codec_utils_h265_get_profile (const guint8 * profile_tier_level,
                                      guint len)

Converts the profile indication (general_profile_idc) in the stream's profile_level_tier structure into a string. The profile_tier_level is expected to have the following format, as defined in the H.265 specification. The profile_tier_level is viewed as a bitstream here, with bit 0 being the most significant bit of the first byte.

- Bit 0:1 - general_profile_space
- Bit 2 - general_tier_flag
- Bit 3:7 - general_profile_idc
- Bit 8:39 - gernal_profile_compatibility_flags
- Bit 40 - general_progressive_source_flag
- Bit 41 - general_interlaced_source_flag
- Bit 42 - general_non_packed_constraint_flag
- Bit 43 - general_frame_only_constraint_flag
- Bit 44:87 - See below
- Bit 88:95 - general_level_idc

Parameters:

`profile_tier_level` ( [array length=len]) –

Pointer to the profile_tier_level structure for the stream.

`len` –

Length of the data available in profile_tier_level

Returns ( [nullable]) –

The profile as a const string, or NULL if there is an error.

Since : 1.4

### GstPbutils.prototype.codec_utils_h265_get_profile

    function GstPbutils.prototype.codec_utils_h265_get_profile(profile_tier_level: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_h265_get_profile'
    }

Converts the profile indication (general_profile_idc) in the stream's profile_level_tier structure into a string. The profile_tier_level is expected to have the following format, as defined in the H.265 specification. The profile_tier_level is viewed as a bitstream here, with bit 0 being the most significant bit of the first byte.

- Bit 0:1 - general_profile_space
- Bit 2 - general_tier_flag
- Bit 3:7 - general_profile_idc
- Bit 8:39 - gernal_profile_compatibility_flags
- Bit 40 - general_progressive_source_flag
- Bit 41 - general_interlaced_source_flag
- Bit 42 - general_non_packed_constraint_flag
- Bit 43 - general_frame_only_constraint_flag
- Bit 44:87 - See below
- Bit 88:95 - general_level_idc

Parameters:

`profile_tier_level` ([ Number ]) –

Pointer to the profile_tier_level structure for the stream.

`len` (Number) –

Length of the data available in profile_tier_level

Returns (String) –

The profile as a const string, or null if there is an error.

Since : 1.4

### GstPbutils.codec_utils_h265_get_profile

    def GstPbutils.codec_utils_h265_get_profile (profile_tier_level, len):
        #python wrapper for 'gst_codec_utils_h265_get_profile'

Converts the profile indication (general_profile_idc) in the stream's profile_level_tier structure into a string. The profile_tier_level is expected to have the following format, as defined in the H.265 specification. The profile_tier_level is viewed as a bitstream here, with bit 0 being the most significant bit of the first byte.

- Bit 0:1 - general_profile_space
- Bit 2 - general_tier_flag
- Bit 3:7 - general_profile_idc
- Bit 8:39 - gernal_profile_compatibility_flags
- Bit 40 - general_progressive_source_flag
- Bit 41 - general_interlaced_source_flag
- Bit 42 - general_non_packed_constraint_flag
- Bit 43 - general_frame_only_constraint_flag
- Bit 44:87 - See below
- Bit 88:95 - general_level_idc

Parameters:

`profile_tier_level` ([ int ]) –

Pointer to the profile_tier_level structure for the stream.

`len` (int) –

Length of the data available in profile_tier_level

Returns (str) –

The profile as a const string, or None if there is an error.

Since : 1.4

### gst_codec_utils_h265_get_tier

    const gchar *
    gst_codec_utils_h265_get_tier (const guint8 * profile_tier_level,
                                   guint len)

Converts the tier indication (general_tier_flag) in the stream's profile_tier_level structure into a string. The profile_tier_level is expected to have the same format as for gst_codec_utils_h264_get_profile.

Parameters:

`profile_tier_level` ( [array length=len]) –

Pointer to the profile_tier_level for the stream.

`len` –

Length of the data available in profile_tier_level.

Returns ( [nullable]) –

The tier as a const string, or NULL if there is an error.

Since : 1.4

### GstPbutils.prototype.codec_utils_h265_get_tier

    function GstPbutils.prototype.codec_utils_h265_get_tier(profile_tier_level: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_h265_get_tier'
    }

Converts the tier indication (general_tier_flag) in the stream's profile_tier_level structure into a string. The profile_tier_level is expected to have the same format as for GstPbutils.prototype.codec_utils_h264_get_profile.

Parameters:

`profile_tier_level` ([ Number ]) –

Pointer to the profile_tier_level for the stream.

`len` (Number) –

Length of the data available in profile_tier_level.

Returns (String) –

The tier as a const string, or null if there is an error.

Since : 1.4

### GstPbutils.codec_utils_h265_get_tier

    def GstPbutils.codec_utils_h265_get_tier (profile_tier_level, len):
        #python wrapper for 'gst_codec_utils_h265_get_tier'

Converts the tier indication (general_tier_flag) in the stream's profile_tier_level structure into a string. The profile_tier_level is expected to have the same format as for GstPbutils.codec_utils_h264_get_profile.

Parameters:

`profile_tier_level` ([ int ]) –

Pointer to the profile_tier_level for the stream.

`len` (int) –

Length of the data available in profile_tier_level.

Returns (str) –

The tier as a const string, or None if there is an error.

Since : 1.4

### gst_codec_utils_h266_caps_set_level_tier_and_profile

    gboolean
    gst_codec_utils_h266_caps_set_level_tier_and_profile (GstCaps * caps,
                                                          const guint8 * decoder_configuration,
                                                          guint len)

Sets the level, tier and profile in caps if it can be determined from decoder_configuration. See gst_codec_utils_h266_get_level, gst_codec_utils_h266_get_tier and gst_codec_utils_h266_get_profile for more details on the parameters.

Parameters:

`caps` –

the GstCaps to which the level, tier and profile are to be added

`decoder_configuration` ( [array length=len]) –

Pointer to the VvcDecoderConfigurationRecord struct as defined in ISO/IEC 14496-15

`len` –

Length of the data available in decoder_configuration.

Returns –

TRUE if the level, tier, profile could be set, FALSE otherwise.

Since : 1.26

### GstPbutils.prototype.codec_utils_h266_caps_set_level_tier_and_profile

    function GstPbutils.prototype.codec_utils_h266_caps_set_level_tier_and_profile(caps: Gst.Caps, decoder_configuration: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_h266_caps_set_level_tier_and_profile'
    }

Sets the level, tier and profile in caps if it can be determined from decoder_configuration. See GstPbutils.prototype.codec_utils_h266_get_level, GstPbutils.prototype.codec_utils_h266_get_tier and GstPbutils.prototype.codec_utils_h266_get_profile for more details on the parameters.

Parameters:

`caps` (Gst.Caps) –

the Gst.Caps to which the level, tier and profile are to be added

`decoder_configuration` ([ Number ]) –

Pointer to the VvcDecoderConfigurationRecord struct as defined in ISO/IEC 14496-15

`len` (Number) –

Length of the data available in decoder_configuration.

Returns (Number) –

true if the level, tier, profile could be set, false otherwise.

Since : 1.26

### GstPbutils.codec_utils_h266_caps_set_level_tier_and_profile

    def GstPbutils.codec_utils_h266_caps_set_level_tier_and_profile (caps, decoder_configuration, len):
        #python wrapper for 'gst_codec_utils_h266_caps_set_level_tier_and_profile'

Sets the level, tier and profile in caps if it can be determined from decoder_configuration. See GstPbutils.codec_utils_h266_get_level, GstPbutils.codec_utils_h266_get_tier and GstPbutils.codec_utils_h266_get_profile for more details on the parameters.

Parameters:

`caps` (Gst.Caps) –

the Gst.Caps to which the level, tier and profile are to be added

`decoder_configuration` ([ int ]) –

Pointer to the VvcDecoderConfigurationRecord struct as defined in ISO/IEC 14496-15

`len` (int) –

Length of the data available in decoder_configuration.

Returns (bool) –

True if the level, tier, profile could be set, False otherwise.

Since : 1.26

### gst_codec_utils_h266_get_level

    const gchar *
    gst_codec_utils_h266_get_level (const guint8 * ptl_record,
                                    guint len)

Converts the level indication (general_level_idc) in the stream's ptl_record structure into a string.

Parameters:

`ptl_record` ( [array length=len]) –

Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15.

`len` –

Length of the data available in ptl_record.

Returns ( [nullable]) –

The level as a const string, or NULL if there is an error.

Since : 1.26

### GstPbutils.prototype.codec_utils_h266_get_level

    function GstPbutils.prototype.codec_utils_h266_get_level(ptl_record: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_h266_get_level'
    }

Converts the level indication (general_level_idc) in the stream's ptl_record structure into a string.

Parameters:

`ptl_record` ([ Number ]) –

Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15.

`len` (Number) –

Length of the data available in ptl_record.

Returns (String) –

The level as a const string, or null if there is an error.

Since : 1.26

### GstPbutils.codec_utils_h266_get_level

    def GstPbutils.codec_utils_h266_get_level (ptl_record, len):
        #python wrapper for 'gst_codec_utils_h266_get_level'

Converts the level indication (general_level_idc) in the stream's ptl_record structure into a string.

Parameters:

`ptl_record` ([ int ]) –

Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15.

`len` (int) –

Length of the data available in ptl_record.

Returns (str) –

The level as a const string, or None if there is an error.

Since : 1.26

### gst_codec_utils_h266_get_level_idc

    guint8
    gst_codec_utils_h266_get_level_idc (const gchar * level)

Transform a level string from the caps into the level_idc

Parameters:

`level` –

A level string from caps

Returns –

the level_idc or 0 if the level is unknown

Since : 1.26

### GstPbutils.prototype.codec_utils_h266_get_level_idc

    function GstPbutils.prototype.codec_utils_h266_get_level_idc(level: String): {
        // javascript wrapper for 'gst_codec_utils_h266_get_level_idc'
    }

Transform a level string from the caps into the level_idc

Parameters:

`level` (String) –

A level string from caps

Returns (Number) –

the level_idc or 0 if the level is unknown

Since : 1.26

### GstPbutils.codec_utils_h266_get_level_idc

    def GstPbutils.codec_utils_h266_get_level_idc (level):
        #python wrapper for 'gst_codec_utils_h266_get_level_idc'

Transform a level string from the caps into the level_idc

Parameters:

`level` (str) –

A level string from caps

Returns (int) –

the level_idc or 0 if the level is unknown

Since : 1.26

### gst_codec_utils_h266_get_profile

    const gchar *
    gst_codec_utils_h266_get_profile (const guint8 * ptl_record,
                                      guint len)

Converts the profile indication (general_profile_idc) in the stream's ptl_record structure into a string.

Parameters:

`ptl_record` ( [array length=len]) –

Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15.

`len` –

Length of the data available in ptl_record

Returns ( [nullable]) –

The profile as a const string, or NULL if there is an error.

Since : 1.26

### GstPbutils.prototype.codec_utils_h266_get_profile

    function GstPbutils.prototype.codec_utils_h266_get_profile(ptl_record: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_h266_get_profile'
    }

Converts the profile indication (general_profile_idc) in the stream's ptl_record structure into a string.

Parameters:

`ptl_record` ([ Number ]) –

Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15.

`len` (Number) –

Length of the data available in ptl_record

Returns (String) –

The profile as a const string, or null if there is an error.

Since : 1.26

### GstPbutils.codec_utils_h266_get_profile

    def GstPbutils.codec_utils_h266_get_profile (ptl_record, len):
        #python wrapper for 'gst_codec_utils_h266_get_profile'

Converts the profile indication (general_profile_idc) in the stream's ptl_record structure into a string.

Parameters:

`ptl_record` ([ int ]) –

Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15.

`len` (int) –

Length of the data available in ptl_record

Returns (str) –

The profile as a const string, or None if there is an error.

Since : 1.26

### gst_codec_utils_h266_get_tier

    const gchar *
    gst_codec_utils_h266_get_tier (const guint8 * ptl_record,
                                   guint len)

Converts the tier indication (general_tier_flag) in the stream's ptl_record structure into a string.

Parameters:

`ptl_record` ( [array length=len]) –

Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15.

`len` –

Length of the data available in ptl_record.

Returns ( [nullable]) –

The tier as a const string, or NULL if there is an error.

Since : 1.26

### GstPbutils.prototype.codec_utils_h266_get_tier

    function GstPbutils.prototype.codec_utils_h266_get_tier(ptl_record: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_h266_get_tier'
    }

Converts the tier indication (general_tier_flag) in the stream's ptl_record structure into a string.

Parameters:

`ptl_record` ([ Number ]) –

Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15.

`len` (Number) –

Length of the data available in ptl_record.

Returns (String) –

The tier as a const string, or null if there is an error.

Since : 1.26

### GstPbutils.codec_utils_h266_get_tier

    def GstPbutils.codec_utils_h266_get_tier (ptl_record, len):
        #python wrapper for 'gst_codec_utils_h266_get_tier'

Converts the tier indication (general_tier_flag) in the stream's ptl_record structure into a string.

Parameters:

`ptl_record` ([ int ]) –

Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15.

`len` (int) –

Length of the data available in ptl_record.

Returns (str) –

The tier as a const string, or None if there is an error.

Since : 1.26

### gst_codec_utils_mpeg4video_caps_set_level_and_profile

    gboolean
    gst_codec_utils_mpeg4video_caps_set_level_and_profile (GstCaps * caps,
                                                           const guint8 * vis_obj_seq,
                                                           guint len)

Sets the level and profile in caps if it can be determined from vis_obj_seq. See gst_codec_utils_mpeg4video_get_level and gst_codec_utils_mpeg4video_get_profile for more details on the parameters.

Parameters:

`caps` –

the GstCaps to which the level and profile are to be added

`vis_obj_seq` ( [array length=len]) –

Pointer to the visual object sequence for the stream.

`len` –

Length of the data available in sps.

Returns –

TRUE if the level and profile could be set, FALSE otherwise.

### GstPbutils.prototype.codec_utils_mpeg4video_caps_set_level_and_profile

    function GstPbutils.prototype.codec_utils_mpeg4video_caps_set_level_and_profile(caps: Gst.Caps, vis_obj_seq: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_mpeg4video_caps_set_level_and_profile'
    }

Sets the level and profile in caps if it can be determined from vis_obj_seq. See GstPbutils.prototype.codec_utils_mpeg4video_get_level and GstPbutils.prototype.codec_utils_mpeg4video_get_profile for more details on the parameters.

Parameters:

`caps` (Gst.Caps) –

the Gst.Caps to which the level and profile are to be added

`vis_obj_seq` ([ Number ]) –

Pointer to the visual object sequence for the stream.

`len` (Number) –

Length of the data available in sps.

Returns (Number) –

true if the level and profile could be set, false otherwise.

### GstPbutils.codec_utils_mpeg4video_caps_set_level_and_profile

    def GstPbutils.codec_utils_mpeg4video_caps_set_level_and_profile (caps, vis_obj_seq, len):
        #python wrapper for 'gst_codec_utils_mpeg4video_caps_set_level_and_profile'

Sets the level and profile in caps if it can be determined from vis_obj_seq. See GstPbutils.codec_utils_mpeg4video_get_level and GstPbutils.codec_utils_mpeg4video_get_profile for more details on the parameters.

Parameters:

`caps` (Gst.Caps) –

the Gst.Caps to which the level and profile are to be added

`vis_obj_seq` ([ int ]) –

Pointer to the visual object sequence for the stream.

`len` (int) –

Length of the data available in sps.

Returns (bool) –

True if the level and profile could be set, False otherwise.

### gst_codec_utils_mpeg4video_get_level

    const gchar *
    gst_codec_utils_mpeg4video_get_level (const guint8 * vis_obj_seq,
                                          guint len)

Converts the level indication in the stream's visual object sequence into a string. vis_obj_seq is expected to be the data following the visual object sequence start code. Only the first byte (profile_and_level_indication) is used.

Parameters:

`vis_obj_seq` ( [array length=len]) –

Pointer to the visual object sequence for the stream.

`len` –

Length of the data available in sps.

Returns ( [nullable]) –

The level as a const string, or NULL if there is an error.

### GstPbutils.prototype.codec_utils_mpeg4video_get_level

    function GstPbutils.prototype.codec_utils_mpeg4video_get_level(vis_obj_seq: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_mpeg4video_get_level'
    }

Converts the level indication in the stream's visual object sequence into a string. vis_obj_seq is expected to be the data following the visual object sequence start code. Only the first byte (profile_and_level_indication) is used.

Parameters:

`vis_obj_seq` ([ Number ]) –

Pointer to the visual object sequence for the stream.

`len` (Number) –

Length of the data available in sps.

Returns (String) –

The level as a const string, or NULL if there is an error.

### GstPbutils.codec_utils_mpeg4video_get_level

    def GstPbutils.codec_utils_mpeg4video_get_level (vis_obj_seq, len):
        #python wrapper for 'gst_codec_utils_mpeg4video_get_level'

Converts the level indication in the stream's visual object sequence into a string. vis_obj_seq is expected to be the data following the visual object sequence start code. Only the first byte (profile_and_level_indication) is used.

Parameters:

`vis_obj_seq` ([ int ]) –

Pointer to the visual object sequence for the stream.

`len` (int) –

Length of the data available in sps.

Returns (str) –

The level as a const string, or NULL if there is an error.

### gst_codec_utils_mpeg4video_get_profile

    const gchar *
    gst_codec_utils_mpeg4video_get_profile (const guint8 * vis_obj_seq,
                                            guint len)

Converts the profile indication in the stream's visual object sequence into a string. vis_obj_seq is expected to be the data following the visual object sequence start code. Only the first byte (profile_and_level_indication) is used.

Parameters:

`vis_obj_seq` ( [array length=len]) –

Pointer to the visual object sequence for the stream.

`len` –

Length of the data available in sps.

Returns ( [nullable]) –

The profile as a const string, or NULL if there is an error.

### GstPbutils.prototype.codec_utils_mpeg4video_get_profile

    function GstPbutils.prototype.codec_utils_mpeg4video_get_profile(vis_obj_seq: [ Number ], len: Number): {
        // javascript wrapper for 'gst_codec_utils_mpeg4video_get_profile'
    }

Converts the profile indication in the stream's visual object sequence into a string. vis_obj_seq is expected to be the data following the visual object sequence start code. Only the first byte (profile_and_level_indication) is used.

Parameters:

`vis_obj_seq` ([ Number ]) –

Pointer to the visual object sequence for the stream.

`len` (Number) –

Length of the data available in sps.

Returns (String) –

The profile as a const string, or NULL if there is an error.

### GstPbutils.codec_utils_mpeg4video_get_profile

    def GstPbutils.codec_utils_mpeg4video_get_profile (vis_obj_seq, len):
        #python wrapper for 'gst_codec_utils_mpeg4video_get_profile'

Converts the profile indication in the stream's visual object sequence into a string. vis_obj_seq is expected to be the data following the visual object sequence start code. Only the first byte (profile_and_level_indication) is used.

Parameters:

`vis_obj_seq` ([ int ]) –

Pointer to the visual object sequence for the stream.

`len` (int) –

Length of the data available in sps.

Returns (str) –

The profile as a const string, or NULL if there is an error.

### gst_codec_utils_opus_create_caps

    GstCaps *
    gst_codec_utils_opus_create_caps (guint32 rate,
                                      guint8 channels,
                                      guint8 channel_mapping_family,
                                      guint8 stream_count,
                                      guint8 coupled_count,
                                      const guint8 * channel_mapping)

Creates Opus caps from the given parameters.

Parameters:

`rate` –

the sample rate

`channels` –

the number of channels

`channel_mapping_family` –

the channel mapping family

`stream_count` –

the number of independent streams

`coupled_count` –

the number of stereo streams

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

the mapping between the streams

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

The GstCaps, or NULL if the parameters would lead to invalid Opus caps.

Since : 1.8

### GstPbutils.prototype.codec_utils_opus_create_caps

    function GstPbutils.prototype.codec_utils_opus_create_caps(rate: Number, channels: Number, channel_mapping_family: Number, stream_count: Number, coupled_count: Number, channel_mapping: [ Number ]): {
        // javascript wrapper for 'gst_codec_utils_opus_create_caps'
    }

Creates Opus caps from the given parameters.

Parameters:

`rate` (Number) –

the sample rate

`channels` (Number) –

the number of channels

`channel_mapping_family` (Number) –

the channel mapping family

`stream_count` (Number) –

the number of independent streams

`coupled_count` (Number) –

the number of stereo streams

`channel_mapping` ([ Number ]) –

the mapping between the streams

Returns (Gst.Caps) –

The Gst.Caps, or null if the parameters would lead to invalid Opus caps.

Since : 1.8

### GstPbutils.codec_utils_opus_create_caps

    def GstPbutils.codec_utils_opus_create_caps (rate, channels, channel_mapping_family, stream_count, coupled_count, channel_mapping):
        #python wrapper for 'gst_codec_utils_opus_create_caps'

Creates Opus caps from the given parameters.

Parameters:

`rate` (int) –

the sample rate

`channels` (int) –

the number of channels

`channel_mapping_family` (int) –

the channel mapping family

`stream_count` (int) –

the number of independent streams

`coupled_count` (int) –

the number of stereo streams

`channel_mapping` ([ int ]) –

the mapping between the streams

Returns (Gst.Caps) –

The Gst.Caps, or None if the parameters would lead to invalid Opus caps.

Since : 1.8

### gst_codec_utils_opus_create_caps_from_header

    GstCaps *
    gst_codec_utils_opus_create_caps_from_header (GstBuffer * header,
                                                  GstBuffer * comments)

Creates Opus caps from the given OpusHead header and comment header comments.

Parameters:

`header` –

OpusHead header

`comments` ( [nullable]) –

Comment header or NULL

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

The GstCaps.

Since : 1.8

### GstPbutils.prototype.codec_utils_opus_create_caps_from_header

    function GstPbutils.prototype.codec_utils_opus_create_caps_from_header(header: Gst.Buffer, comments: Gst.Buffer): {
        // javascript wrapper for 'gst_codec_utils_opus_create_caps_from_header'
    }

Creates Opus caps from the given OpusHead header and comment header comments.

Parameters:

`header` (Gst.Buffer) –

OpusHead header

`comments` (Gst.Buffer) –

Comment header or NULL

Returns (Gst.Caps) –

The Gst.Caps.

Since : 1.8

### GstPbutils.codec_utils_opus_create_caps_from_header

    def GstPbutils.codec_utils_opus_create_caps_from_header (header, comments):
        #python wrapper for 'gst_codec_utils_opus_create_caps_from_header'

Creates Opus caps from the given OpusHead header and comment header comments.

Parameters:

`header` (Gst.Buffer) –

OpusHead header

`comments` (Gst.Buffer) –

Comment header or NULL

Returns (Gst.Caps) –

The Gst.Caps.

Since : 1.8

### gst_codec_utils_opus_create_header

    GstBuffer *
    gst_codec_utils_opus_create_header (guint32 rate,
                                        guint8 channels,
                                        guint8 channel_mapping_family,
                                        guint8 stream_count,
                                        guint8 coupled_count,
                                        const guint8 * channel_mapping,
                                        guint16 pre_skip,
                                        gint16 output_gain)

Creates OpusHead header from the given parameters.

Parameters:

`rate` –

the sample rate

`channels` –

the number of channels

`channel_mapping_family` –

the channel mapping family

`stream_count` –

the number of independent streams

`coupled_count` –

the number of stereo streams

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

the mapping between the streams

`pre_skip` –

Pre-skip in 48kHz samples or 0

`output_gain` –

Output gain or 0

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

The GstBuffer containing the OpusHead.

Since : 1.8

### GstPbutils.prototype.codec_utils_opus_create_header

    function GstPbutils.prototype.codec_utils_opus_create_header(rate: Number, channels: Number, channel_mapping_family: Number, stream_count: Number, coupled_count: Number, channel_mapping: [ Number ], pre_skip: Number, output_gain: Number): {
        // javascript wrapper for 'gst_codec_utils_opus_create_header'
    }

Creates OpusHead header from the given parameters.

Parameters:

`rate` (Number) –

the sample rate

`channels` (Number) –

the number of channels

`channel_mapping_family` (Number) –

the channel mapping family

`stream_count` (Number) –

the number of independent streams

`coupled_count` (Number) –

the number of stereo streams

`channel_mapping` ([ Number ]) –

the mapping between the streams

`pre_skip` (Number) –

Pre-skip in 48kHz samples or 0

`output_gain` (Number) –

Output gain or 0

Returns (Gst.Buffer) –

The Gst.Buffer containing the OpusHead.

Since : 1.8

### GstPbutils.codec_utils_opus_create_header

    def GstPbutils.codec_utils_opus_create_header (rate, channels, channel_mapping_family, stream_count, coupled_count, channel_mapping, pre_skip, output_gain):
        #python wrapper for 'gst_codec_utils_opus_create_header'

Creates OpusHead header from the given parameters.

Parameters:

`rate` (int) –

the sample rate

`channels` (int) –

the number of channels

`channel_mapping_family` (int) –

the channel mapping family

`stream_count` (int) –

the number of independent streams

`coupled_count` (int) –

the number of stereo streams

`channel_mapping` ([ int ]) –

the mapping between the streams

`pre_skip` (int) –

Pre-skip in 48kHz samples or 0

`output_gain` (int) –

Output gain or 0

Returns (Gst.Buffer) –

The Gst.Buffer containing the OpusHead.

Since : 1.8

### gst_codec_utils_opus_parse_caps

    gboolean
    gst_codec_utils_opus_parse_caps (GstCaps * caps,
                                     guint32 * rate,
                                     guint8 * channels,
                                     guint8 * channel_mapping_family,
                                     guint8 * stream_count,
                                     guint8 * coupled_count,
                                     guint8 * channel_mapping)

Parses Opus caps and fills the different fields with defaults if possible.

Parameters:

`caps` –

the GstCaps to parse the data from

`rate` ( [optional][out]) –

the sample rate

`channels` ( [optional][out]) –

the number of channels

`channel_mapping_family` ( [optional][out]) –

the channel mapping family

`stream_count` ( [optional][out]) –

the number of independent streams

`coupled_count` ( [optional][out]) –

the number of stereo streams

`channel_mapping` ( [optional][out][array fixed-size=256]) –

the mapping between the streams

Returns –

TRUE if parsing was successful, FALSE otherwise.

Since : 1.8

### GstPbutils.prototype.codec_utils_opus_parse_caps

    function GstPbutils.prototype.codec_utils_opus_parse_caps(caps: Gst.Caps): {
        // javascript wrapper for 'gst_codec_utils_opus_parse_caps'
    }

Parses Opus caps and fills the different fields with defaults if possible.

Parameters:

`caps` (Gst.Caps) –

the Gst.Caps to parse the data from

Returns a tuple made of:

(Number ) –

true if parsing was successful, false otherwise.

`rate` (Number ) –

true if parsing was successful, false otherwise.

`channels` (Number ) –

true if parsing was successful, false otherwise.

`channel_mapping_family` (Number ) –

true if parsing was successful, false otherwise.

`stream_count` (Number ) –

true if parsing was successful, false otherwise.

`coupled_count` (Number ) –

true if parsing was successful, false otherwise.

`channel_mapping` ([ Number ] ) –

true if parsing was successful, false otherwise.

Since : 1.8

### GstPbutils.codec_utils_opus_parse_caps

    def GstPbutils.codec_utils_opus_parse_caps (caps):
        #python wrapper for 'gst_codec_utils_opus_parse_caps'

Parses Opus caps and fills the different fields with defaults if possible.

Parameters:

`caps` (Gst.Caps) –

the Gst.Caps to parse the data from

Returns a tuple made of:

(bool ) –

True if parsing was successful, False otherwise.

`rate` (int ) –

True if parsing was successful, False otherwise.

`channels` (int ) –

True if parsing was successful, False otherwise.

`channel_mapping_family` (int ) –

True if parsing was successful, False otherwise.

`stream_count` (int ) –

True if parsing was successful, False otherwise.

`coupled_count` (int ) –

True if parsing was successful, False otherwise.

`channel_mapping` ([ int ] ) –

True if parsing was successful, False otherwise.

Since : 1.8

### gst_codec_utils_opus_parse_header

    gboolean
    gst_codec_utils_opus_parse_header (GstBuffer * header,
                                       guint32 * rate,
                                       guint8 * channels,
                                       guint8 * channel_mapping_family,
                                       guint8 * stream_count,
                                       guint8 * coupled_count,
                                       guint8 * channel_mapping,
                                       guint16 * pre_skip,
                                       gint16 * output_gain)

Parses the OpusHead header.

Parameters:

`header` –

the OpusHead GstBuffer

`rate` ( [optional][out]) –

the sample rate

`channels` ( [optional][out]) –

the number of channels

`channel_mapping_family` ( [optional][out]) –

the channel mapping family

`stream_count` ( [optional][out]) –

the number of independent streams

`coupled_count` ( [optional][out]) –

the number of stereo streams

`channel_mapping` ( [optional][out][array fixed-size=256]) –

the mapping between the streams

`pre_skip` ( [optional][out]) –

Pre-skip in 48kHz samples or 0

`output_gain` ( [optional][out]) –

Output gain or 0

Returns –

TRUE if parsing was successful, FALSE otherwise.

Since : 1.8

### GstPbutils.prototype.codec_utils_opus_parse_header

    function GstPbutils.prototype.codec_utils_opus_parse_header(header: Gst.Buffer): {
        // javascript wrapper for 'gst_codec_utils_opus_parse_header'
    }

Parses the OpusHead header.

Parameters:

`header` (Gst.Buffer) –

the OpusHead Gst.Buffer

Returns a tuple made of:

(Number ) –

true if parsing was successful, false otherwise.

`rate` (Number ) –

true if parsing was successful, false otherwise.

`channels` (Number ) –

true if parsing was successful, false otherwise.

`channel_mapping_family` (Number ) –

true if parsing was successful, false otherwise.

`stream_count` (Number ) –

true if parsing was successful, false otherwise.

`coupled_count` (Number ) –

true if parsing was successful, false otherwise.

`channel_mapping` ([ Number ] ) –

true if parsing was successful, false otherwise.

`pre_skip` (Number ) –

true if parsing was successful, false otherwise.

`output_gain` (Number ) –

true if parsing was successful, false otherwise.

Since : 1.8

### GstPbutils.codec_utils_opus_parse_header

    def GstPbutils.codec_utils_opus_parse_header (header):
        #python wrapper for 'gst_codec_utils_opus_parse_header'

Parses the OpusHead header.

Parameters:

`header` (Gst.Buffer) –

the OpusHead Gst.Buffer

Returns a tuple made of:

(bool ) –

True if parsing was successful, False otherwise.

`rate` (int ) –

True if parsing was successful, False otherwise.

`channels` (int ) –

True if parsing was successful, False otherwise.

`channel_mapping_family` (int ) –

True if parsing was successful, False otherwise.

`stream_count` (int ) –

True if parsing was successful, False otherwise.

`coupled_count` (int ) –

True if parsing was successful, False otherwise.

`channel_mapping` ([ int ] ) –

True if parsing was successful, False otherwise.

`pre_skip` (int ) –

True if parsing was successful, False otherwise.

`output_gain` (int ) –

True if parsing was successful, False otherwise.

Since : 1.8

### gst_codec_utils_vp9_estimate_level_idc_from_caps

    guint8
    gst_codec_utils_vp9_estimate_level_idc_from_caps (const GstCaps * caps)

Estimates the vp9 level as defined in https://www.webmproject.org/vp9/mp4/#vp-codec-configuration-box, using the resolution and, if available, frame rate found in the structure passed in.

Parameters:

`caps` –

a video/x-vp9 GstCaps

Returns –

The estimated vp9 level indicator, and 0 if it could not be estimated.

Since : 1.30

### GstPbutils.prototype.codec_utils_vp9_estimate_level_idc_from_caps

    function GstPbutils.prototype.codec_utils_vp9_estimate_level_idc_from_caps(caps: Gst.Caps): {
        // javascript wrapper for 'gst_codec_utils_vp9_estimate_level_idc_from_caps'
    }

Estimates the vp9 level as defined in https://www.webmproject.org/vp9/mp4/#vp-codec-configuration-box, using the resolution and, if available, frame rate found in the structure passed in.

Parameters:

`caps` (Gst.Caps) –

a video/x-vp9 Gst.Caps

Returns (Number) –

The estimated vp9 level indicator, and 0 if it could not be estimated.

Since : 1.30

### GstPbutils.codec_utils_vp9_estimate_level_idc_from_caps

    def GstPbutils.codec_utils_vp9_estimate_level_idc_from_caps (caps):
        #python wrapper for 'gst_codec_utils_vp9_estimate_level_idc_from_caps'

Estimates the vp9 level as defined in https://www.webmproject.org/vp9/mp4/#vp-codec-configuration-box, using the resolution and, if available, frame rate found in the structure passed in.

Parameters:

`caps` (Gst.Caps) –

a video/x-vp9 Gst.Caps

Returns (int) –

The estimated vp9 level indicator, and 0 if it could not be estimated.

Since : 1.30

### gst_codec_utils_vp9_get_level

    const gchar *
    gst_codec_utils_vp9_get_level (guint8 level_idc)

Converts the level indication in the vpcC record into a string.

Parameters:

`level_idc` –

vp9 level value from the vpcC record

Returns ( [nullable]) –

The level as a const string and NULL if the level could not be determined.

Since : 1.30

### GstPbutils.prototype.codec_utils_vp9_get_level

    function GstPbutils.prototype.codec_utils_vp9_get_level(level_idc: Number): {
        // javascript wrapper for 'gst_codec_utils_vp9_get_level'
    }

Converts the level indication in the vpcC record into a string.

Parameters:

`level_idc` (Number) –

vp9 level value from the vpcC record

Returns (String) –

The level as a const string and null if the level could not be determined.

Since : 1.30

### GstPbutils.codec_utils_vp9_get_level

    def GstPbutils.codec_utils_vp9_get_level (level_idc):
        #python wrapper for 'gst_codec_utils_vp9_get_level'

Converts the level indication in the vpcC record into a string.

Parameters:

`level_idc` (int) –

vp9 level value from the vpcC record

Returns (str) –

The level as a const string and None if the level could not be determined.

Since : 1.30

### gst_codec_utils_vp9_get_level_idc

    guint8
    gst_codec_utils_vp9_get_level_idc (const gchar * level)

Transform a level string from the caps into the level_idc

Parameters:

`level` –

A vp9 level string from caps

Returns –

The level indication or 0 if the level is unknown.

Since : 1.30

### GstPbutils.prototype.codec_utils_vp9_get_level_idc

    function GstPbutils.prototype.codec_utils_vp9_get_level_idc(level: String): {
        // javascript wrapper for 'gst_codec_utils_vp9_get_level_idc'
    }

Transform a level string from the caps into the level_idc

Parameters:

`level` (String) –

A vp9 level string from caps

Returns (Number) –

The level indication or 0 if the level is unknown.

Since : 1.30

### GstPbutils.codec_utils_vp9_get_level_idc

    def GstPbutils.codec_utils_vp9_get_level_idc (level):
        #python wrapper for 'gst_codec_utils_vp9_get_level_idc'

Transform a level string from the caps into the level_idc

Parameters:

`level` (str) –

A vp9 level string from caps

Returns (int) –

The level indication or 0 if the level is unknown.

Since : 1.30

### gst_codec_utils_vpx_caps_get_config

    gboolean
    gst_codec_utils_vpx_caps_get_config (GstCaps * caps,
                                         gint * vpx_version,
                                         guint8 * profile,
                                         guint8 * level,
                                         guint8 * bit_depth,
                                         guint8 * chroma_subsampling,
                                         gboolean * video_full_range,
                                         guint8 * colour_primaries,
                                         guint8 * transfer_characteristics,
                                         guint8 * matrix_coefficients)

Parses VP8/VP9 caps and extracts normalized VPX configuration fields. Unlike gst_codec_utils_vpx_caps_set_format_fields, this getter includes the colorimetry-derived fields needed to build a full vpcC record.

Parameters:

`caps` –

a video/x-vp8 or video/x-vp9 GstCaps

`vpx_version` ( [nullable][out]) –

VPX version described by caps (8 or 9)

`profile` ( [nullable][out]) –

profile value

`level` ( [nullable][out]) –

level value

`bit_depth` ( [nullable][out]) –

bit depth value

`chroma_subsampling` ( [nullable][out]) –

chroma subsampling value

`video_full_range` ( [nullable][out]) –

whether full-range signaling is set

`colour_primaries` ( [nullable][out]) –

ISO color primaries value

`transfer_characteristics` ( [nullable][out]) –

ISO transfer characteristics value

`matrix_coefficients` ( [nullable][out]) –

ISO matrix coefficients value

Returns –

TRUE if extraction succeeded, FALSE otherwise.

Since : 1.30

### GstPbutils.prototype.codec_utils_vpx_caps_get_config

    function GstPbutils.prototype.codec_utils_vpx_caps_get_config(caps: Gst.Caps): {
        // javascript wrapper for 'gst_codec_utils_vpx_caps_get_config'
    }

Parses VP8/VP9 caps and extracts normalized VPX configuration fields. Unlike GstPbutils.prototype.codec_utils_vpx_caps_set_format_fields, this getter includes the colorimetry-derived fields needed to build a full vpcC record.

Parameters:

`caps` (Gst.Caps) –

a video/x-vp8 or video/x-vp9 Gst.Caps

Returns a tuple made of:

(Number ) –

true if extraction succeeded, false otherwise.

`vpx_version` (Number ) –

true if extraction succeeded, false otherwise.

`profile` (Number ) –

true if extraction succeeded, false otherwise.

`level` (Number ) –

true if extraction succeeded, false otherwise.

`bit_depth` (Number ) –

true if extraction succeeded, false otherwise.

`chroma_subsampling` (Number ) –

true if extraction succeeded, false otherwise.

`video_full_range` (Number ) –

true if extraction succeeded, false otherwise.

`colour_primaries` (Number ) –

true if extraction succeeded, false otherwise.

`transfer_characteristics` (Number ) –

true if extraction succeeded, false otherwise.

`matrix_coefficients` (Number ) –

true if extraction succeeded, false otherwise.

Since : 1.30

### GstPbutils.codec_utils_vpx_caps_get_config

    def GstPbutils.codec_utils_vpx_caps_get_config (caps):
        #python wrapper for 'gst_codec_utils_vpx_caps_get_config'

Parses VP8/VP9 caps and extracts normalized VPX configuration fields. Unlike GstPbutils.codec_utils_vpx_caps_set_format_fields, this getter includes the colorimetry-derived fields needed to build a full vpcC record.

Parameters:

`caps` (Gst.Caps) –

a video/x-vp8 or video/x-vp9 Gst.Caps

Returns a tuple made of:

(bool ) –

True if extraction succeeded, False otherwise.

`vpx_version` (int ) –

True if extraction succeeded, False otherwise.

`profile` (int ) –

True if extraction succeeded, False otherwise.

`level` (int ) –

True if extraction succeeded, False otherwise.

`bit_depth` (int ) –

True if extraction succeeded, False otherwise.

`chroma_subsampling` (int ) –

True if extraction succeeded, False otherwise.

`video_full_range` (bool ) –

True if extraction succeeded, False otherwise.

`colour_primaries` (int ) –

True if extraction succeeded, False otherwise.

`transfer_characteristics` (int ) –

True if extraction succeeded, False otherwise.

`matrix_coefficients` (int ) –

True if extraction succeeded, False otherwise.

Since : 1.30

### gst_codec_utils_vpx_caps_set_format_fields

    gboolean
    gst_codec_utils_vpx_caps_set_format_fields (GstCaps * caps,
                                                gint profile,
                                                gint level,
                                                gint bit_depth,
                                                gint chroma_subsampling)

Sets VPX format fields in caps from parsed VPX configuration values. This setter handles the VPX format-field subset shared between VP9 CodecPrivate and vpcC signaling. Any field set to -1 is treated as unknown and not written. For VP8 caps, only profile 0, 8-bit depth, and chroma subsampling 1 are accepted.

Parameters:

`caps` –

the GstCaps to set VPX fields on (video/x-vp8 or video/x-vp9)

`profile` –

VPX profile, or -1 if unknown

`level` –

VP9 level idc, or -1 if unknown

`bit_depth` –

VPX bit depth, or -1 if unknown

`chroma_subsampling` –

VPX chroma subsampling (0-3), or -1 if unknown

Returns –

TRUE if provided values were valid, FALSE otherwise.

Since : 1.30

### GstPbutils.prototype.codec_utils_vpx_caps_set_format_fields

    function GstPbutils.prototype.codec_utils_vpx_caps_set_format_fields(caps: Gst.Caps, profile: Number, level: Number, bit_depth: Number, chroma_subsampling: Number): {
        // javascript wrapper for 'gst_codec_utils_vpx_caps_set_format_fields'
    }

Sets VPX format fields in caps from parsed VPX configuration values. This setter handles the VPX format-field subset shared between VP9 CodecPrivate and vpcC signaling. Any field set to -1 is treated as unknown and not written. For VP8 caps, only profile 0, 8-bit depth, and chroma subsampling 1 are accepted.

Parameters:

`caps` (Gst.Caps) –

the Gst.Caps to set VPX fields on (video/x-vp8 or video/x-vp9)

`profile` (Number) –

VPX profile, or -1 if unknown

`level` (Number) –

VP9 level idc, or -1 if unknown

`bit_depth` (Number) –

VPX bit depth, or -1 if unknown

`chroma_subsampling` (Number) –

VPX chroma subsampling (0-3), or -1 if unknown

Returns (Number) –

true if provided values were valid, false otherwise.

Since : 1.30

### GstPbutils.codec_utils_vpx_caps_set_format_fields

    def GstPbutils.codec_utils_vpx_caps_set_format_fields (caps, profile, level, bit_depth, chroma_subsampling):
        #python wrapper for 'gst_codec_utils_vpx_caps_set_format_fields'

Sets VPX format fields in caps from parsed VPX configuration values. This setter handles the VPX format-field subset shared between VP9 CodecPrivate and vpcC signaling. Any field set to -1 is treated as unknown and not written. For VP8 caps, only profile 0, 8-bit depth, and chroma subsampling 1 are accepted.

Parameters:

`caps` (Gst.Caps) –

the Gst.Caps to set VPX fields on (video/x-vp8 or video/x-vp9)

`profile` (int) –

VPX profile, or -1 if unknown

`level` (int) –

VP9 level idc, or -1 if unknown

`bit_depth` (int) –

VPX bit depth, or -1 if unknown

`chroma_subsampling` (int) –

VPX chroma subsampling (0-3), or -1 if unknown

Returns (bool) –

True if provided values were valid, False otherwise.

Since : 1.30

### gst_codec_utils_vpx_create_vpcc_from_caps

    GstBuffer *
    gst_codec_utils_vpx_create_vpcc_from_caps (GstCaps * caps)

Creates a vpcC record for VP8/VP9 as per the VP Codec ISO Media File Format Binding definition found at https://www.webmproject.org/vp9/mp4/#vp-codec-configuration-box

Parameters:

`caps` –

a video/x-vp8 or video/x-vp9 GstCaps

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

Buffer containing the vpcC record, or NULL if the record could not be created.

Since : 1.30

### GstPbutils.prototype.codec_utils_vpx_create_vpcc_from_caps

    function GstPbutils.prototype.codec_utils_vpx_create_vpcc_from_caps(caps: Gst.Caps): {
        // javascript wrapper for 'gst_codec_utils_vpx_create_vpcc_from_caps'
    }

Creates a vpcC record for VP8/VP9 as per the VP Codec ISO Media File Format Binding definition found at https://www.webmproject.org/vp9/mp4/#vp-codec-configuration-box

Parameters:

`caps` (Gst.Caps) –

a video/x-vp8 or video/x-vp9 Gst.Caps

Returns (Gst.Buffer) –

Buffer containing the vpcC record, or null if the record could not be created.

Since : 1.30

### GstPbutils.codec_utils_vpx_create_vpcc_from_caps

    def GstPbutils.codec_utils_vpx_create_vpcc_from_caps (caps):
        #python wrapper for 'gst_codec_utils_vpx_create_vpcc_from_caps'

Creates a vpcC record for VP8/VP9 as per the VP Codec ISO Media File Format Binding definition found at https://www.webmproject.org/vp9/mp4/#vp-codec-configuration-box

Parameters:

`caps` (Gst.Caps) –

a video/x-vp8 or video/x-vp9 Gst.Caps

Returns (Gst.Buffer) –

Buffer containing the vpcC record, or None if the record could not be created.

Since : 1.30

The results of the search are