# GstProtection

The GstProtectionMeta class enables the information needed to decrypt a GstBuffer to be attached to that buffer.

Typically, a demuxer element would attach GstProtectionMeta objects to the buffers that it pushes downstream. The demuxer would parse the protection information for a video/audio frame from its input data and use this information to populate the GstStructure info field, which is then encapsulated in a GstProtectionMeta object and attached to the corresponding output buffer using the gst_buffer_add_protection_meta function. The information in this attached GstProtectionMeta would be used by a downstream decrypter element to recover the original unencrypted frame.

In addition to the GstProtectionMeta demuxers signal encrypted streams with specific caps. The caps GstStructure name will usually depend on the encryption scheme, for instance Common Encryption will be signaled with `application/x-cenc`. To prevent loss of information the media type of the decrypted stream will be stored in a `original-media-type` string field. Downstream elements can re-use that information, for instance decryptors can set their source pad caps according to the `original-media-type` received on their sink pad.

## GstProtectionMeta

Metadata type that holds information about a sample from a protection-protected track, including the information needed to decrypt it (if it is encrypted).

### Members

`meta` (GstMeta) –

the parent GstMeta.

`info` (GstStructure *) –

the cryptographic information needed to decrypt the sample.

Since : 1.6

## Gst.ProtectionMeta

Metadata type that holds information about a sample from a protection-protected track, including the information needed to decrypt it (if it is encrypted).

### Members

`meta` (Gst.Meta) –

the parent Gst.Meta.

`info` (Gst.Structure) –

the cryptographic information needed to decrypt the sample.

Since : 1.6

## Gst.ProtectionMeta

Metadata type that holds information about a sample from a protection-protected track, including the information needed to decrypt it (if it is encrypted).

### Members

`meta` (Gst.Meta) –

the parent Gst.Meta.

`info` (Gst.Structure) –

the cryptographic information needed to decrypt the sample.

Since : 1.6

### Functions

#### gst_protection_meta_get_info

    const GstMetaInfo *
    gst_protection_meta_get_info ()

Returns –
No description available

#### Gst.prototype.protection_meta_get_info

    function Gst.prototype.protection_meta_get_info(): {
        // javascript wrapper for 'gst_protection_meta_get_info'
    }

Returns (Gst.MetaInfo) –
No description available

#### Gst.protection_meta_get_info

    def Gst.protection_meta_get_info ():
        #python wrapper for 'gst_protection_meta_get_info'

Returns (Gst.MetaInfo) –
No description available

## Functions

### gst_protection_filter_systems_by_available_decryptors

    gchar **
    gst_protection_filter_systems_by_available_decryptors (const gchar ** system_identifiers)

Iterates the supplied list of UUIDs and checks the GstRegistry for all the decryptors supporting one of the supplied UUIDs.

Parameters:

`system_identifiers` –

(transfer none) (array zero-terminated=1): A null terminated array of strings that contains the UUID values of each protection system that is to be checked.

Returns –

(transfer full) (array zero-terminated=1) (nullable): A null terminated array containing all the system_identifiers supported by the set of available decryptors, or NULL if no matches were found.

Since : 1.14

### Gst.prototype.protection_filter_systems_by_available_decryptors

    function Gst.prototype.protection_filter_systems_by_available_decryptors(system_identifiers: [ String ]): {
        // javascript wrapper for 'gst_protection_filter_systems_by_available_decryptors'
    }

Iterates the supplied list of UUIDs and checks the GstRegistry for all the decryptors supporting one of the supplied UUIDs.

Parameters:

`system_identifiers` ([ String ]) –

(transfer none) (array zero-terminated=1): A null terminated array of strings that contains the UUID values of each protection system that is to be checked.

Returns ([ String ]) –

(transfer full) (array zero-terminated=1) (nullable): A null terminated array containing all the system_identifiers supported by the set of available decryptors, or null if no matches were found.

Since : 1.14

### Gst.protection_filter_systems_by_available_decryptors

    def Gst.protection_filter_systems_by_available_decryptors (system_identifiers):
        #python wrapper for 'gst_protection_filter_systems_by_available_decryptors'

Iterates the supplied list of UUIDs and checks the GstRegistry for all the decryptors supporting one of the supplied UUIDs.

Parameters:

`system_identifiers` ([ str ]) –

(transfer none) (array zero-terminated=1): A null terminated array of strings that contains the UUID values of each protection system that is to be checked.

Returns ([ str ]) –

(transfer full) (array zero-terminated=1) (nullable): A null terminated array containing all the system_identifiers supported by the set of available decryptors, or None if no matches were found.

Since : 1.14

### gst_protection_select_system

    const gchar *
    gst_protection_select_system (const gchar ** system_identifiers)

Iterates the supplied list of UUIDs and checks the GstRegistry for an element that supports one of the supplied UUIDs. If more than one element matches, the system ID of the highest ranked element is selected.

Parameters:

`system_identifiers` ( [transfer: none][array zero-terminated=1]) –

A null terminated array of strings that contains the UUID values of each protection system that is to be checked.

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

One of the strings from system_identifiers that indicates the highest ranked element that implements the protection system indicated by that system ID, or NULL if no element has been found.

Since : 1.6

### Gst.prototype.protection_select_system

    function Gst.prototype.protection_select_system(system_identifiers: [ String ]): {
        // javascript wrapper for 'gst_protection_select_system'
    }

Iterates the supplied list of UUIDs and checks the GstRegistry for an element that supports one of the supplied UUIDs. If more than one element matches, the system ID of the highest ranked element is selected.

Parameters:

`system_identifiers` ([ String ]) –

A null terminated array of strings that contains the UUID values of each protection system that is to be checked.

Returns (String) –

One of the strings from system_identifiers that indicates the highest ranked element that implements the protection system indicated by that system ID, or null if no element has been found.

Since : 1.6

### Gst.protection_select_system

    def Gst.protection_select_system (system_identifiers):
        #python wrapper for 'gst_protection_select_system'

Iterates the supplied list of UUIDs and checks the GstRegistry for an element that supports one of the supplied UUIDs. If more than one element matches, the system ID of the highest ranked element is selected.

Parameters:

`system_identifiers` ([ str ]) –

A null terminated array of strings that contains the UUID values of each protection system that is to be checked.

Returns (str) –

One of the strings from system_identifiers that indicates the highest ranked element that implements the protection system indicated by that system ID, or None if no element has been found.

Since : 1.6

## Function Macros

### gst_buffer_get_protection_meta

    #define gst_buffer_get_protection_meta(b) \
        ((GstProtectionMeta*)gst_buffer_get_meta ((b), GST_PROTECTION_META_API_TYPE))

## Constants

### GST_PROTECTION_META_API_TYPE

    #define GST_PROTECTION_META_API_TYPE (gst_protection_meta_api_get_type())

### GST_PROTECTION_META_INFO

    #define GST_PROTECTION_META_INFO (gst_protection_meta_get_info())

### GST_PROTECTION_SYSTEM_ID_CAPS_FIELD

    #define GST_PROTECTION_SYSTEM_ID_CAPS_FIELD "protection-system"

The field name in a GstCaps that is used to signal the UUID of the protection system.

Since : 1.6

### Gst.PROTECTION_SYSTEM_ID_CAPS_FIELD

The field name in a GstCaps that is used to signal the UUID of the protection system.

Since : 1.6

### Gst.PROTECTION_SYSTEM_ID_CAPS_FIELD

The field name in a GstCaps that is used to signal the UUID of the protection system.

Since : 1.6

### GST_PROTECTION_UNSPECIFIED_SYSTEM_ID

    #define GST_PROTECTION_UNSPECIFIED_SYSTEM_ID "unspecified-system-id"

The protection system value of the unspecified UUID. In some cases the system protection ID is not present in the contents or in their metadata, as encrypted WebM. This define is used to set the value of the "system_id" field in GstProtectionEvent, with this value, the application will use an external information to choose which protection system to use.

Example: The matroskademux uses this value in the case of encrypted WebM, the application will choose the appropriate protection system based on the information received through EME API.

Since : 1.16

### Gst.PROTECTION_UNSPECIFIED_SYSTEM_ID

The protection system value of the unspecified UUID. In some cases the system protection ID is not present in the contents or in their metadata, as encrypted WebM. This define is used to set the value of the "system_id" field in GstProtectionEvent, with this value, the application will use an external information to choose which protection system to use.

Example: The matroskademux uses this value in the case of encrypted WebM, the application will choose the appropriate protection system based on the information received through EME API.

Since : 1.16

### Gst.PROTECTION_UNSPECIFIED_SYSTEM_ID

The protection system value of the unspecified UUID. In some cases the system protection ID is not present in the contents or in their metadata, as encrypted WebM. This define is used to set the value of the "system_id" field in GstProtectionEvent, with this value, the application will use an external information to choose which protection system to use.

Example: The matroskademux uses this value in the case of encrypted WebM, the application will choose the appropriate protection system based on the information received through EME API.

Since : 1.16

The results of the search are