Wasabi ExpressPlay SDK for Embedded Systems  1.10
Data Structures | Typedefs | Enumerations | Functions
WsbMediaSegmentDecrypter.h File Reference

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...
 

Detailed Description

Marlin Media Segment Decrypter API.

Since
1.10

Typedef Documentation

Media Segment Decrypter opaque structure.

Enumeration Type Documentation

Media type a decrypter object can be used with.

Since
1.10
Enumerator
WSB_MEDIA_SEGMENT_DECRYPTER_TYPE_HLS 

Function Documentation

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.

Parameters
source_urlthe content URL, must be ms3:// scheme for Marlin MS3 license form, otherwise ignored.
typethe media type.
decrypterpointer to where the pointer to the newly created object is returned.
Since
1.10
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.

Parameters
decrypterpointer to the Media Segment Decrypter object
inpointer 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_sizesize of the 'in' buffer in bytes.
outpointer to the output buffer where the decrypted media data is returned. Must not be NULL.
out_sizean 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.
Since
1.10
WSB_EXPORT WSB_Result WSB_MediaSegmentDecrypter_Destroy ( WSB_MediaSegmentDecrypter decrypter)

Destroy a Media Segment Decrypter object earlier successfully created through WSB_MediaSegmentDecrypter_Create.

Parameters
decrypterpointer to the object being destroyed.
Since
1.10
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.

Parameters
decrypterpointer to the Media Segment Decrypter object
init_datapointer to a media format specific initialization data. For HLS, this must be pointer to a WSB_MediaSegmentDecrypter_HlsInitData object.
Since
1.10