Wasabi ExpressPlay SDK for Embedded Systems
1.23.0
|
Wasabi license retrieval and consumption. More...
Functions | |
WSB_EXPORT WSB_Result | WSB_RightsEnabler_Create (WSB_RightsEnabler_EventListener listener, WSB_RightsEnabler **rights_enabler) |
Creates an instance of a WSB_RightsEnabler object. More... | |
WSB_EXPORT WSB_Result | WSB_RightsEnabler_SetOptions (WSB_RightsEnabler *rights_enabler, WSB_UInt32 option_flags) |
Sets the options flags (WSB_RIGHTSENABLER_OPTION_FLAG*). More... | |
WSB_EXPORT WSB_Result | WSB_RightsEnabler_EnableMediaFile (WSB_RightsEnabler *rights_enabler, WSB_MediaFile *file, const char **content_ids, WSB_Cardinal content_ids_count, const void *license_data, WSB_Size license_data_size) |
Tries all available avenues to obtain a working license for the content with the specified content IDs. More... | |
WSB_EXPORT WSB_Result | WSB_RightsEnabler_EnableContentId (WSB_RightsEnabler *rights_enabler, const char *content_id, const char *sla_url, const void *license_data, WSB_Size license_data_size) |
Tries all available avenues to obtain a working license for the content with the specified content ID. More... | |
WSB_EXPORT WSB_Result | WSB_RightsEnabler_Destroy (WSB_RightsEnabler *rights_enabler) |
Releases an instance of a WSB_RightsEnabler object. More... | |
Wasabi license retrieval and consumption.
WSB_EXPORT WSB_Result WSB_RightsEnabler_Create | ( | WSB_RightsEnabler_EventListener | listener, |
WSB_RightsEnabler ** | rights_enabler | ||
) |
Creates an instance of a WSB_RightsEnabler object.
listener | An object that will receive various notification events during a WSB_RightsEnabler_EnableMediaFile or WSB_RightsEnabler_EnableContentId call. |
rights_enabler | Address of a WSB_RightsEnabler pointer that will be set to refer to the WSB_RightsEnabler object created. |
WSB_EXPORT WSB_Result WSB_RightsEnabler_Destroy | ( | WSB_RightsEnabler * | rights_enabler | ) |
Releases an instance of a WSB_RightsEnabler object.
rights_enabler | The WSB_RightsEnabler to release. |
WSB_EXPORT WSB_Result WSB_RightsEnabler_EnableContentId | ( | WSB_RightsEnabler * | rights_enabler, |
const char * | content_id, | ||
const char * | sla_url, | ||
const void * | license_data, | ||
WSB_Size | license_data_size | ||
) |
Tries all available avenues to obtain a working license for the content with the specified content ID.
This method essentially performs the same actions as WSB_RightsEnabler_EnableMediaFile to find a license, except that in this case, there is no WSB_MediaFile, so no media file-related actions are performed.
This method is useful, for example, for situations where the content ID changes during streaming. It is also useful in situations where a license grants access to content in a media file whose format is not Marlin-defined, enabling an application to use this method to find such a license and subsequently use the Wasabi Key Manager to obtain the content key(s) from the license.
This method will first check the passed-in license (if any), then any license found in the License Store that references the specified content ID. Next, if a subscription has expired, this method will attempt link renewals (e.g., in case the subscription can be automatically renewed). Finally, this method will try to obtain a license through silent license acquisition, using the specified SLA URL(if any), and then check that license and try link renewal.
For every license found, the license data and result of a license evaluation are returned in a WSB_RIGHTSENABLER_EVENT_TYPE_LICENSE event to the listener. The listener may choose to continue the search for a license, by returning WSB_RIGHTSENABLER_CONTINUE_SEARCH or to halt the search by returning WSB_RIGHTSENABLER_HALT_SEARCH. Typically, a caller will halt the search upon receiving a working license.
rights_enabler | The WSB_RightsEnabler object. |
content_id | Content ID. |
sla_url | Optional silent license acquisition URL. |
license_data | An optional license obtained externally. |
license_data_size | Size of license_data, in bytes. |
WSB_EXPORT WSB_Result WSB_RightsEnabler_EnableMediaFile | ( | WSB_RightsEnabler * | rights_enabler, |
WSB_MediaFile * | file, | ||
const char ** | content_ids, | ||
WSB_Cardinal | content_ids_count, | ||
const void * | license_data, | ||
WSB_Size | license_data_size | ||
) |
Tries all available avenues to obtain a working license for the content with the specified content IDs.
This method will first check the passed-in license (if any), then any license found in the passed-in media file (if any), then any license found in the License Store. Next, if a subscription has expired, this method will attempt link renewals (e.g., in case the subscription can be automatically renewed). Finally, this method will try to obtain a license through silent license acquisition and then check that license and try link renewal. For every license found, the license data and result of a license evaluation are returned in a WSB_RIGHTSENABLER_EVENT_TYPE_LICENSE event to the listener. The listener may choose to continue the search for a license, by returning WSB_RIGHTSENABLER_CONTINUE_SEARCH or to halt the search by returning WSB_RIGHTSENABLER_HALT_SEARCH. Typically, a caller will halt the search upon receiving a working license.
rights_enabler | The WSB_RightsEnabler object. |
file | The media file in which the content resides. This may be NULL. |
content_ids | Array of content IDs. |
content_ids_count | Number of content IDs in content_ids. |
license_data | An optional license obtained externally. |
license_data_size | Size of license_data, in bytes. |
WSB_EXPORT WSB_Result WSB_RightsEnabler_SetOptions | ( | WSB_RightsEnabler * | rights_enabler, |
WSB_UInt32 | option_flags | ||
) |
Sets the options flags (WSB_RIGHTSENABLER_OPTION_FLAG*).
By default, all flags are off.
rights_enabler | The WSB_RightsEnabler object. |
option_flags | The option flags. |