Wasabi ExpressPlay SDK for Embedded Systems
1.10
|
Marlin Media Segment Decrypter API. More...
#include "WsbTypes.h"
Go to the source code of this file.
Data Structures | |
struct | WSB_MediaSegmentDecrypter_HlsInitData |
The init_data specific to the HLS media format. More... | |
Typedefs | |
typedef struct WSB_MediaSegmentDecrypter | WSB_MediaSegmentDecrypter |
Media Segment Decrypter opaque structure. More... | |
Enumerations | |
enum | WSB_MediaSegmentDecrypterType { WSB_MEDIA_SEGMENT_DECRYPTER_TYPE_HLS = 0 } |
Media type a decrypter object can be used with. More... | |
Functions | |
WSB_EXPORT WSB_Result | WSB_MediaSegmentDecrypter_Create (const char *source_url, WSB_MediaSegmentDecrypterType type, WSB_MediaSegmentDecrypter **decrypter) |
Create a new instance of the Media Segment Decrypter object. More... | |
WSB_EXPORT WSB_Result | WSB_MediaSegmentDecrypter_Destroy (WSB_MediaSegmentDecrypter *decrypter) |
Destroy a Media Segment Decrypter object earlier successfully created through WSB_MediaSegmentDecrypter_Create. More... | |
WSB_EXPORT WSB_Result | WSB_MediaSegmentDecrypter_Init (WSB_MediaSegmentDecrypter *decrypter, const void *init_data) |
Initialize decrypter for a new segment. More... | |
WSB_EXPORT WSB_Result | WSB_MediaSegmentDecrypter_Decrypt (WSB_MediaSegmentDecrypter *decrypter, const WSB_UInt8 *in, unsigned int in_size, WSB_UInt8 *out, unsigned int *out_size) |
Perform decryption of a media buffer. More... | |
Marlin Media Segment Decrypter API.
typedef struct WSB_MediaSegmentDecrypter WSB_MediaSegmentDecrypter |
Media Segment Decrypter opaque structure.
WSB_EXPORT WSB_Result WSB_MediaSegmentDecrypter_Create | ( | const char * | source_url, |
WSB_MediaSegmentDecrypterType | type, | ||
WSB_MediaSegmentDecrypter ** | decrypter | ||
) |
Create a new instance of the Media Segment Decrypter object.
The object must be destroyed through a call to WSB_MediaSegmentDecrypter_Destroy once no longer needed.
source_url | the content URL, must be ms3:// scheme for Marlin MS3 license form, otherwise ignored. |
type | the media type. |
decrypter | pointer to where the pointer to the newly created object is returned. |
WSB_EXPORT WSB_Result WSB_MediaSegmentDecrypter_Decrypt | ( | WSB_MediaSegmentDecrypter * | decrypter, |
const WSB_UInt8 * | in, | ||
unsigned int | in_size, | ||
WSB_UInt8 * | out, | ||
unsigned int * | out_size | ||
) |
Perform decryption of a media buffer.
The decryptor may return less data than passed in. A final call must be made with NULL input buffer in order to flush the decrypter and receive any de-padded final bytes.
decrypter | pointer to the Media Segment Decrypter object |
in | pointer to the media data to be decrypted. Can be NULL to signal end of a segment, flush decrypter and receive any buffered decrypted data. |
in_size | size of the 'in' buffer in bytes. |
out | pointer to the output buffer where the decrypted media data is returned. Must not be NULL. |
out_size | an input and output parameter describing the 'out' buffer size. As an input parameter, declares the total size of the 'out' buffer. As an output parameter, contains the amount of data written to the 'out' buffer, in bytes. When the 'in' parameter is NULL and '*out_size' returned is less than '*out_size' passed in, the decrypter has been flushed of any buffered media data. |
WSB_EXPORT WSB_Result WSB_MediaSegmentDecrypter_Destroy | ( | WSB_MediaSegmentDecrypter * | decrypter | ) |
Destroy a Media Segment Decrypter object earlier successfully created through WSB_MediaSegmentDecrypter_Create.
decrypter | pointer to the object being destroyed. |
WSB_EXPORT WSB_Result WSB_MediaSegmentDecrypter_Init | ( | WSB_MediaSegmentDecrypter * | decrypter, |
const void * | init_data | ||
) |
Initialize decrypter for a new segment.
Must be called before a new segment can start decrypting, but not before any previous segment has been completely decrypted even if no init_data values have changed.
decrypter | pointer to the Media Segment Decrypter object |
init_data | pointer to a media format specific initialization data. For HLS, this must be pointer to a WSB_MediaSegmentDecrypter_HlsInitData object. |