OLD | NEW |
---|---|
(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_Private</code> | |
8 * interface. | |
9 */ | |
10 label Chrome { | |
11 M23 = 0.1 | |
12 }; | |
13 | |
14 /** | |
15 * <code>PPP_ContentDecryptor_Private</code> structure contains the function | |
16 * pointers the decryption plugin MUST implement to provide services needed by | |
17 * the browser. This interface provides the plugin side support for the CDM for | |
18 * v0.1 of the proposed Encrypted Media Extensions: http://goo.gl/rbdnR | |
19 * | |
20 * Note: This is a special interface, only to be used for Content Decryption | |
21 * Modules, not normal plugins. | |
dmichael (off chromium)
2012/08/14 16:54:12
I think it would still be useful to have a note li
| |
22 */ | |
23 interface PPP_ContentDecryptor_Private { | |
24 /** | |
25 * Generates a key request. key_system specifies the key or licensing system | |
26 * to use. init_data is a data buffer containing data for use in generating | |
27 * the request. | |
28 * | |
29 * Note: <code>GenerateKeyRequest()</code> is responsible for creating the | |
30 * session ID used in other methods on this interface. The session ID will be | |
dmichael (off chromium)
2012/08/14 03:31:37
active voice... "The CDM [should|must] provide th
Tom Finegan
2012/08/14 16:39:40
Done.
| |
31 * provided to the browser via <code>KeyMessage()</code> on the | |
32 * <code>PPB_ContentDecryptor_Private</code> interface. | |
33 * | |
34 * @param[in] key_system A <code>PP_Var</code> of type | |
35 * <code>PP_VARTYPE_STRING</code> containing the name of the key system. | |
36 * | |
37 * @param[in] init_data A <code>PP_Var</code> of type | |
38 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific | |
39 * initialization data. | |
40 */ | |
41 PP_Bool GenerateKeyRequest( | |
42 [in] PP_Instance instance, | |
43 [in] PP_Var key_system, | |
44 [in] PP_Var init_data); | |
45 | |
46 /** | |
47 * Provides a key or license to the decryptor for decrypting media data. | |
dmichael (off chromium)
2012/08/14 03:31:37
Does the CDM call back to the browser at all for t
Tom Finegan
2012/08/14 16:39:40
Done.
| |
48 * | |
49 * @param[in] session_id A <code>PP_Var</code> of type | |
50 * <code>PP_VARTYPE_STRING</code> containing the session ID. | |
51 * | |
52 * @param[in] key A <code>PP_Var</code> of type | |
53 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the decryption key, license, | |
54 * or other message for the given session ID. | |
55 */ | |
56 PP_Bool AddKey( | |
57 [in] PP_Instance instance, | |
58 [in] PP_Var session_id, | |
59 [in] PP_Var key); | |
60 | |
61 /** | |
62 * Cancels a pending key request for the specified session ID. | |
63 * | |
64 * @param[in] session_id A <code>PP_Var</code> of type | |
65 * <code>PP_VARTYPE_STRING</code> containing the session ID. | |
66 */ | |
67 PP_Bool CancelKeyRequest( | |
68 [in] PP_Instance instance, | |
69 [in] PP_Var session_id); | |
70 | |
71 /** | |
72 * Decrypts the block and returns the unencrypted block via | |
73 * <code>DeliverBlock()</code> on the | |
74 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block | |
75 * contains encoded data. | |
76 * | |
77 * @param[in] resource A <code>PP_Resource</code> corresponding to a | |
78 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data | |
79 * block. | |
80 * | |
81 * @param[in] request_id A value used by the browser to associate data | |
82 * returned via the <code>PPB_ContentDecryptor_Private</code> interface with | |
83 * decryption method calls. | |
84 */ | |
85 PP_Bool Decrypt( | |
86 [in] PP_Instance instance, | |
87 [in] PP_Resource encrypted_block, | |
88 [in] int32_t request_id); | |
89 | |
90 /** | |
91 * Decrypts the block, decodes it, and returns the unencrypted uncompressed | |
92 * (decoded) media to the browser via the | |
93 * <code>PPB_ContentDecryptor_Private</code> interface. | |
94 * | |
95 * Decrypted and decoded video frames are sent to <code>DeliverFrame()</code>, | |
96 * while audio samples are sent to <code>DeliverSamples()</code>. | |
97 * | |
98 * @param[in] resource A <code>PP_Resource</code> corresponding to a | |
99 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data | |
100 * block. | |
101 * | |
102 * @param[in] request_id A value used by the browser to associate data | |
103 * returned via the <code>PPB_ContentDecryptor_Private</code> interface with | |
104 * decryption method calls. | |
105 */ | |
106 PP_Bool DecryptAndDecode( | |
107 [in] PP_Instance instance, | |
108 [in] PP_Resource encrypted_block, | |
109 [in] int32_t request_id); | |
110 }; | |
OLD | NEW |