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

Unified Diff: ppapi/c/dev/ppb_content_decryption_module_dev.h

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/c/dev/ppb_content_decryption_module_dev.h
diff --git a/ppapi/c/dev/ppb_content_decryption_module_dev.h b/ppapi/c/dev/ppb_content_decryption_module_dev.h
new file mode 100644
index 0000000000000000000000000000000000000000..0d398100455738a197562b4cb11f298fb1a518c3
--- /dev/null
+++ b/ppapi/c/dev/ppb_content_decryption_module_dev.h
@@ -0,0 +1,118 @@
+/* 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_decryption_module_dev.idl,
+ * modified Fri Jun 15 08:41:00 2012.
+ */
+
+#ifndef PPAPI_C_DEV_PPB_CONTENT_DECRYPTION_MODULE_DEV_H_
+#define PPAPI_C_DEV_PPB_CONTENT_DECRYPTION_MODULE_DEV_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_completion_callback.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_CONTENTDECRYPTIONMODULE_DEV_INTERFACE_0_1 \
+ "PPB_ContentDecryptionModule(Dev);0.1"
+#define PPB_CONTENTDECRYPTIONMODULE_DEV_INTERFACE \
+ PPB_CONTENTDECRYPTIONMODULE_DEV_INTERFACE_0_1
+
+/**
+ * @file
+ * This file defines the <code>PPP_ContentDecryptionModule_Dev</code>
+ * interface.
+ */
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+
+/**
+ * <code>PPB_ContentDecryptionModule_Dev</code> structure contains the function
+ * pointers the browser may implement to support plugins implementing the
+ * <code>PPP_ContentDecryptionModule_Dev</code> interface.
+ */
+struct PPB_ContentDecryptionModule_Dev_0_1 {
+ /**
+ * A key or license is needed to decrypt media data.
+ */
+ void (*NeedKey)(PP_Instance instance,
+ struct PP_Var key_system,
+ struct PP_Var session_id,
+ PP_Resource init_data);
+
+ /**
+ * A key has been added as the result of a call to the <code>AddKey()</code>
+ * method on the <code>PPP_ContentDecryptionModule_Dev</code> interface.
+ */
+ 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_ContentDecryptionModule_Dev</code> interface, or another message
+ * must be sent in response to an <code>AddKey()</code> call.
+ */
+ 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 occured in a <code>PPP_ContentDecryptionModule_Dev</code> method,
+ * or within the plugin implementing the interface.
+ */
+ void (*KeyError)(PP_Instance instance,
+ struct PP_Var key_system,
+ struct PP_Var session_id,
+ uint16_t media_error,
+ uint16_t system_error);
+
+ /**
+ * Called after the <code>Decrypt</code> method on the
+ * <code>PPP_ContentDecryptionModule_Dev</code> interface completes to
+ * deliver decrypted_block to the media stack.
+ */
+ void (*DeliverBlock)(PP_Instance instance,
+ PP_Resource decrypted_block,
+ struct PP_CompletionCallback callback);
+
+ /**
+ * Called after the <code>DecryptAndDecode</code> method on the
+ * <code>PPP_ContentDecryptionModule_Dev</code> interface completes to
+ * deliver decrypted_frame to the media stack.
+ */
+ void (*DeliverFrame)(PP_Instance instance,
+ PP_Resource decrypted_frame,
+ struct PP_CompletionCallback callback);
+
+ /**
+ * Called after the <code>DecryptAndDecode</code> method on the
+ * <code>PPP_ContentDecryptionModule_Dev</code> interface completes to
+ * deliver decrypted_samples to the media stack.
+ */
+ void (*DeliverSamples)(PP_Instance instance,
+ PP_Resource decrypted_samples,
+ struct PP_CompletionCallback callback);
+};
+
+
+typedef struct PPB_ContentDecryptionModule_Dev_0_1
+ PPB_ContentDecryptionModule_Dev;
+
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_DEV_PPB_CONTENT_DECRYPTION_MODULE_DEV_H_ */

Powered by Google App Engine
This is Rietveld 408576698