Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: ppapi/api/dev/ppp_content_decryption_module_dev.idl

Issue 10545036: Add PPAPI decryptor interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implement enough thunk stuff to call into PluginInstance CDM stubs Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..1c34235a1ae31d4e167c6842335179221ffdee85
--- /dev/null
+++ b/ppapi/api/dev/ppp_content_decryption_module_dev.idl
@@ -0,0 +1,67 @@
+/* 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 {
+ /**
+ * Generates a key request. key_system is an optional param that is used
ddorwin 2012/07/13 19:19:48 I think KS should be required (at least for the ca
Tom Finegan 2012/07/17 01:11:10 Dropped the bit about it being optional.
+ * to specify the key or licensing system from which to request the key when
+ * the plugin provides access to multiple systems. init_data is a data
+ * buffer containing initialization data for the key system(s) implemented
ddorwin 2012/07/13 19:19:48 s/for..../from the media data./
Tom Finegan 2012/07/17 01:11:10 Done.
+ * by the plugin. response is a data buffer filled only when callback is
ddorwin 2012/07/13 19:19:48 remove response sentence.
Tom Finegan 2012/07/17 01:11:10 Done.
+ * notified of success.
+ */
+ PP_Bool GenerateKeyRequest(
+ [in] PP_Instance instance,
+ [in] PP_Var key_system,
+ [in] PP_Resource init_data);
+
+ /**
+ * Provides a key or license to use for decrypting media data for session_id.
+ */
+ PP_Bool AddKey(
+ [in] PP_Instance instance,
+ [in] PP_Var session_id,
+ [in] PP_Resource key);
+
+ /**
+ * Cancels a key request for session_id.
+ */
+ PP_Bool CancelKeyRequest(
+ [in] PP_Instance instance,
+ [in] PP_Var session_id);
+
+ /**
+ * Decrypts the block and returns the unencrypted block.
+ * In the case of media, the block contains encoded data.
+ * decrypted_block is valid only after the callback is notified of success.
+ */
+ PP_Bool Decrypt(
+ [in] PP_Instance instance,
+ [in] PP_Resource encrypted_block,
+ [in] PP_CompletionCallback callback);
+
+ /**
+ * Decrypts the block then decodes it and returns the raw (decoded)
+ * unencrypted frame.
ddorwin 2012/07/13 19:19:48 Move unencrypted before raw.
Tom Finegan 2012/07/17 01:11:10 Done.
+ * decoded_frame is valid only after the callback is notified of success.
+ */
+ PP_Bool DecryptAndDecode(
+ [in] PP_Instance instance,
+ [in] PP_Resource encrypted_block,
+ [in] PP_CompletionCallback callback);
+};

Powered by Google App Engine
This is Rietveld 408576698