Pepper_47_C_interfaces
Public Attributes | List of all members
PPP_ContentDecryptor_Private_0_15 Struct Reference

#include <ppp_content_decryptor_private.h>

Collaboration diagram for PPP_ContentDecryptor_Private_0_15:
Collaboration graph

Public Attributes

void(* Initialize )(PP_Instance instance, uint32_t promise_id, struct PP_Var key_system, PP_Bool allow_distinctive_identifier, PP_Bool allow_persistent_state)
 
void(* SetServerCertificate )(PP_Instance instance, uint32_t promise_id, struct PP_Var server_certificate)
 
void(* CreateSessionAndGenerateRequest )(PP_Instance instance, uint32_t promise_id, PP_SessionType session_type, PP_InitDataType init_data_type, struct PP_Var init_data)
 
void(* LoadSession )(PP_Instance instance, uint32_t promise_id, PP_SessionType session_type, struct PP_Var session_id)
 
void(* UpdateSession )(PP_Instance instance, uint32_t promise_id, struct PP_Var session_id, struct PP_Var response)
 
void(* CloseSession )(PP_Instance instance, uint32_t promise_id, struct PP_Var session_id)
 
void(* RemoveSession )(PP_Instance instance, uint32_t promise_id, struct PP_Var session_id)
 
void(* Decrypt )(PP_Instance instance, PP_Resource encrypted_block, const struct PP_EncryptedBlockInfo *encrypted_block_info)
 
void(* InitializeAudioDecoder )(PP_Instance instance, const struct PP_AudioDecoderConfig *decoder_config, PP_Resource codec_extra_data)
 
void(* InitializeVideoDecoder )(PP_Instance instance, const struct PP_VideoDecoderConfig *decoder_config, PP_Resource codec_extra_data)
 
void(* DeinitializeDecoder )(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id)
 
void(* ResetDecoder )(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id)
 
void(* DecryptAndDecode )(PP_Instance instance, PP_DecryptorStreamType decoder_type, PP_Resource encrypted_buffer, const struct PP_EncryptedBlockInfo *encrypted_block_info)
 

Detailed Description

PPP_ContentDecryptor_Private structure contains the function pointers the decryption plugin must implement to provide services needed by the browser. This interface provides the plugin side support for the Content Decryption Module (CDM) for Encrypted Media Extensions: http://www.w3.org/TR/encrypted-media/

Definition at line 45 of file ppp_content_decryptor_private.h.

Member Data Documentation

void(* PPP_ContentDecryptor_Private_0_15::CloseSession)(PP_Instance instance, uint32_t promise_id, struct PP_Var session_id)

Close the specified session and related resources.

Parameters
[in]promise_idA reference for the promise that gets resolved or rejected depending upon the success or failure of closing the session.
[in]session_idA PP_Var of type PP_VARTYPE_STRING containing the session ID of the session to be closed.

Definition at line 164 of file ppp_content_decryptor_private.h.

void(* PPP_ContentDecryptor_Private_0_15::CreateSessionAndGenerateRequest)(PP_Instance instance, uint32_t promise_id, PP_SessionType session_type, PP_InitDataType init_data_type, struct PP_Var init_data)

Creates a session and subsequently generates a request for a license. init_data_type contains the MIME type of init_data. init_data is a data buffer containing data for use in generating the request.

Note: CreateSessionAndGenerateRequest() must create a session ID and provide it to the browser via SessionCreated() on the PPB_ContentDecryptor_Private interface.

Parameters
[in]promise_idA reference for the promise that gets resolved or rejected depending upon the success or failure when creating the session.
[in]session_typeA PP_SessionType that indicates the type of session to be created.
[in]init_data_typeA PP_InitDataType that indicates the Initialization Data Type for init_data.
[in]init_dataA PP_Var of type PP_VARTYPE_ARRAYBUFFER containing container specific initialization data.

Definition at line 100 of file ppp_content_decryptor_private.h.

void(* PPP_ContentDecryptor_Private_0_15::Decrypt)(PP_Instance instance, PP_Resource encrypted_block, const struct PP_EncryptedBlockInfo *encrypted_block_info)

Decrypts the block and returns the unencrypted block via DeliverBlock() on the PPB_ContentDecryptor_Private interface. The returned block contains encoded data.

Parameters
[in]resourceA PP_Resource corresponding to a PPB_Buffer_Dev resource that contains an encrypted data block.
[in]encrypted_block_infoA PP_EncryptedBlockInfo that contains all auxiliary information needed for decryption of the encrypted_block.

Definition at line 196 of file ppp_content_decryptor_private.h.

void(* PPP_ContentDecryptor_Private_0_15::DecryptAndDecode)(PP_Instance instance, PP_DecryptorStreamType decoder_type, PP_Resource encrypted_buffer, const struct PP_EncryptedBlockInfo *encrypted_block_info)

Decrypts encrypted_buffer, decodes it, and returns the unencrypted uncompressed (decoded) data to the browser via the DeliverFrame() or DeliverSamples() method on the PPB_ContentDecryptor_Private interface.

Parameters
[in]decoder_typeA PP_DecryptorStreamType that specifies the decoder to use after encrypted_buffer is decrypted.
[in]encrypted_bufferA PP_Resource corresponding to a PPB_Buffer_Dev resource that contains encrypted media data.
[in]encrypted_block_infoA PP_EncryptedBlockInfo that contains all auxiliary information needed for decryption of the encrypted_block.

Definition at line 301 of file ppp_content_decryptor_private.h.

void(* PPP_ContentDecryptor_Private_0_15::DeinitializeDecoder)(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id)

De-initializes the decoder for the PP_DecryptorStreamType specified by decoder_type and sets it to an uninitialized state. The decoder can be re-initialized after de-initialization completes by calling InitializeAudioDecoder or InitializeVideoDecoder.

De-initialization completion is reported to the browser using the DecoderDeinitializeDone() method on the PPB_ContentDecryptor_Private interface.

Parameters
[in]decoder_typeA PP_DecryptorStreamType that specifies the decoder to de-initialize.
[in]request_idA request ID that allows the browser to associate a request to de-initialize a decoder with the corresponding call to the DecoderDeinitializeDone() method on the PPB_ContentDecryptor_Private interface.

Definition at line 261 of file ppp_content_decryptor_private.h.

void(* PPP_ContentDecryptor_Private_0_15::Initialize)(PP_Instance instance, uint32_t promise_id, struct PP_Var key_system, PP_Bool allow_distinctive_identifier, PP_Bool allow_persistent_state)

Initialize for the specified key system.

Parameters
[in]promise_idA reference for the promise that gets resolved or rejected depending upon the success or failure of initialization.
[in]key_systemA PP_Var of type PP_VARTYPE_STRING containing the name of the key system.
[in]allow_distinctive_identifierInform the CDM that it may use a distinctive identifier.
[in]allow_persistent_stateInform the CDM that it may use persistent state.

Definition at line 59 of file ppp_content_decryptor_private.h.

void(* PPP_ContentDecryptor_Private_0_15::InitializeAudioDecoder)(PP_Instance instance, const struct PP_AudioDecoderConfig *decoder_config, PP_Resource codec_extra_data)

Initializes the audio decoder using codec and settings in decoder_config, and returns the result of the initialization request to the browser using the DecoderInitializeDone( ) method on the PPB_ContentDecryptor_Private interface.

Parameters
[in]decoder_configA PP_AudioDecoderConfig that contains audio decoder settings and a request ID. The request ID is passed to the DecoderInitializeDone() method on the PPB_ContentDecryptor_Private interface to allow clients to associate the result with a audio decoder initialization request.
[in]codec_extra_dataA PP_Resource corresponding to a PPB_Buffer_Dev resource containing codec setup data required by some codecs. It should be set to 0 when the codec being initialized does not require it.

Definition at line 217 of file ppp_content_decryptor_private.h.

void(* PPP_ContentDecryptor_Private_0_15::InitializeVideoDecoder)(PP_Instance instance, const struct PP_VideoDecoderConfig *decoder_config, PP_Resource codec_extra_data)

Initializes the video decoder using codec and settings in decoder_config, and returns the result of the initialization request to the browser using the DecoderInitializeDone() method on the PPB_ContentDecryptor_Private interface.

Parameters
[in]decoder_configA PP_VideoDecoderConfig that contains video decoder settings and a request ID. The request ID is passed to the DecoderInitializeDone() method on the PPB_ContentDecryptor_Private interface to allow clients to associate the result with a video decoder initialization request.
[in]codec_extra_dataA PP_Resource corresponding to a PPB_Buffer_Dev resource containing codec setup data required by some codecs. It should be set to 0 when the codec being initialized does not require it.

Definition at line 238 of file ppp_content_decryptor_private.h.

void(* PPP_ContentDecryptor_Private_0_15::LoadSession)(PP_Instance instance, uint32_t promise_id, PP_SessionType session_type, struct PP_Var session_id)

Loads a session whose session ID is session_id.

Note: After the session is successfully loaded, the CDM must call SessionCreated() with session_id on the PPB_ContentDecryptor_Private interface.

Parameters
[in]promise_idA reference for the promise that gets resolved or rejected depending upon the success or failure of loading the session.
[in]session_typeA PP_SessionType that indicates the type of session to be loaded.
[in]session_idA PP_Var of type PP_VARTYPE_STRING containing the session ID of the session to load.

Definition at line 122 of file ppp_content_decryptor_private.h.

void(* PPP_ContentDecryptor_Private_0_15::RemoveSession)(PP_Instance instance, uint32_t promise_id, struct PP_Var session_id)

Remove stored data associated with this session.

Parameters
[in]promise_idA reference for the promise that gets resolved or rejected depending upon the success or failure of removing the session data.
[in]session_idA PP_Var of type PP_VARTYPE_STRING containing the session ID of the session to be removed.

Definition at line 179 of file ppp_content_decryptor_private.h.

void(* PPP_ContentDecryptor_Private_0_15::ResetDecoder)(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id)

Resets the decoder for the PP_DecryptorStreamType specified by decoder_type to an initialized clean state. Reset completion is reported to the browser using the DecoderResetDone() method on the PPB_ContentDecryptor_Private interface. This method can be used to signal a discontinuity in the encoded data stream, and is safe to call multiple times.

Parameters
[in]decoder_typeA PP_DecryptorStreamType that specifies the decoder to reset.
[in]request_idA request ID that allows the browser to associate a request to reset the decoder with a corresponding call to the DecoderResetDone() method on the PPB_ContentDecryptor_Private interface.

Definition at line 281 of file ppp_content_decryptor_private.h.

void(* PPP_ContentDecryptor_Private_0_15::SetServerCertificate)(PP_Instance instance, uint32_t promise_id, struct PP_Var server_certificate)

Provides a server certificate to be used to encrypt messages to the license server.

Parameters
[in]promise_idA reference for the promise that gets resolved or rejected depending upon the success or failure of setting the certificate.
[in]server_certificateA PP_Var of type PP_VARTYPE_ARRAYBUFFER containing the certificate to be used.

Definition at line 74 of file ppp_content_decryptor_private.h.

void(* PPP_ContentDecryptor_Private_0_15::UpdateSession)(PP_Instance instance, uint32_t promise_id, struct PP_Var session_id, struct PP_Var response)

Provides a license or other message to the decryptor.

When the CDM needs more information, it must call SessionMessage() on the PPB_ContentDecryptor_Private interface, and the browser must notify the web application. When the CDM has finished processing response and needs no more information, it must call SessionReady() on the PPB_ContentDecryptor_Private interface, and the browser must notify the web application.

Parameters
[in]promise_idA reference for the promise that gets resolved or rejected depending upon the success or failure of updating the session.
[in]session_idA PP_Var of type PP_VARTYPE_STRING containing the session ID of the session to be updated.
[in]responseA PP_Var of type PP_VARTYPE_ARRAYBUFFER containing the license or other message for the given session ID.

Definition at line 149 of file ppp_content_decryptor_private.h.


The documentation for this struct was generated from the following file: