Wasabi ExpressPlay SDK for iOS
1.10
|
A general Marlin protected data access interface. More...
Data Structures | |
struct | WSB_MediaStreamInterface |
struct | WSB_MediaStream |
union | WSB_MediaStream_FormatInfo |
Source data format information. More... | |
Typedefs | |
typedef struct WSB_MediaStream | WSB_MediaStream |
typedef struct WSB_KeyManager | WSB_MediaStreamKey |
Enumerations | |
enum | WSB_MediaStream_SourceType { WSB_MEDIASTREAM_SOURCE_TYPE_DCF, WSB_MEDIASTREAM_SOURCE_TYPE_AES128CBC } |
Functions | |
WSB_EXPORT WSB_Result | WSB_MediaStream_OpenUrl (const char *source_url, WSB_MediaStream_SourceType source_type, const WSB_MediaStream_FormatInfo *format_info, WSB_MediaStream **stream) |
Open a Marlin protected source. More... | |
WSB_EXPORT WSB_Result | WSB_MediaStream_Open (WSB_MediaStream *source_stream, const WSB_MediaStream_FormatInfo *format_info, WSB_MediaStream **stream) |
Open a Marlin protected source stream. More... | |
WSB_EXPORT WSB_Result | WSB_MediaStream_Read (WSB_MediaStream *self, void *buffer, WSB_Size *read_bytes) |
Read data from a media stream object. More... | |
WSB_EXPORT WSB_Result | WSB_MediaStream_Seek (WSB_MediaStream *self, WSB_Position position) |
Change the current read position for a media stream. More... | |
WSB_EXPORT WSB_Result | WSB_MediaStream_Tell (WSB_MediaStream *self, WSB_Position *position) |
Get the current read position for a media stream. More... | |
WSB_EXPORT WSB_Result | WSB_MediaStream_GetSize (WSB_MediaStream *self, WSB_LargeSize *size) |
Get the size of the media stream in bytes, if known (or an error code if the size is unknown or an error occurs). More... | |
WSB_EXPORT WSB_Result | WSB_MediaStream_GetContentType (WSB_MediaStream *self, const char **content_type) |
Get the content type of the data in the media stream. More... | |
WSB_EXPORT WSB_Result | WSB_MediaStream_GetKey (WSB_MediaStream *self, const WSB_MediaStreamKey **key) |
Extract the crypto context from a Media Stream object. More... | |
WSB_EXPORT WSB_Result | WSB_MediaStream_Close (WSB_MediaStream *self) |
Release a media stream object once it is no longer needed. More... | |
A general Marlin protected data access interface.
typedef struct WSB_MediaStream WSB_MediaStream |
typedef struct WSB_KeyManager WSB_MediaStreamKey |
Enumerator | |
---|---|
WSB_MEDIASTREAM_SOURCE_TYPE_DCF |
Marlin DCF document format. |
WSB_MEDIASTREAM_SOURCE_TYPE_AES128CBC |
See http://www.w3.org/TR/xmlenc-core/#sec-Alg-Block for the encryption format. The IV block of 16 bytes may be prepended to the encrypted block for easy reference, but could also be omitted from the data and provided through the API in the WSB_MediaStream_FormatInfo.generic.iv. |
WSB_EXPORT WSB_Result WSB_MediaStream_Close | ( | WSB_MediaStream * | self | ) |
Release a media stream object once it is no longer needed.
self | the media stream object. |
WSB_EXPORT WSB_Result WSB_MediaStream_GetContentType | ( | WSB_MediaStream * | self, |
const char ** | content_type | ||
) |
Get the content type of the data in the media stream.
If the content type is not known an error code is returned.
self | the media stream object. |
content_type | pointer to where the 0-terminated content type string is returned. The returned string is owned by the media stream object and is valid for the lifetime of the media stream object. |
WSB_EXPORT WSB_Result WSB_MediaStream_GetKey | ( | WSB_MediaStream * | self, |
const WSB_MediaStreamKey ** | key | ||
) |
Extract the crypto context from a Media Stream object.
A new Media Stream object can be constructed efficiently using such crypto context in place of MS3 or BB license.
self | the media stream object. |
key | pointer to an opaque crypto context object pointer. The returned object remains owned by the current Media Stream and remains valid for the duration of the owner Media Stream object. |
WSB_EXPORT WSB_Result WSB_MediaStream_GetSize | ( | WSB_MediaStream * | self, |
WSB_LargeSize * | size | ||
) |
Get the size of the media stream in bytes, if known (or an error code if the size is unknown or an error occurs).
self | the media stream object. |
size | pointer to where the media stream size is returned. |
WSB_EXPORT WSB_Result WSB_MediaStream_Open | ( | WSB_MediaStream * | source_stream, |
const WSB_MediaStream_FormatInfo * | format_info, | ||
WSB_MediaStream ** | stream | ||
) |
Open a Marlin protected source stream.
Returns a WSB_MediaStream object that allows random access to the source data in cleartext. The returned object must be destroyed through WSB_MediaStream_Close.
source_stream | a random access input stream object implementing the WSB_MediaStream_Interface interface. Client must ensure this object exists for the duration of the returned stream object. |
format_info | further information about the source data, that otherwise may not be available in the source data directly. Can be NULL. |
stream | pointer to where the pointer to the newly created object is returned. |
WSB_EXPORT WSB_Result WSB_MediaStream_OpenUrl | ( | const char * | source_url, |
WSB_MediaStream_SourceType | source_type, | ||
const WSB_MediaStream_FormatInfo * | format_info, | ||
WSB_MediaStream ** | stream | ||
) |
Open a Marlin protected source.
Returns a WSB_MediaStream object that allows random access to the source data in cleartext. The returned object must be destroyed through WSB_MediaStream_Close.
source_url | either an ms3:// URL or directly a source file URL (http:// or file://) for BB. |
source_type | the format type of the source data. See WSB_MediaStream_SourceType. |
format_info | further information about the source data, that otherwise may not be available in the source data directly. Can be NULL. |
stream | pointer to where the pointer to the newly created object is returned. |
NOTE: the BB license or MS3 SAS used with MediaStream must relax the default marlin output controls or the content will not be decrypted. This requires the SAS to carry an MS3 extension (of type “wudo”) or a the Marlin Broadband license to indicate a Marlin Broadband output control override (type “urn:marlin:organization:intertrust:wudo”).
WSB_EXPORT WSB_Result WSB_MediaStream_Read | ( | WSB_MediaStream * | self, |
void * | buffer, | ||
WSB_Size * | read_bytes | ||
) |
Read data from a media stream object.
The requested number of bytes and the actually read number of bytes is passed in and returned through *read_bytes. The number of actually read bytes can be less than requested.
At the end of data, WSB_ERROR_EOS is returned.
self | the media stream object. |
buffer | pointer to the data buffer of at least *read_bytes bytes. |
read_bytes | the number of bytes requested as input parameter, the number of bytes actually read as output parameter. |
NOTE: the BB license or MS3 SAS used with MediaStream must relax the default marlin output controls or the content will not be decrypted. This requires the SAS to carry an MS3 extension (of type “wudo”) or a the Marlin Broadband license to indicate a Marlin Broadband output control override (type “urn:marlin:organization:intertrust:wudo”).
WSB_EXPORT WSB_Result WSB_MediaStream_Seek | ( | WSB_MediaStream * | self, |
WSB_Position | position | ||
) |
Change the current read position for a media stream.
self | the media stream object. |
position | the number of bytes from the start of the media stream. |
WSB_EXPORT WSB_Result WSB_MediaStream_Tell | ( | WSB_MediaStream * | self, |
WSB_Position * | position | ||
) |
Get the current read position for a media stream.
self | the media stream object. |
position | pointer to where the current media stream position as the number of bytes from the start of the media stream is returned. |