Index: ppapi/api/dev/ppp_content_decryption_module_dev.idl |
diff --git a/ppapi/api/dev/ppp_content_decryption_module_dev.idl b/ppapi/api/dev/ppp_content_decryption_module_dev.idl |
new file mode 100644 |
index 0000000000000000000000000000000000000000..293ef6b60d306ea4d9c46becdf85202b7307d298 |
--- /dev/null |
+++ b/ppapi/api/dev/ppp_content_decryption_module_dev.idl |
@@ -0,0 +1,49 @@ |
+/* 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_ContentDecryptionModule_Dev</code> |
+ * interface. |
+ */ |
+label Chrome { |
+ M22 = 0.1 |
+}; |
+ |
+/** |
+ * <code>PPP_ContentDecryptionModule_Dev</code> structure contains the function |
+ * pointers the decryption plugin MUST implement to provide services needed by |
+ * the media stack. |
+ */ |
+interface PPP_ContentDecryptionModule_Dev { |
+ /** |
+ * Provides a key or license to use for decryption. The key determines |
+ * which methods are allowed by the plugin. |
+ */ |
ddorwin
2012/06/06 21:52:52
We'll need GenerateKeyRequest() relatively soon an
Tom Finegan
2012/06/07 00:50:50
How about:
PP_Bool GenerateKeyRequest(
[in]
ddorwin
2012/06/07 18:51:26
Need key_system and init_data.
|
+ PP_Bool AddKey( |
+ [in] PP_Instance instance, |
+ [in] PP_Resource key); |
+ |
+ /** |
+ * Decrypts the block and returns the unencrypted block. |
+ * In the case of media, the block contains encoded data. |
+ * decryptedBlock is valid only after the callback is notified of success. |
ddorwin
2012/06/06 21:52:52
Argument names in comments do not match the argume
Tom Finegan
2012/06/07 00:50:50
Done.
|
+ */ |
+ PP_Bool Decrypt( |
+ [in] PP_Instance instance, |
+ [in] PP_Resource encrypted_block, |
+ [in] PP_Resource decrypted_block, |
+ [in] PP_CompletionCallback callback); |
ddorwin
2012/06/06 21:52:52
I wonder how we can report API-specific errors, su
Tom Finegan
2012/06/07 00:50:50
Yeah, I think that's what we'll have to do if we w
ddorwin
2012/06/07 18:51:26
I'm not sure if anyone actually does this. I think
|
+ |
+ /** |
+ * Decrypts the block then decodes it and returns the raw (decoded) |
+ * unencrypted frame. |
+ * decodedFrame is valid only after the callback is notified of success. |
+ */ |
+ PP_Bool DecryptAndDecode( |
ddorwin
2012/06/06 21:52:52
We're going to need to somehow provide codec infor
|
+ [in] PP_Instance instance, |
+ [in] PP_Resource encrypted_block, |
+ [in] PP_Resource decoded_frame, |
+ [in] PP_CompletionCallback callback); |
+}; |