Index: ppapi/c/dev/ppb_content_decryptor_dev.h |
diff --git a/ppapi/c/dev/ppb_content_decryptor_dev.h b/ppapi/c/dev/ppb_content_decryptor_dev.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1a481a94753e9bd667704d763238d74842fb35b2 |
--- /dev/null |
+++ b/ppapi/c/dev/ppb_content_decryptor_dev.h |
@@ -0,0 +1,171 @@ |
+/* 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. |
+ */ |
+ |
+/* From dev/ppb_content_decryptor_dev.idl modified Mon Aug 6 10:13:59 2012. */ |
+ |
+#ifndef PPAPI_C_DEV_PPB_CONTENT_DECRYPTOR_DEV_H_ |
+#define PPAPI_C_DEV_PPB_CONTENT_DECRYPTOR_DEV_H_ |
+ |
+#include "ppapi/c/pp_bool.h" |
+#include "ppapi/c/pp_instance.h" |
+#include "ppapi/c/pp_macros.h" |
+#include "ppapi/c/pp_resource.h" |
+#include "ppapi/c/pp_stdint.h" |
+#include "ppapi/c/pp_var.h" |
+ |
+#define PPB_CONTENTDECRYPTOR_DEV_INTERFACE_0_1 "PPB_ContentDecryptor(Dev);0.1" |
+#define PPB_CONTENTDECRYPTOR_DEV_INTERFACE \ |
+ PPB_CONTENTDECRYPTOR_DEV_INTERFACE_0_1 |
+ |
+/** |
+ * @file |
+ * This file defines the <code>PPB_ContentDecryptor_Dev</code> |
+ * interface. |
+ */ |
+ |
+ |
+/** |
+ * @addtogroup Interfaces |
+ * @{ |
+ */ |
+/** |
+ * <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. |
+ */ |
+struct PPB_ContentDecryptor_Dev_0_1 { |
+ /** |
+ * 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)(PP_Instance instance, |
+ struct PP_Var key_system, |
+ struct PP_Var session_id, |
+ struct 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)(PP_Instance instance, |
+ struct PP_Var key_system, |
+ struct 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)(PP_Instance instance, |
+ struct PP_Var key_system, |
+ struct PP_Var session_id, |
+ PP_Resource message, |
+ struct 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)(PP_Instance instance, |
+ struct PP_Var key_system, |
+ struct PP_Var session_id, |
+ int32_t media_error, |
+ 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)(PP_Instance instance, |
+ PP_Resource decrypted_block, |
+ 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)(PP_Instance instance, |
+ PP_Resource decrypted_frame, |
+ 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)(PP_Instance instance, |
+ PP_Resource decrypted_samples, |
+ uint64_t request_id); |
+}; |
+ |
+typedef struct PPB_ContentDecryptor_Dev_0_1 PPB_ContentDecryptor_Dev; |
+/** |
+ * @} |
+ */ |
+ |
+#endif /* PPAPI_C_DEV_PPB_CONTENT_DECRYPTOR_DEV_H_ */ |
+ |