#include <ppb_content_decryptor_private.h>
|
void(* | PromiseResolved )(PP_Instance instance, uint32_t promise_id) |
|
void(* | PromiseResolvedWithSession )(PP_Instance instance, uint32_t promise_id, struct PP_Var session_id) |
|
void(* | PromiseRejected )(PP_Instance instance, uint32_t promise_id, PP_CdmExceptionCode exception_code, uint32_t system_code, struct PP_Var error_description) |
|
void(* | SessionMessage )(PP_Instance instance, struct PP_Var session_id, PP_CdmMessageType message_type, struct PP_Var message, struct PP_Var legacy_destination_url) |
|
void(* | SessionKeysChange )(PP_Instance instance, struct PP_Var session_id, PP_Bool has_additional_usable_key, uint32_t key_count, const struct PP_KeyInformation key_information[]) |
|
void(* | SessionExpirationChange )(PP_Instance instance, struct PP_Var session_id, PP_Time new_expiry_time) |
|
void(* | SessionClosed )(PP_Instance instance, struct PP_Var session_id) |
|
void(* | LegacySessionError )(PP_Instance instance, struct PP_Var session_id, PP_CdmExceptionCode exception_code, uint32_t system_code, struct PP_Var error_description) |
|
void(* | DeliverBlock )(PP_Instance instance, PP_Resource decrypted_block, const struct PP_DecryptedBlockInfo *decrypted_block_info) |
|
void(* | DecoderInitializeDone )(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id, PP_Bool success) |
|
void(* | DecoderDeinitializeDone )(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id) |
|
void(* | DecoderResetDone )(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id) |
|
void(* | DeliverFrame )(PP_Instance instance, PP_Resource decrypted_frame, const struct PP_DecryptedFrameInfo *decrypted_frame_info) |
|
void(* | DeliverSamples )(PP_Instance instance, PP_Resource audio_frames, const struct PP_DecryptedSampleInfo *decrypted_sample_info) |
|
PPB_ContentDecryptor_Private
structure contains the function pointers the browser must implement to support plugins implementing the PPP_ContentDecryptor_Private
interface. This interface provides browser side support for the Content Decryption Module (CDM) for Encrypted Media Extensions: http://www.w3.org/TR/encrypted-media/
Called after the DeinitializeDecoder()
method on the PPP_ContentDecryptor_Private
interface completes to report decoder de-initialization completion to the browser.
- Parameters
-
[in] | decoder_type | The PP_DecryptorStreamType passed to DeinitializeDecoder() . |
[in] | request_id | The request_id value passed to DeinitializeDecoder() . |
Called after the InitializeAudioDecoder()
or InitializeVideoDecoder()
method on the PPP_ContentDecryptor_Private
interface completes to report decoder initialization status to the browser.
- Parameters
-
[in] | success | A PP_Bool that is set to PP_TRUE when the decoder initialization request associated with request_id was successful. |
[in] | decoder_type | A PP_DecryptorStreamType identifying the decoder type for which this initialization status response was sent. |
[in] | request_id | The request_id value passed to InitializeAudioDecoder or InitializeVideoDecoder in PP_AudioDecoderConfig or PP_VideoDecoderConfig . |
Called after the ResetDecoder()
method on the PPP_ContentDecryptor_Private
interface completes to report decoder reset completion to the browser.
- Parameters
-
[in] | decoder_type | The PP_DecryptorStreamType passed to ResetDecoder() . |
[in] | request_id | The request_id value passed to ResetDecoder() . |
Called after the Decrypt()
method on the PPP_ContentDecryptor_Private
interface completes to deliver decrypted_block to the browser for decoding and rendering.
The plugin must not hold a reference to the encrypted buffer resource provided to Decrypt()
when it calls this method. The browser will reuse the buffer in a subsequent Decrypt()
call.
- Parameters
-
[in] | decrypted_block | A PP_Resource corresponding to a PPB_Buffer_Dev resource that contains a decrypted data block. |
[in] | decrypted_block_info | A PP_DecryptedBlockInfo that contains the result code and tracking info associated with the decrypted_block . |
Called after the DecryptAndDecode()
method on the PPP_ContentDecryptor_Private
interface completes to deliver a decrypted and decoded video frame to the browser for rendering.
The plugin must not hold a reference to the encrypted buffer resource provided to DecryptAndDecode()
when it calls this method. The browser will reuse the buffer in a subsequent DecryptAndDecode()
call.
- Parameters
-
[in] | decrypted_frame | A PP_Resource corresponding to a PPB_Buffer_Dev resource that contains a video frame. |
[in] | decrypted_frame_info | A PP_DecryptedFrameInfo that contains the result code, tracking info, and buffer format associated with decrypted_frame . |
Called after the DecryptAndDecode()
method on the PPP_ContentDecryptor_Private
interface completes to deliver a buffer of decrypted and decoded audio samples to the browser for rendering.
The plugin must not hold a reference to the encrypted buffer resource provided to DecryptAndDecode()
when it calls this method. The browser will reuse the buffer in a subsequent DecryptAndDecode()
call.
audio_frames
can contain multiple audio output buffers. Each buffer is serialized in this format:
|<----------------— serialized audio buffer ----------------—>| | int64_t timestamp | int64_t length | length bytes of audio data |
For example, with three audio output buffers, |audio_frames| will look like this:
|<-------------— audio_frames ---------------—>| | audio buffer 0 | audio buffer 1 | audio buffer 2 |
- Parameters
-
[in] | audio_frames | A PP_Resource corresponding to a PPB_Buffer_Dev resource that contains a decrypted buffer of decoded audio samples. |
[in] | decrypted_sample_info | A PP_DecryptedSampleInfo that contains the tracking info and result code associated with the decrypted samples. |
An error occurred in a PPP_ContentDecryptor_Private
method, or within the plugin implementing the interface.
- Parameters
-
[in] | session_id | A PP_Var of type PP_VARTYPE_STRING containing the session's ID attribute of the session that caused the error. |
[in] | exception_code | A PP_CdmExceptionCode containing the exception code. |
[in] | system_code | A system error code. |
[in] | error_description | A PP_Var of type PP_VARTYPE_STRING containing the error description. |
void(* PPB_ContentDecryptor_Private_0_14::PromiseRejected)(PP_Instance instance, uint32_t promise_id, PP_CdmExceptionCode exception_code, uint32_t system_code, struct PP_Var error_description) |
A promise has been rejected by the CDM due to an error.
- Parameters
-
[in] | promise_id | Identifies the promise that the CDM rejected. |
[in] | exception_code | A PP_CdmExceptionCode containing the exception code. |
[in] | system_code | A system error code. |
[in] | error_description | A PP_Var of type PP_VARTYPE_STRING containing the error description. |
void(* PPB_ContentDecryptor_Private_0_14::PromiseResolved)(PP_Instance instance, uint32_t promise_id) |
A promise has been resolved by the CDM.
- Parameters
-
[in] | promise_id | Identifies the promise that the CDM resolved. |
void(* PPB_ContentDecryptor_Private_0_14::PromiseResolvedWithSession)(PP_Instance instance, uint32_t promise_id, struct PP_Var session_id) |
A promise that resulted in a new session has been resolved by the CDM.
- Parameters
-
[in] | promise_id | Identifies the promise that the CDM resolved. |
[in] | session_id | A PP_Var of type PP_VARTYPE_STRING containing the session's ID attribute. |
void(* PPB_ContentDecryptor_Private_0_14::SessionClosed)(PP_Instance instance, struct PP_Var session_id) |
The session has been closed as the result of a call to the ReleaseSession()
method on the PPP_ContentDecryptor_Private
interface, or due to other factors as determined by the CDM.
- Parameters
-
[in] | session_id | A PP_Var of type PP_VARTYPE_STRING containing the session's ID attribute of the session that is now closed. |
void(* PPB_ContentDecryptor_Private_0_14::SessionExpirationChange)(PP_Instance instance, struct PP_Var session_id, PP_Time new_expiry_time) |
The expiration time for a session has changed.
- Parameters
-
[in] | session_id | A PP_Var of type PP_VARTYPE_STRING containing the ID of the session that has a new expiration time. |
[in] | new_expiry_time | A PP_Time indicating the new expiry time of the session. The value is defined as the number of seconds since the Epoch (00:00:00 UTC, January 1, 1970). |
void(* PPB_ContentDecryptor_Private_0_14::SessionKeysChange)(PP_Instance instance, struct PP_Var session_id, PP_Bool has_additional_usable_key, uint32_t key_count, const struct PP_KeyInformation key_information[]) |
The keys for a session have changed.
- Parameters
-
[in] | session_id | A PP_Var of type PP_VARTYPE_STRING containing the ID of the session that has a change in keys. |
[in] | has_additional_usable_key | A PP_Bool indicating if a new usable key has been added. |
[in] | key_count | The number of arguments contained in key_information |
[in] | key_information | An array of type PP_KeyInformation that are the session's key IDs and their status. |
A message or request has been generated for key_system in the CDM, and must be sent to the web application.
For example, when the browser invokes CreateSession()
on the PPP_ContentDecryptor_Private
interface, the plugin must send a message containing the license request.
Note that SessionMessage()
can be used for purposes other than responses to CreateSession()
calls. See also the text in the comment for SessionReady()
, which describes a sequence of UpdateSession()
and SessionMessage()
calls required to prepare for decryption.
- Parameters
-
[in] | session_id | A PP_Var of type PP_VARTYPE_STRING containing the ID of a session for which this message is intended. |
[in] | message_type | A PP_CdmMessageType containing the message type. |
[in] | message | A PP_Var of type PP_VARTYPE_ARRAY_BUFFER that contains the message. |
[in] | legacy_destination_url | A PP_Var of type PP_VARTYPE_STRING containing the destination URL for the message. |
The documentation for this struct was generated from the following file: