Pepper_56_C_interfaces
Pepper_56_C_interfaces
|
#include <ppb_output_protection_private.h>
Public Attributes | |
PP_Resource(* | Create )(PP_Instance instance) |
PP_Bool(* | IsOutputProtection )(PP_Resource resource) |
int32_t(* | QueryStatus )(PP_Resource resource, uint32_t *link_mask, uint32_t *protection_mask, struct PP_CompletionCallback callback) |
int32_t(* | EnableProtection )(PP_Resource resource, uint32_t desired_protection_mask, struct PP_CompletionCallback callback) |
The PPB_OutputProtection_Private
interface allows controlling output protection.
Example:
In this example, the plugin wants to enforce HDCP for HDMI link.
After EnableProtection() completes, the plugin has to query protection status periodically to make sure the protection is enabled and remains enabled.
PP_Resource(* PPB_OutputProtection_Private_0_1::Create)(PP_Instance instance) |
Create() creates a new PPB_OutputProtection_Private
object.
[in] instance A PP_Instance
identifying one instance of a module.
PP_Resource
corresponding to a PPB_OutputProtection_Private
if successful, 0 if creation failed. int32_t(* PPB_OutputProtection_Private_0_1::EnableProtection)(PP_Resource resource, uint32_t desired_protection_mask, struct PP_CompletionCallback callback) |
Set desired protection methods.
When the desired protection method(s) have been applied to all applicable output links, the relevant bit(s) of the protection_mask returned by QueryStatus() will be set. Otherwise, the relevant bit(s) of protection_mask will not be set; there is no separate error code or callback.
Protections will be disabled if no longer desired by all instances.
[in] | resource | A PP_Resource corresponding to a PPB_OutputProtection_Private . |
[in] | desired_protection_mask | The desired protection methods, which is a bit-mask of the PP_OutputProtectionMethod_Private values. |
[in] | callback | A PP_CompletionCallback to be called with PP_OK when the protection request has been made. This may be before the protection have actually been applied. Call QueryStatus to get protection status. If it failed to make the protection request, the callback is called with PP_ERROR_FAILED and there is no need to call QueryStatus(). |
pp_errors.h
. PP_Bool(* PPB_OutputProtection_Private_0_1::IsOutputProtection)(PP_Resource resource) |
IsOutputProtection() determines if the provided resource is a PPB_OutputProtection_Private
.
[in] | resource | A PP_Resource corresponding to a PPB_OutputProtection_Private . |
PP_TRUE
if the resource is a PPB_OutputProtection_Private
, PP_FALSE
if the resource is invalid or some type other than PPB_OutputProtection_Private
. int32_t(* PPB_OutputProtection_Private_0_1::QueryStatus)(PP_Resource resource, uint32_t *link_mask, uint32_t *protection_mask, struct PP_CompletionCallback callback) |
Query link status and protection status. Clients have to query status periodically in order to detect changes.
[in] | resource | A PP_Resource corresponding to a PPB_OutputProtection_Private . |
[out] | link_mask | The type of connected output links, which is a bit-mask of the PP_OutputProtectionLinkType_Private values. |
[out] | protection_mask | Enabled protection methods, which is a bit-mask of the PP_OutputProtectionMethod_Private values. |
[in] | callback | A PP_CompletionCallback to run on asynchronous completion of QueryStatus(). This callback will only run if QueryStatus() returns PP_OK_COMPLETIONPENDING . |
pp_errors.h
.