Index: ppapi/api/private/ppp_content_decryptor_private.idl |
diff --git a/ppapi/api/private/ppp_content_decryptor_private.idl b/ppapi/api/private/ppp_content_decryptor_private.idl |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8e4e2ed98dd3291e202aad81823e18b9c17a13e6 |
--- /dev/null |
+++ b/ppapi/api/private/ppp_content_decryptor_private.idl |
@@ -0,0 +1,113 @@ |
+/* 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>PPP_ContentDecryptor_Private</code> |
+ * interface. |
+ */ |
+label Chrome { |
+ M23 = 0.1 |
+}; |
+ |
+/** |
+ * <code>PPP_ContentDecryptor_Private</code> structure contains the function |
+ * pointers the decryption plugin MUST implement to provide services needed by |
+ * the user agent. This interface provides the plugin side support for v0.1 of |
ddorwin
2012/08/11 22:08:57
... support for the CDM for...
ddorwin
2012/08/11 22:08:57
Throughout this file:
s/user agent/browser/?
"use
Tom Finegan
2012/08/13 16:27:17
Done, because 'idl$ "user agent"' comes up almost
Tom Finegan
2012/08/13 16:27:17
Done.
|
+ * the proposed Encrypted Media Extensions: http://goo.gl/rbdnR |
+ * |
+ * Note: This is a special interface, only to be used for Content Decryption |
+ * Modules, not normal plugins. |
+ */ |
+interface PPP_ContentDecryptor_Private { |
+ /** |
+ * Generates a key request. key_system specifies the key or licensing system |
ddorwin
2012/08/11 22:08:57
key_system specifies the key or licensing system t
Tom Finegan
2012/08/13 16:27:17
Done.
|
+ * from which to request the key when the plugin provides access to multiple |
+ * systems. init_data is a data buffer containing initialization data from |
ddorwin
2012/08/11 22:08:57
...containing data to use in generating the reques
Tom Finegan
2012/08/13 16:27:17
Done.
|
+ * the media data that is required for use of the plugin's key system(s). |
+ * |
+ * Note: <code>GenerateKeyRequest()</code> is responsible for creating the |
+ * session ID used in other methods on this interface. The session ID will be |
+ * provided to the user agent via <code>KeyMessage()</code> on the |
+ * <code>PPB_ContentDecryptor_Private</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] init_data A <code>PP_Var</code> of type |
+ * <code>PP_VARTYPE_ARRAYBUFFER</code> containing content specific |
ddorwin
2012/08/11 22:08:57
s/content/container/
Tom Finegan
2012/08/13 16:27:17
Done.
|
+ * initialization data. |
+ */ |
+ PP_Bool GenerateKeyRequest( |
+ [in] PP_Instance instance, |
+ [in] PP_Var key_system, |
+ [in] PP_Var init_data); |
+ |
+ /** |
+ * Provides a key or license to the decryptor for decrypting media data in the |
ddorwin
2012/08/11 22:08:57
delete everything after "data."
Tom Finegan
2012/08/13 16:27:17
Done.
|
+ * stream associated with session_id. |
+ * |
+ * @param[in] session_id A <code>PP_Var</code> of type |
+ * <code>PP_VARTYPE_STRING</code> containing the session ID. |
+ * |
+ * @param[in] key A <code>PP_Var</code> of type |
+ * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the decryption key for the |
ddorwin
2012/08/11 22:08:57
key, license, or other message
Tom Finegan
2012/08/13 16:27:17
Done.
|
+ * given session ID. |
+ */ |
+ PP_Bool AddKey( |
+ [in] PP_Instance instance, |
+ [in] PP_Var session_id, |
+ [in] PP_Var key); |
+ |
+ /** |
+ * Cancels a pending key request for the specified session ID. |
+ * |
+ * @param[in] session_id A <code>PP_Var</code> of type |
+ * <code>PP_VARTYPE_STRING</code> containing the session ID. |
+ */ |
+ PP_Bool CancelKeyRequest( |
+ [in] PP_Instance instance, |
+ [in] PP_Var session_id); |
+ |
+ /** |
+ * Decrypts the block and returns the unencrypted block via |
+ * <code>DeliverBlock()</code> on the |
+ * <code>PPB_ContentDecryptor_Private</code> interface. The returned block |
+ * contains encoded data. |
+ * |
+ * @param[in] resource A <code>PP_Resource</code> corresponding to a |
+ * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data |
+ * block. |
+ * |
+ * @param[in] request_id A value used by the user agent to associate data |
+ * returned via the <code>PPB_ContentDecryptor_Private</code> interface with |
+ * decryption method calls. |
+ */ |
+ PP_Bool Decrypt( |
+ [in] PP_Instance instance, |
+ [in] PP_Resource encrypted_block, |
+ [in] uint64_t request_id); |
+ |
+ /** |
+ * Decrypts the block, decodes it, and returns the unencrypted uncompressed |
+ * (decoded) media to the user agent via the |
ddorwin
2012/08/11 22:08:57
remove "to the user agent " or replace user agent
Tom Finegan
2012/08/13 16:27:17
All instances of user agent have been replaced w/b
|
+ * <code>PPB_ContentDecryptor_Private</code> interface. |
+ * |
+ * Note that decrypted and decoded video frames are sent to |
ddorwin
2012/08/11 22:08:57
Remove "Note that ".
Tom Finegan
2012/08/13 16:27:17
Done.
|
+ * <code>DeliverFrame()</code>, while audio samples are sent to |
+ * <code>DeliverSamples()</code>. |
+ * |
+ * @param[in] resource A <code>PP_Resource</code> corresponding to a |
+ * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data |
+ * block. |
+ * |
+ * @param[in] request_id A value used by the user agent to associate data |
+ * returned via the <code>PPB_ContentDecryptor_Private</code> interface with |
+ * decryption method calls. |
+ */ |
+ PP_Bool DecryptAndDecode( |
+ [in] PP_Instance instance, |
+ [in] PP_Resource encrypted_block, |
+ [in] uint64_t request_id); |
+}; |