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

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

Issue 10545036: Add PPAPI decryptor interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes in response to dmichael's comments/xhwang's testing. 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/ppp_content_decryptor_dev.h
diff --git a/ppapi/c/dev/ppp_content_decryptor_dev.h b/ppapi/c/dev/ppp_content_decryptor_dev.h
new file mode 100644
index 0000000000000000000000000000000000000000..3c5513819f7dd7b3ef660dee2ecf83b6fcff6266
--- /dev/null
+++ b/ppapi/c/dev/ppp_content_decryptor_dev.h
@@ -0,0 +1,86 @@
+/* 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/ppp_content_decryptor_dev.idl modified Tue Jul 31 15:15:40 2012. */
+
+#ifndef PPAPI_C_DEV_PPP_CONTENT_DECRYPTOR_DEV_H_
+#define PPAPI_C_DEV_PPP_CONTENT_DECRYPTOR_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 PPP_CONTENTDECRYPTOR_DEV_INTERFACE_0_1 "PPP_ContentDecryptor(Dev);0.1"
+#define PPP_CONTENTDECRYPTOR_DEV_INTERFACE \
+ PPP_CONTENTDECRYPTOR_DEV_INTERFACE_0_1
+
+/**
+ * @file
+ * This file defines the <code>PPP_ContentDecryptor_Dev</code>
+ * interface.
+ */
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+
+/**
+ * <code>PPP_ContentDecryptor_Dev</code> structure contains the function
+ * pointers the decryption plugin MUST implement to provide services needed by
+ * the media stack.
+ */
+struct PPP_ContentDecryptor_Dev_0_1 {
+ /**
+ * Generates a key request. key_system specifies 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 from
+ * the media data that is required for use of the plugin's key system(s).
+ */
+ PP_Bool (*GenerateKeyRequest)(PP_Instance instance,
+ struct PP_Var key_system, /* String. */
+ struct PP_Var init_data); /* ArrayBuffer. */
+
+ /**
+ * Provides a key or license to use for decrypting media data for session_id.
+ */
+ PP_Bool (*AddKey)(PP_Instance instance,
+ struct PP_Var session_id, /* String. */
+ struct PP_Var key); /* ArrayBuffer. */
+
+ /**
+ * Cancels a key request for session_id.
+ */
+ PP_Bool (*CancelKeyRequest)(PP_Instance instance,
+ struct PP_Var session_id); /* String. */
+
+ /**
+ * Decrypts the block and returns the unencrypted block. In the case of
+ * media, the block contains encoded data.
+ */
+ PP_Bool (*Decrypt)(PP_Instance instance,
+ PP_Resource encrypted_block, /* PPB_Buffer. */
+ struct PP_CompletionCallback callback);
+
+ /**
+ * Decrypts the block then decodes it and returns the unencrypted raw
+ * (decoded) frame.
+ */
+ PP_Bool (*DecryptAndDecode)(PP_Instance instance,
+ PP_Resource encrypted_block, /* PPB_Buffer. */
+ struct PP_CompletionCallback callback);
+};
+
+typedef struct PPP_ContentDecryptor_Dev_0_1 PPP_ContentDecryptor_Dev;
+
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_DEV_PPP_CONTENT_DECRYPTOR_DEV_H_ */

Powered by Google App Engine
This is Rietveld 408576698