diff options
author | Alex Ashley <bugzilla@ashley-family.net> | 2015-04-15 15:33:31 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2015-04-18 12:24:06 +0100 |
commit | abdafb0d641448e4693bd98740f7c26f1860fa15 (patch) | |
tree | ac60eb385318d870769e1eac34666e7c80a068b0 /gst/gstinfo.c | |
parent | 0f36b16a29d86a0050b8978781339616233b1db5 (diff) |
protection: add GstProtectionMeta to support protected content
In order to support some types of protected streams (such as those
protected using DASH Common Encryption) some per-buffer information
needs to be passed between elements.
This commit adds a GstMeta type called GstProtectionMeta that allows
protection specific information to be added to a GstBuffer. An example
of its usage is qtdemux providing information to each output sample
that enables a downstream element to decrypt it.
This commit adds a utility function to select a supported protection
system from the installed Decryption elements found in the registry.
The gst_protection_select_system function that takes an array of
identifiers and searches the registry for a element of klass Decryptor that
supports one or more of the supplied identifiers. If multiple elements
are found, the one with the highest rank is selected.
This commit adds a unit test for the gst_protection_select_system
function that adds a fake Decryptor element to the registry and then
checks that it can correctly be selected by the utility function.
This commit adds a unit test for GstProtectionMeta that creates
GstProtectionMeta and adds & removes it from a buffer and performs some
simple reference count checks.
API: gst_buffer_add_protection_meta()
API: gst_buffer_get_protection_meta()
API: gst_protection_select_system()
API: gst_protection_meta_api_get_type()
API: gst_protection_meta_get_info()
https://bugzilla.gnome.org/show_bug.cgi?id=705991
Diffstat (limited to 'gst/gstinfo.c')
-rw-r--r-- | gst/gstinfo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/gstinfo.c b/gst/gstinfo.c index 730913281..f21023314 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -176,6 +176,7 @@ GstDebugCategory *_priv_GST_CAT_POLL = NULL; GstDebugCategory *GST_CAT_META = NULL; GstDebugCategory *GST_CAT_LOCKING = NULL; GstDebugCategory *GST_CAT_CONTEXT = NULL; +GstDebugCategory *_priv_GST_CAT_PROTECTION = NULL; #endif /* !defined(GST_DISABLE_GST_DEBUG) || !defined(GST_REMOVE_DISABLED) */ @@ -390,6 +391,8 @@ _priv_gst_debug_init (void) GST_CAT_META = _gst_debug_category_new ("GST_META", 0, "meta"); GST_CAT_LOCKING = _gst_debug_category_new ("GST_LOCKING", 0, "locking"); GST_CAT_CONTEXT = _gst_debug_category_new ("GST_CONTEXT", 0, NULL); + _priv_GST_CAT_PROTECTION = + _gst_debug_category_new ("GST_PROTECTION", 0, "protection"); /* print out the valgrind message if we're in valgrind */ _priv_gst_in_valgrind (); |