![]() |
![]() |
![]() |
GStreamer 1.0 Core Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <gst/gstprotection.h> struct GstProtectionMeta; GstProtectionMeta * gst_buffer_add_protection_meta (GstBuffer *buffer
,GstStructure *info
); #define gst_buffer_get_protection_meta (b) const gchar * gst_protection_select_system (const gchar **system_identifiers
); #define GST_PROTECTION_SYSTEM_ID_CAPS_FIELD
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.
struct GstProtectionMeta { GstMeta meta; GstStructure *info; };
Metadata type that holds information about a sample from a protection-protected track, including the information needed to decrypt it (if it is encrypted).
GstMeta |
the parent GstMeta. |
GstStructure * |
the cryptographic information needed to decrypt the sample. |
Since 1.6
GstProtectionMeta * gst_buffer_add_protection_meta (GstBuffer *buffer
,GstStructure *info
);
Attaches protection metadata to a GstBuffer.
|
GstBuffer holding an encrypted sample, to which protection metadata should be added. |
|
a GstStructure holding cryptographic
information relating to the sample contained in buffer . This
function takes ownership of info . [transfer full]
|
Returns : |
a pointer to the added GstProtectionMeta if successful; NULL if
unsuccessful. [transfer none]
|
Since 1.6
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.
|
A null terminated array of strings that contains the UUID values of each protection system that is to be checked. [transfer none] |
Returns : |
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. [transfer none]
|
Since 1.6