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

Side by Side Diff: ppapi/api/dev/ppp_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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5
6 /**
7 * This file defines the <code>PPP_ContentDecryptor_Dev</code>
8 * interface.
9 */
10 label Chrome {
11 M23 = 0.1
12 };
13
14 /**
15 * <code>PPP_ContentDecryptor_Dev</code> structure contains the function
16 * pointers the decryption plugin MUST implement to provide services needed by
17 * the media stack. This interface provides the plugin side support for v0.1 of
18 * the proposed Encrypted Media Extensions: http://goo.gl/rbdnR
19 */
20 interface PPP_ContentDecryptor_Dev {
21 /**
22 * Generates a key request. key_system specifies the key or licensing system
23 * from which to request the key when the plugin provides access to multiple
24 * systems. init_data is a data buffer containing initialization data from
25 * the media data that is required for use of the plugin's key system(s).
26 * Note: <code>GenerateKeyRequest</code> is responsible for creating the
27 * session ID.
28 *
29 * @param[in] key_system A <code>PP_Var</code> of type
30 * <code>PP_VARTYPE_STRING</code> containing the name of the key system.
31 *
32 * @param[in] init_data A <code>PP_Var</code> of type
33 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing content specific
34 * initialization data.
35 */
36 PP_Bool GenerateKeyRequest(
37 [in] PP_Instance instance,
38 [in] PP_Var key_system,
39 [in] PP_Var init_data);
40
41 /**
42 * Provides a key or license to use for decrypting media data for session_id.
43 *
44 * @param[in] session_id A <code>PP_Var</code> of type
45 * <code>PP_VARTYPE_STRING</code> containing the session ID.
46 *
47 * @param[in] key A <code>PP_Var</code> of type
48 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the decryption key for the
49 * given session ID.
50 */
51 PP_Bool AddKey(
52 [in] PP_Instance instance,
53 [in] PP_Var session_id,
54 [in] PP_Var key);
55
56 /**
57 * Cancels a pending key request for session_id.
58 *
59 * @param[in] session_id A <code>PP_Var</code> of type
60 * <code>PP_VARTYPE_STRING</code> containing the session ID.
61 */
62 PP_Bool CancelKeyRequest(
63 [in] PP_Instance instance,
64 [in] PP_Var session_id);
65
66 /**
67 * Decrypts the block and returns the unencrypted block via
68 * <code>DeliverBlock</code> on the <code>PPB_ContentDecryptor_Dev</code>
69 * interface. In the case of media, the block contains encoded data.
70 *
71 * @param[in] resource A <code>PP_Resource</code> corresponding to a
72 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data
73 * block.
74 *
75 * @param[in] request_id A value used in <code>ppapi::PluginInstance</code> to
76 * match returned decrypted data to a callback sent from the media stack.
77 */
78 PP_Bool Decrypt(
79 [in] PP_Instance instance,
80 [in] PP_Resource encrypted_block,
81 [in] uint64_t request_id);
82
83 /**
84 * Decrypts the block then decodes it and returns the unencrypted raw
85 * (decoded) frame.
86 *
87 * @param[in] resource A <code>PP_Resource</code> corresponding to a
88 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data
89 * block.
90 *
91 * @param[in] request_id A value used in <code>ppapi::PluginInstance</code> to
92 * match returned decrypted data to a callback sent from the media stack.
93 */
94 PP_Bool DecryptAndDecode(
95 [in] PP_Instance instance,
96 [in] PP_Resource encrypted_block,
97 [in] uint64_t request_id);
98 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698