Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
Typedefs | Functions
Ts2Processors.h File Reference
#include "Atomix.h"
#include "Ts2Protection.h"
#include "Ts2Config.h"

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 Documentation

◆ TS2_BbtsBufferDecrypter

A TS2_BbtsBufferDecrypter object can be used to decrypt BBTS content to obtain MPEG-2 TS content.

◆ TS2_BbtsBufferEncrypter

A TS2_BbtsBufferEncrypter object can be used to encrypt MPEG-2 TS content to obtain BBTS content.

Function Documentation

◆ TS2_BbtsBufferDecrypter_Create()

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.

Parameters
crypto_interfacePointer to a TS2_CryptoInterface implementation providing cryptographic functionality that may be needed by the TS2_BbtsBufferDecrypter.
decrypterAddress of a TS2_BbtsBufferDecrypter pointer that will be set to refer to the TS2_BbtsBufferDecrypter object created.
Returns
ATX_SUCCESS, or a specific error code in the case of failure.

◆ TS2_BbtsBufferDecrypter_DecryptBuffer()

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.

Parameters
selfThe TS2_BbtsBufferDecrypter object used to decrypt the supplied buffer of data.
inData to decrypt.
in_sizeSize of the data to decrypt, in bytes.
outPointer 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.
Returns
ATX_SUCCESS, or a specific error code in the case of failure.

◆ TS2_BbtsBufferDecrypter_Destroy()

TS2_EXPORT ATX_Result TS2_BbtsBufferDecrypter_Destroy ( TS2_BbtsBufferDecrypter self)

Destroys the specified TS2_BbtsBufferDecrypter object.

Parameters
selfThe TS2_BbtsBufferDecrypter object.

◆ TS2_BbtsBufferEncrypter_Create()

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.

Parameters
content_idA BBTS-compatible content ID.
content_keyA 16-byte content key.
common_ivA 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.
protectionthe traffic protection system.
crypto_periodCrypto period in seconds, between 1 and 120.
rights_issuer_urlURI template for the rights issuer.
silent_rights_urlURI template for silent rights acquisition.
preview_rights_urlURI template for preview rights acquisition.
skip_payload_unit_startIf ATX_TRUE, the encrypter will not encrypt packets that have the payload unit start indicator flag set.
single_key_layerIf ATX_TRUE, the encrypter will use the single-key-layer mode. In this case, the common_iv parameter is ignored.
access_criteriaBuffer containing access criteria block (Optional)
access_criteria_sizeSize of access_criteria buffer (Optional)
encrypterAddress of a TS2_BbtsBufferEncrypter pointer that will be set to refer to the TS2_BbtsBufferEncrypter object created.
Returns
ATX_SUCCESS, or a specific error code in the case of failure.

◆ TS2_BbtsBufferEncrypter_Destroy()

TS2_EXPORT ATX_Result TS2_BbtsBufferEncrypter_Destroy ( TS2_BbtsBufferEncrypter self)

Destroys the specified TS2_BbtsBufferEncrypter object.

Parameters
selfThe TS2_BbtsBufferEncrypter object.

◆ TS2_BbtsBufferEncrypter_EncryptBuffer()

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.

Parameters
selfThe TS2_BbtsBufferEncrypter object used to encrypt the supplied buffer of data.
inData to encrypt.
in_sizeSize of the data to encrypt, in bytes.
outPointer 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.
Returns
ATX_SUCCESS, or a specific error code in the case of failure.

◆ TS2_BbtsBufferEncrypter_ResetDrm()

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

Parameters
selfThe TS2_BbtsBufferEncrypter object.
content_idA BBTS-compatible content ID.
content_keyA 16-byte content key.
Returns
ATX_SUCCESS, or a specific error code in the case of failure.

◆ TS2_BbtsBufferEncrypter_ResetDrmEx()

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

Parameters
selfThe TS2_BbtsBufferEncrypter object.
content_idA BBTS-compatible content ID.
content_keyA 16-byte content key.
access_criteriaBuffer containing access criteria block (Optional)
access_criteria_sizeSize of access_criteria buffer (Optional)
Returns
ATX_SUCCESS, or a specific error code in the case of failure.