Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
Functions
WSB_Config_ValidateActionResult Class

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

Detailed Description

Wasabi Action Result Validator API.

Function Documentation

◆ WSB_Config_ValidateActionResult()

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.

Parameters
action_resultThe SHI_ActionResult object.
performSet 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_nameName of the action (e.g. SHI_ACTION_PLAY).
action_parametersAction parameters if any (can be NULL).
Returns
WSB_SUCCESS if the action result validates successfully, WSB_ERROR_DRM_DENY_RIGHTS if the action is not granted, WSB_ERROR_DRM_LICENSE_UNSUPPORTED if the action result contains mandatory callbacks or obligations that are not handled by the application. WSB_ERROR_DRM_BAD_LICENSE_FORMAT if an error occured during the parsing of SHI_ActionResult parsing, WSB_ERROR_INVALID_PARAMETERS if the action_result or action_name is NULL.

◆ WSB_Config_ValidateHdcpSrmUpdate()

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.

Parameters
srm_payloadSRM payload must be persistently stored and used as part of its HDCP implementation.
size_in_bytesSRM payload size in number of bytes.
Returns
WSB_SUCCESS if the device is successfully updated with SRM payload; WSB_ERROR_OC_HDCP_SRM_UPDATE if any part of this SRM update mechanism failed
Since
1.19.0

◆ WSB_Config_ValidateHdcpSrmVersion()

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/

Parameters
version_requiredSRM version required in order to have license granted
Returns
WSB_SUCCESS if the SRM version in the device is as recent as or later than the SRM version required. WSB_ERROR_OC_EARLIER_HDCP_SRM_VERSION if the SRM version in the device is earlier than the SRM version required. WSB_ERROR_OC_HDCP_SRM_NOT_SUPPORTED if the device does not support HDCP-SRM.
Since
1.19.0