| Index: ppapi/api/dev/ppb_content_decryptor_dev.idl
|
| diff --git a/ppapi/api/dev/ppb_content_decryptor_dev.idl b/ppapi/api/dev/ppb_content_decryptor_dev.idl
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8c7213bb3522ddba74c6a26d55481dd82336f381
|
| --- /dev/null
|
| +++ b/ppapi/api/dev/ppb_content_decryptor_dev.idl
|
| @@ -0,0 +1,158 @@
|
| +/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
| +
|
| +/**
|
| + * This file defines the <code>PPB_ContentDecryptor_Dev</code>
|
| + * interface.
|
| + */
|
| +label Chrome {
|
| + M23 = 0.1
|
| +};
|
| +
|
| +/**
|
| + * <code>PPB_ContentDecryptor_Dev</code> structure contains the function
|
| + * pointers the browser MUST implement to support plugins implementing the
|
| + * <code>PPP_ContentDecryptor_Dev</code> interface.
|
| + */
|
| +interface PPB_ContentDecryptor_Dev {
|
| +
|
| + /**
|
| + * The media stack needs a key to decrypt content, and uses this method to
|
| + * notify the decryptor of the requirement and provide content specific
|
| + * decryptor initialization data. <code>NeedKey</code> is used in the
|
| + * typical playback start up case, after playback resumes, or because a
|
| + * key already in use has expired.
|
| + *
|
| + * @param[in] key_system A <code>PP_Var</code> of type
|
| + * <code>PP_VARTYPE_STRING</code> containing the name of the key system.
|
| + *
|
| + * @param[in] session_id A <code>PP_Var</code> of type
|
| + * <code>PP_VARTYPE_STRING</code> containing the session ID.
|
| + *
|
| + * @param[in] init_data A <code>PP_Var</code> of type
|
| + * <code>PP_VARTYPE_ARRAYBUFFER</code> containing content specific
|
| + * initialization data.
|
| + */
|
| + void NeedKey(
|
| + [in] PP_Instance instance,
|
| + [in] PP_Var key_system,
|
| + [in] PP_Var session_id,
|
| + [in] PP_Var init_data);
|
| +
|
| + /**
|
| + * A key has been added as the result of a call to the <code>AddKey()</code>
|
| + * method on the <code>PPP_ContentDecryptor_Dev</code> interface.
|
| + *
|
| + * @param[in] key_system A <code>PP_Var</code> of type
|
| + * <code>PP_VARTYPE_STRING</code> containing the name of the key system.
|
| + *
|
| + * @param[in] session_id A <code>PP_Var</code> of type
|
| + * <code>PP_VARTYPE_STRING</code> containing the session ID.
|
| + */
|
| + void KeyAdded(
|
| + [in] PP_Instance instance,
|
| + [in] PP_Var key_system,
|
| + [in] PP_Var session_id);
|
| +
|
| + /**
|
| + * A message or request has been generated by or for key_system. For example,
|
| + * a key request has been generated as the result of call to the
|
| + * <code>GenerateKeyRequest()</code> method on the
|
| + * <code>PPP_ContentDecryptor_Dev</code> interface or another message
|
| + * must be sent in response to an <code>AddKey()</code> call. Note that
|
| + * <code>KeyMessage</code> can be used for purposes other than results to
|
| + * <code>AddKey()</code> calls.
|
| + *
|
| + * @param[in] key_system A <code>PP_Var</code> of type
|
| + * <code>PP_VARTYPE_STRING</code> containing the name of the key system.
|
| + *
|
| + * @param[in] session_id A <code>PP_Var</code> of type
|
| + * <code>PP_VARTYPE_STRING</code> containing the session ID.
|
| + *
|
| + * @param[in] resource A <code>PP_Resource</code> corresponding to a
|
| + * <code>PPB_Buffer_Dev</code> resource that contains the message.
|
| + *
|
| + * @param[in] session_id A <code>PP_Var</code> of type
|
| + * <code>PP_VARTYPE_STRING</code> containing the default URL for key system.
|
| + */
|
| + void KeyMessage(
|
| + [in] PP_Instance instance,
|
| + [in] PP_Var key_system,
|
| + [in] PP_Var session_id,
|
| + [in] PP_Resource message,
|
| + [in] PP_Var default_url);
|
| +
|
| + /**
|
| + * An error occurred in a <code>PPP_ContentDecryptor_Dev</code> method,
|
| + * or within the plugin implementing the interface.
|
| + *
|
| + * @param[in] key_system A <code>PP_Var</code> of type
|
| + * <code>PP_VARTYPE_STRING</code> containing the name of the key system.
|
| + *
|
| + * @param[in] session_id A <code>PP_Var</code> of type
|
| + * <code>PP_VARTYPE_STRING</code> containing the session ID.
|
| + *
|
| + * @param[in] media_error A media stack error code.
|
| + *
|
| + * @param[in] system_error A system error code.
|
| + */
|
| + void KeyError(
|
| + [in] PP_Instance instance,
|
| + [in] PP_Var key_system,
|
| + [in] PP_Var session_id,
|
| + [in] int32_t media_error,
|
| + [in] int32_t system_error);
|
| +
|
| + /**
|
| + * Called after the <code>Decrypt</code> method on the
|
| + * <code>PPP_ContentDecryptor_Dev</code> interface completes to
|
| + * deliver decrypted_block to the media stack.
|
| + *
|
| + * @param[in] resource A <code>PP_Resource</code> corresponding to a
|
| + * <code>PPB_Buffer_Dev</code> resource that contains a decrypted data
|
| + * block.
|
| + *
|
| + * @param[in] request_id A value used in <code>ppapi::PluginInstance</code> to
|
| + * match returned decrypted data to a callback sent from the media stack.
|
| + */
|
| + void DeliverBlock(
|
| + [in] PP_Instance instance,
|
| + [in] PP_Resource decrypted_block,
|
| + [in] uint64_t request_id);
|
| +
|
| + /**
|
| + * Called after the <code>DecryptAndDecode</code> method on the
|
| + * <code>PPP_ContentDecryptor_Dev</code> interface completes to
|
| + * deliver decrypted_frame to the media stack.
|
| + *
|
| + * @param[in] resource A <code>PP_Resource</code> corresponding to a
|
| + * <code>PPB_Buffer_Dev</code> resource that contains a decrypted video
|
| + * frame.
|
| + *
|
| + * @param[in] request_id A value used in <code>ppapi::PluginInstance</code> to
|
| + * match returned decrypted data to a callback sent from the media stack.
|
| + */
|
| + void DeliverFrame(
|
| + [in] PP_Instance instance,
|
| + [in] PP_Resource decrypted_frame,
|
| + [in] uint64_t request_id);
|
| +
|
| + /**
|
| + * Called after the <code>DecryptAndDecode</code> method on the
|
| + * <code>PPP_ContentDecryptor_Dev</code> interface completes to
|
| + * deliver decrypted_samples to the media stack.
|
| + *
|
| + * @param[in] resource A <code>PP_Resource</code> corresponding to a
|
| + * <code>PPB_Buffer_Dev</code> resource that contains a decrypted buffer
|
| + * of audio samples.
|
| + *
|
| + * @param[in] request_id A value used in <code>ppapi::PluginInstance</code> to
|
| + * match returned decrypted data to a callback sent from the media stack.
|
| + */
|
| + void DeliverSamples(
|
| + [in] PP_Instance instance,
|
| + [in] PP_Resource decrypted_samples,
|
| + [in] uint64_t request_id);
|
| +};
|
|
|