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

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: Add PPB Content Decryptor proxy interface methods. 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.
18 */
19 interface PPP_ContentDecryptor_Dev {
20 /**
21 * Generates a key request. key_system specifies the key or licensing system
22 * from which to request the key when the plugin provides access to multiple
23 * systems. init_data is a data buffer containing initialization data from
24 * the media data that is required for use of the plugin's key system(s).
25 * Note: <code>GenerateKeyRequest</code> is responsible for creating the
26 * session ID.
27 *
28 * @param[in] key_system A <code>PP_Var</code> of type
29 * <code>PP_VARTYPE_STRING</code> containing the name of the key system.
30 *
31 * @param[in] init_data A <code>PP_Var</code> of type
32 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing content specific
33 * initialization data.
34 */
35 PP_Bool GenerateKeyRequest(
36 [in] PP_Instance instance,
37 [in] PP_Var key_system,
38 [in] PP_Var init_data);
39
40 /**
41 * Provides a key or license to use for decrypting media data for session_id.
42 *
43 * @param[in] session_id A <code>PP_Var</code> of type
44 * <code>PP_VARTYPE_STRING</code> containing the session ID.
45 *
46 * @param[in] key A <code>PP_Var</code> of type
47 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the decryption key for the
48 * given session ID.
49 */
50 PP_Bool AddKey(
51 [in] PP_Instance instance,
52 [in] PP_Var session_id,
53 [in] PP_Var key);
54
55 /**
56 * Cancels a pending key request for session_id.
57 *
58 * @param[in] session_id A <code>PP_Var</code> of type
59 * <code>PP_VARTYPE_STRING</code> containing the session ID.
60 */
61 PP_Bool CancelKeyRequest(
62 [in] PP_Instance instance,
63 [in] PP_Var session_id);
64
65 /**
66 * Decrypts the block and returns the unencrypted block via
67 * <code>DeliverBlock</code> on the <code>PPB_ContentDecryptor_Dev</code>
68 * interface. In the case of media, the block contains encoded data.
69 *
70 * @param[in] resource A <code>PP_Resource</code> corresponding to a
71 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data
72 * block.
73 *
74 * @param[in] request_id A value used in <code>ppapi::PluginInstance</code> to
75 * match returned decrypted data to a callback sent from the media stack.
76 */
77 PP_Bool Decrypt(
78 [in] PP_Instance instance,
79 [in] PP_Resource encrypted_block,
80 [in] uint64_t request_id);
81
82 /**
83 * Decrypts the block then decodes it and returns the unencrypted raw
84 * (decoded) frame.
85 *
86 * @param[in] resource A <code>PP_Resource</code> corresponding to a
87 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data
88 * block.
89 *
90 * @param[in] request_id A value used in <code>ppapi::PluginInstance</code> to
91 * match returned decrypted data to a callback sent from the media stack.
92 */
93 PP_Bool DecryptAndDecode(
94 [in] PP_Instance instance,
95 [in] PP_Resource encrypted_block,
96 [in] uint64_t request_id);
97 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698