2015-04-15 14:33:31 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <2015> YouView TV Ltd.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_PROTECTION_H__
|
|
|
|
#define __GST_PROTECTION_H__
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2015-06-13 16:25:19 +00:00
|
|
|
/**
|
|
|
|
* GST_PROTECTION_SYSTEM_ID_CAPS_FIELD:
|
|
|
|
*
|
|
|
|
* The field name in a GstCaps that is used to signal the UUID of the protection
|
|
|
|
* system.
|
|
|
|
*
|
2015-06-14 00:19:59 +00:00
|
|
|
* Since: 1.6
|
2015-04-15 14:33:31 +00:00
|
|
|
*/
|
2015-06-13 16:25:19 +00:00
|
|
|
#define GST_PROTECTION_SYSTEM_ID_CAPS_FIELD "protection-system"
|
2015-04-15 14:33:31 +00:00
|
|
|
|
2018-10-01 10:11:47 +00:00
|
|
|
/**
|
|
|
|
* 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
|
|
|
|
*/
|
2018-10-03 16:23:01 +00:00
|
|
|
#define GST_PROTECTION_UNSPECIFIED_SYSTEM_ID "unspecified-system-id"
|
2018-10-01 10:11:47 +00:00
|
|
|
|
2015-04-15 14:33:31 +00:00
|
|
|
typedef struct _GstProtectionMeta GstProtectionMeta;
|
|
|
|
/**
|
|
|
|
* GstProtectionMeta:
|
|
|
|
* @meta: the parent #GstMeta.
|
|
|
|
* @info: the cryptographic information needed to decrypt the sample.
|
|
|
|
*
|
|
|
|
* Metadata type that holds information about a sample from a protection-protected
|
|
|
|
* track, including the information needed to decrypt it (if it is encrypted).
|
2015-06-13 16:27:31 +00:00
|
|
|
*
|
2015-06-14 00:19:59 +00:00
|
|
|
* Since: 1.6
|
2015-04-15 14:33:31 +00:00
|
|
|
*/
|
|
|
|
struct _GstProtectionMeta
|
|
|
|
{
|
|
|
|
GstMeta meta;
|
|
|
|
|
|
|
|
GstStructure *info;
|
|
|
|
};
|
|
|
|
|
2018-08-19 22:41:41 +00:00
|
|
|
/**
|
|
|
|
* gst_protection_meta_api_get_type: (attributes doc.skip=true)
|
|
|
|
*/
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2015-04-15 14:33:31 +00:00
|
|
|
GType gst_protection_meta_api_get_type (void);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2015-04-15 14:33:31 +00:00
|
|
|
#define GST_PROTECTION_META_API_TYPE (gst_protection_meta_api_get_type())
|
|
|
|
|
|
|
|
#define gst_buffer_get_protection_meta(b) \
|
|
|
|
((GstProtectionMeta*)gst_buffer_get_meta ((b), GST_PROTECTION_META_API_TYPE))
|
|
|
|
|
|
|
|
#define GST_PROTECTION_META_INFO (gst_protection_meta_get_info())
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2017-05-10 09:56:16 +00:00
|
|
|
const GstMetaInfo * gst_protection_meta_get_info (void);
|
2015-04-15 14:33:31 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2017-05-10 09:56:16 +00:00
|
|
|
GstProtectionMeta * gst_buffer_add_protection_meta (GstBuffer * buffer,
|
|
|
|
GstStructure * info);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2017-05-10 09:56:16 +00:00
|
|
|
const gchar * gst_protection_select_system (const gchar ** system_identifiers);
|
2015-04-15 14:33:31 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2017-06-28 07:54:56 +00:00
|
|
|
gchar ** gst_protection_filter_systems_by_available_decryptors (
|
|
|
|
const gchar ** system_identifiers);
|
|
|
|
|
2015-04-15 14:33:31 +00:00
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __GST_PROTECTION_META_H__ */
|