Wasabi ExpressPlay SDK for Embedded Systems
1.23.0
|
Go to the source code of this file.
Typedefs | |
typedef struct TS2_BbtsBufferEncrypter | TS2_BbtsBufferEncrypter |
A TS2_BbtsBufferEncrypter object can be used to encrypt MPEG-2 TS content to obtain BBTS content. More... | |
typedef struct TS2_BbtsBufferDecrypter | TS2_BbtsBufferDecrypter |
A TS2_BbtsBufferDecrypter object can be used to decrypt BBTS content to obtain MPEG-2 TS content. More... | |
Functions | |
TS2_EXPORT ATX_Result | TS2_BbtsBufferEncrypter_Create (const char *content_id, const ATX_Byte *content_key, const ATX_Byte *common_iv, TS2_TrafficProtectionSystem protection, ATX_UInt32 crypto_period, const char *rights_issuer_url, const char *silent_rights_url, const char *preview_rights_url, ATX_Boolean skip_payload_unit_start, ATX_Boolean single_key_layer, const ATX_Byte *access_criteria, ATX_Size access_criteria_size, TS2_BbtsBufferEncrypter **encrypter) |
Creates an instance of a TS2_BbtsBufferEncrypter object that uses buffers for the operation of encrypting MPEG-2 TS content to obtain BBTS content. More... | |
TS2_EXPORT ATX_Result | TS2_BbtsBufferEncrypter_EncryptBuffer (TS2_BbtsBufferEncrypter *self, const ATX_Byte *in, ATX_Size in_size, ATX_DataBuffer *out) |
Encrypts a buffer of data, and stores the result in a caller-allocated ATX_DataBuffer. More... | |
TS2_EXPORT ATX_Result | TS2_BbtsBufferEncrypter_ResetDrm (TS2_BbtsBufferEncrypter *self, const char *content_id, const ATX_Byte *content_key) |
Changes the content ID and content key used to encrypt the data. More... | |
TS2_EXPORT ATX_Result | TS2_BbtsBufferEncrypter_ResetDrmEx (TS2_BbtsBufferEncrypter *self, const char *content_id, const ATX_Byte *content_key, const ATX_Byte *access_criteria, ATX_Size access_criteria_size) |
Changes the content ID, content key used to encrypt the data, and the access_criteria loop. More... | |
TS2_EXPORT ATX_Result | TS2_BbtsBufferEncrypter_Destroy (TS2_BbtsBufferEncrypter *self) |
Destroys the specified TS2_BbtsBufferEncrypter object. More... | |
TS2_EXPORT ATX_Result | TS2_BbtsBufferDecrypter_Create (TS2_CryptoInterface *crypto_interface, TS2_BbtsBufferDecrypter **decrypter) |
Creates a TS2_BbtsBufferDecrypter object that uses buffers for the operation of decrypting BBTS content to obtain MPEG-2 TS content. More... | |
TS2_EXPORT ATX_Result | TS2_BbtsBufferDecrypter_DecryptBuffer (TS2_BbtsBufferDecrypter *self, const ATX_Byte *in, ATX_Size in_size, ATX_DataBuffer *out) |
Decrypts a buffer of data, and stores the result in a caller-allocated ATX_DataBuffer. More... | |
TS2_EXPORT ATX_Result | TS2_BbtsBufferDecrypter_Destroy (TS2_BbtsBufferDecrypter *self) |
Destroys the specified TS2_BbtsBufferDecrypter object. More... | |
typedef struct TS2_BbtsBufferDecrypter TS2_BbtsBufferDecrypter |
A TS2_BbtsBufferDecrypter object can be used to decrypt BBTS content to obtain MPEG-2 TS content.
typedef struct TS2_BbtsBufferEncrypter TS2_BbtsBufferEncrypter |
A TS2_BbtsBufferEncrypter object can be used to encrypt MPEG-2 TS content to obtain BBTS content.
TS2_EXPORT ATX_Result TS2_BbtsBufferDecrypter_Create | ( | TS2_CryptoInterface * | crypto_interface, |
TS2_BbtsBufferDecrypter ** | decrypter | ||
) |
Creates a TS2_BbtsBufferDecrypter object that uses buffers for the operation of decrypting BBTS content to obtain MPEG-2 TS content.
The TS2_BbtsBufferDecrypter object must be destroyed when it is no longer needed, by calling TS2_BbtsBufferDecrypter_Destroy.
crypto_interface | Pointer to a TS2_CryptoInterface implementation providing cryptographic functionality that may be needed by the TS2_BbtsBufferDecrypter. |
decrypter | Address of a TS2_BbtsBufferDecrypter pointer that will be set to refer to the TS2_BbtsBufferDecrypter object created. |
TS2_EXPORT ATX_Result TS2_BbtsBufferDecrypter_DecryptBuffer | ( | TS2_BbtsBufferDecrypter * | self, |
const ATX_Byte * | in, | ||
ATX_Size | in_size, | ||
ATX_DataBuffer * | out | ||
) |
Decrypts a buffer of data, and stores the result in a caller-allocated ATX_DataBuffer.
self | The TS2_BbtsBufferDecrypter object used to decrypt the supplied buffer of data. |
in | Data to decrypt. |
in_size | Size of the data to decrypt, in bytes. |
out | Pointer to a caller-allocated ATX_DataBuffer into which the decrypted data will be stored.If we ATX_DataBuffer is not large enough for the decrypted bytes to fit, this method increases the ATX_DataBuffer size. |
TS2_EXPORT ATX_Result TS2_BbtsBufferDecrypter_Destroy | ( | TS2_BbtsBufferDecrypter * | self | ) |
Destroys the specified TS2_BbtsBufferDecrypter object.
self | The TS2_BbtsBufferDecrypter object. |
TS2_EXPORT ATX_Result TS2_BbtsBufferEncrypter_Create | ( | const char * | content_id, |
const ATX_Byte * | content_key, | ||
const ATX_Byte * | common_iv, | ||
TS2_TrafficProtectionSystem | protection, | ||
ATX_UInt32 | crypto_period, | ||
const char * | rights_issuer_url, | ||
const char * | silent_rights_url, | ||
const char * | preview_rights_url, | ||
ATX_Boolean | skip_payload_unit_start, | ||
ATX_Boolean | single_key_layer, | ||
const ATX_Byte * | access_criteria, | ||
ATX_Size | access_criteria_size, | ||
TS2_BbtsBufferEncrypter ** | encrypter | ||
) |
Creates an instance of a TS2_BbtsBufferEncrypter object that uses buffers for the operation of encrypting MPEG-2 TS content to obtain BBTS content.
The TS2_BbtsBufferEncrypter object must be destroyed when it is no longer needed, by calling TS2_BbtsBufferEncrypter_Destroy.
content_id | A BBTS-compatible content ID. |
content_key | A 16-byte content key. |
common_iv | A 16-byte initialization vector. Can be NULL, in which case the IV will change for each ECM (KSM). If single_key_layer has the value ATX_TRUE, then this parameter is ignored and the IV will be 16 0x00 bytes. |
protection | the traffic protection system. |
crypto_period | Crypto period in seconds, between 1 and 120. |
rights_issuer_url | URI template for the rights issuer. |
silent_rights_url | URI template for silent rights acquisition. |
preview_rights_url | URI template for preview rights acquisition. |
skip_payload_unit_start | If ATX_TRUE, the encrypter will not encrypt packets that have the payload unit start indicator flag set. |
single_key_layer | If ATX_TRUE, the encrypter will use the single-key-layer mode. In this case, the common_iv parameter is ignored. |
access_criteria | Buffer containing access criteria block (Optional) |
access_criteria_size | Size of access_criteria buffer (Optional) |
encrypter | Address of a TS2_BbtsBufferEncrypter pointer that will be set to refer to the TS2_BbtsBufferEncrypter object created. |
TS2_EXPORT ATX_Result TS2_BbtsBufferEncrypter_Destroy | ( | TS2_BbtsBufferEncrypter * | self | ) |
Destroys the specified TS2_BbtsBufferEncrypter object.
self | The TS2_BbtsBufferEncrypter object. |
TS2_EXPORT ATX_Result TS2_BbtsBufferEncrypter_EncryptBuffer | ( | TS2_BbtsBufferEncrypter * | self, |
const ATX_Byte * | in, | ||
ATX_Size | in_size, | ||
ATX_DataBuffer * | out | ||
) |
Encrypts a buffer of data, and stores the result in a caller-allocated ATX_DataBuffer.
self | The TS2_BbtsBufferEncrypter object used to encrypt the supplied buffer of data. |
in | Data to encrypt. |
in_size | Size of the data to encrypt, in bytes. |
out | Pointer to a caller-allocated ATX_DataBuffer into which the encrypted data will be stored. If the ATX_DataBuffer is not large enough for the encrypted bytes to fit, this method increases the ATX_DataBuffer size. |
TS2_EXPORT ATX_Result TS2_BbtsBufferEncrypter_ResetDrm | ( | TS2_BbtsBufferEncrypter * | self, |
const char * | content_id, | ||
const ATX_Byte * | content_key | ||
) |
Changes the content ID and content key used to encrypt the data.
any access_criteria that were set previously remain unaffected
self | The TS2_BbtsBufferEncrypter object. |
content_id | A BBTS-compatible content ID. |
content_key | A 16-byte content key. |
TS2_EXPORT ATX_Result TS2_BbtsBufferEncrypter_ResetDrmEx | ( | TS2_BbtsBufferEncrypter * | self, |
const char * | content_id, | ||
const ATX_Byte * | content_key, | ||
const ATX_Byte * | access_criteria, | ||
ATX_Size | access_criteria_size | ||
) |
Changes the content ID, content key used to encrypt the data, and the access_criteria loop.
if the optional access_criteria parameters are passed, in case no access_criteria existed previously these new parameters take effect
if there were some access_criteria set before, those are removed and the new parameter value takes effect.
if NULL is passed for the access_criteria parameter, and 0 is passed for access_criteria_size any access_criteria that were set previously are removed
self | The TS2_BbtsBufferEncrypter object. |
content_id | A BBTS-compatible content ID. |
content_key | A 16-byte content key. |
access_criteria | Buffer containing access criteria block (Optional) |
access_criteria_size | Size of access_criteria buffer (Optional) |