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

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

Issue 10545036: Add PPAPI decryptor interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix PP_Resource/HostResource usage (hopefully), and update comments. Created 8 years, 4 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
« no previous file with comments | « no previous file | ppapi/api/dev/ppp_content_decryptor_dev.idl » ('j') | ppapi/cpp/dev/content_decryptor_dev.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8b4eaa03eefcb6f39393f94606a93fc832167bef
--- /dev/null
+++ b/ppapi/api/dev/ppb_content_decryptor_dev.idl
@@ -0,0 +1,168 @@
+/* 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>
dmichael (off chromium) 2012/08/08 22:24:02 I talked to Brett about it, and we agreed that thi
Tom Finegan 2012/08/09 22:45:17 Done.
+ * 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. This interface provides
+ * browser side support for v0.1 of the proposed Encrypted Media Extensions:
+ * http://goo.gl/rbdnR
dmichael (off chromium) 2012/08/08 22:24:02 Also please note that this is a special interface,
Tom Finegan 2012/08/09 22:45:17 Done.
+ */
+interface PPB_ContentDecryptor_Dev {
+
+ /**
+ * The decryptor requires a key that has not been provided.
+ *
+ * Sent when the decryptor encounters encrypted content, but it does not have
+ * the key required to decrypt the data. The plugin will call this method in
+ * response to a call to a decrypt method on the
+ * <code>PPP_ContentDecryptor_Dev<code> interface, In response, the browser
+ * must provide a key to the decryptor by calling <code>AddKey()</code> on
dmichael (off chromium) 2012/08/08 22:24:02 How does it do that? The way I was reading the spe
Tom Finegan 2012/08/09 22:45:17 Changed browser to application.
+ * 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.
+ *
+ * @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, and
+ * decryption of content can proceed.
+ *
+ * @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, and needs to
+ * be sent to a key server.
+ *
+ * For example, in response to successful key request generation resulting
+ * from a call to the <code>GenerateKeyRequest()</code> method on the
+ * <code>PPP_ContentDecryptor_Dev</code> interface, the decryptor will send
+ * a key message with the session ID.
+ *
+ * Note that <code>KeyMessage()</code> can be used for purposes other than
+ * responses to <code>GenerateKeyRequest()</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, and decryption cannot
+ * continue.
+ *
+ * @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 browser.
+ *
+ * @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 unique value the user agent can use to associate
+ * decrypted_block with a decrypt call.
+ */
+ 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 browser.
+ *
+ * @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 unique value the user agent can use to associate
+ * decrypted_frame with a decrypt call.
+ */
+ 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 browser.
+ *
+ * @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 unique value the user agent can use to associate
+ * decrypted_samples with a decrypt call.
+ */
+ void DeliverSamples(
+ [in] PP_Instance instance,
+ [in] PP_Resource decrypted_samples,
+ [in] uint64_t request_id);
+};
« no previous file with comments | « no previous file | ppapi/api/dev/ppp_content_decryptor_dev.idl » ('j') | ppapi/cpp/dev/content_decryptor_dev.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698