Wasabi ExpressPlay SDK for Embedded Systems
1.23.0
|
Wasabi Action Result Validator API. More...
Functions | |
WSB_EXPORT WSB_Result | WSB_Config_ValidateActionResult (SHI_ActionResult *action_result, WSB_Boolean perform, const char *action_name, const void *action_parameters) |
This method should be called between WSB_PlaybackEnabler_PerformPlayAction and WSB_PlaybackEnabler_AcceptActionResult with perform set to WSB_TRUE and action_name set to SHI_ACTION_PLAY. More... | |
WSB_EXPORT WSB_Result | WSB_Config_ValidateHdcpSrmVersion (WSB_UInt32 version_required) |
User must implement this callback function to compare the HDCP-SRM version in the device with the required HDCP-SRM version from the license. More... | |
WSB_EXPORT WSB_Result | WSB_Config_ValidateHdcpSrmUpdate (const WSB_Byte *srm_payload, WSB_Size size_in_bytes) |
User must implement this callback function to persistently store the HDCP-SRM and use it as part of its HDCP implementation. More... | |
Wasabi Action Result Validator API.
WSB_EXPORT WSB_Result WSB_Config_ValidateActionResult | ( | SHI_ActionResult * | action_result, |
WSB_Boolean | perform, | ||
const char * | action_name, | ||
const void * | action_parameters | ||
) |
This method should be called between WSB_PlaybackEnabler_PerformPlayAction and WSB_PlaybackEnabler_AcceptActionResult with perform set to WSB_TRUE and action_name set to SHI_ACTION_PLAY.
It is also called in WSB_(Rights|Playback)Enabler_EnableMediaFile method as part of the search for a valid license with perform set to WSB_FALSE and action_name set to SHI_ACTION_PLAY.
The implementation of this method should check the SHI_ActionResult to determine whether the action is granted or not. If it's not granted, the method should return a WSB_ERROR_DRM_DENY_RIGHTS code indicating that the player application should not proceed. If the action is granted, the method should check the SHI_ActionResultfor obligations and callbacks and only return WSB_SUCCESS if the application is prepared to handle all the mandatory obligations and callbacks. The WSB_ActionResultInfo API can be used to help parse the SHI_ActionResult and determine what constraints are present and what the details of those constraints are. If any of these constraints are not supported, a WSB_ERROR_DRM_LICENSE_UNSUPPORTED error code should be returned. If any SHI_ActionResult parsing error occurs, a WSB_ERROR_DRM_BAD_LICENSE_FORMAT should be returned.
There is a default implementation of this method provided in: $WASABI_HOME/Source/Config/Validator/Default/ and a sample of a more complicated validator in: $WASABI_HOME/Source/Config/Validator/Sample/
In most cases, the application writer will need to provide an application- specific version of this method that can interact with the application environment to satisfy any obligations and callbacks.
action_result | The SHI_ActionResult object. |
perform | Set to WSB_FALSE if the action result is the output of SHI_Action_Check call. Set to WSB_TRUE if from a SHI_Action_Perform call. |
action_name | Name of the action (e.g. SHI_ACTION_PLAY). |
action_parameters | Action parameters if any (can be NULL). |
WSB_EXPORT WSB_Result WSB_Config_ValidateHdcpSrmUpdate | ( | const WSB_Byte * | srm_payload, |
WSB_Size | size_in_bytes | ||
) |
User must implement this callback function to persistently store the HDCP-SRM and use it as part of its HDCP implementation.
This function is called by WSB_ActionResultInfo_CheckHdcpSrm in WSB_Config_ValidateActionResult function.
In the case where WSB_Config_ValidateHdcpSrmVersion function returns WSB_ERROR_OC_EARLIER_HDCP_SRM_VERSION, WSB_ActionResultInfo_CheckHdcpSrm will download the HDCP-SRM from the URL signaled in the license, check if the received payload's SHA-256 digest matches the digest field signaled in the license, and call this function to update the device SRM.
There is a default implementation of this method provided in: $WASABI_HOME/Source/Config/Validator/Default/ for device that does not support HDCP-SRM mandatory output control obligation and a HDCP-SRM sample validator for device that does support HDCP-SRM mandatory output control obligation in: $WASABI_HOME/Source/Config/Validator/HdcpSrm/
If any part of this SRM update mechanism fails (failure to acquire the SRM, digest mismatch, failure to process the SRM by the platform), the obligation in the license will be considered unmet and the permission to proceed will not be granted to the caller.
srm_payload | SRM payload must be persistently stored and used as part of its HDCP implementation. |
size_in_bytes | SRM payload size in number of bytes. |
WSB_EXPORT WSB_Result WSB_Config_ValidateHdcpSrmVersion | ( | WSB_UInt32 | version_required | ) |
User must implement this callback function to compare the HDCP-SRM version in the device with the required HDCP-SRM version from the license.
This function is called by WSB_ActionResultInfo_CheckHdcpSrm in WSB_Config_ValidateActionResult function.
There is a default implementation of this method provided in: $WASABI_HOME/Source/Config/Validator/Default/ for device that does not support HDCP-SRM mandatory output control obligation and a HDCP-SRM sample validator for device that does support HDCP-SRM mandatory output control obligation in: $WASABI_HOME/Source/Config/Validator/HdcpSrm/
version_required | SRM version required in order to have license granted |