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

Side by Side Diff: ppapi/api/private/ppp_content_decryptor_private.idl

Issue 811923002: Changes to support CDM_7 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CrOS compile error Created 5 years, 11 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
« no previous file with comments | « ppapi/api/private/ppb_content_decryptor_private.idl ('k') | ppapi/c/pp_macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 /** 6 /**
7 * This file defines the <code>PPP_ContentDecryptor_Private</code> 7 * This file defines the <code>PPP_ContentDecryptor_Private</code>
8 * interface. Note: This is a special interface, only to be used for Content 8 * interface. Note: This is a special interface, only to be used for Content
9 * Decryption Modules, not normal plugins. 9 * Decryption Modules, not normal plugins.
10 */ 10 */
11 label Chrome { 11 label Chrome {
12 M36 = 0.12 12 M41 = 0.13
13 }; 13 };
14 14
15 /** 15 /**
16 * <code>PPP_ContentDecryptor_Private</code> structure contains the function 16 * <code>PPP_ContentDecryptor_Private</code> structure contains the function
17 * pointers the decryption plugin must implement to provide services needed by 17 * pointers the decryption plugin must implement to provide services needed by
18 * the browser. This interface provides the plugin side support for the Content 18 * the browser. This interface provides the plugin side support for the Content
19 * Decryption Module (CDM) for Encrypted Media Extensions: 19 * Decryption Module (CDM) for Encrypted Media Extensions:
20 * http://www.w3.org/TR/encrypted-media/ 20 * http://www.w3.org/TR/encrypted-media/
21 */ 21 */
22 interface PPP_ContentDecryptor_Private { 22 interface PPP_ContentDecryptor_Private {
(...skipping 16 matching lines...) Expand all
39 * 39 *
40 * @param[in] server_certificate A <code>PP_Var</code> of type 40 * @param[in] server_certificate A <code>PP_Var</code> of type
41 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the certificate to be used. 41 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the certificate to be used.
42 */ 42 */
43 void SetServerCertificate( 43 void SetServerCertificate(
44 [in] PP_Instance instance, 44 [in] PP_Instance instance,
45 [in] uint32_t promise_id, 45 [in] uint32_t promise_id,
46 [in] PP_Var server_certificate); 46 [in] PP_Var server_certificate);
47 47
48 /** 48 /**
49 * Creates a session. <code>init_data_type</code> contains the MIME type of 49 * Creates a session and subsequently generates a request for a license.
50 * <code>init_data_type</code> contains the MIME type of
50 * <code>init_data</code>. <code>init_data</code> is a data buffer 51 * <code>init_data</code>. <code>init_data</code> is a data buffer
51 * containing data for use in generating the request. 52 * containing data for use in generating the request.
52 * 53 *
53 * Note: <code>CreateSession()</code> must create a web session ID and provide 54 * Note: <code>CreateSessionAndGenerateRequest()</code> must create a web
54 * it to the browser via <code>SessionCreated()</code> on the 55 * session ID and provide it to the browser via <code>SessionCreated()</code>
55 * <code>PPB_ContentDecryptor_Private</code> interface. 56 * on the <code>PPB_ContentDecryptor_Private</code> interface.
56 * 57 *
57 * @param[in] promise_id A reference for the promise that gets resolved or 58 * @param[in] promise_id A reference for the promise that gets resolved or
58 * rejected depending upon the success or failure when creating the session. 59 * rejected depending upon the success or failure when creating the session.
59 * 60 *
61 * @param[in] session_type A <code>PP_SessionType</code> that indicates the
62 * type of session to be created.
63 *
60 * @param[in] init_data_type A <code>PP_Var</code> of type 64 * @param[in] init_data_type A <code>PP_Var</code> of type
61 * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data. 65 * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data.
62 * 66 *
63 * @param[in] init_data A <code>PP_Var</code> of type 67 * @param[in] init_data A <code>PP_Var</code> of type
64 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific 68 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific
65 * initialization data. 69 * initialization data.
66 *
67 * @param[in] session_type A <code>PP_SessionType</code> that indicates the
68 * type of session to be created.
69 */ 70 */
70 void CreateSession( 71 void CreateSessionAndGenerateRequest(
71 [in] PP_Instance instance, 72 [in] PP_Instance instance,
72 [in] uint32_t promise_id, 73 [in] uint32_t promise_id,
74 [in] PP_SessionType session_type,
73 [in] PP_Var init_data_type, 75 [in] PP_Var init_data_type,
74 [in] PP_Var init_data, 76 [in] PP_Var init_data);
75 [in] PP_SessionType session_type);
76 77
77 /** 78 /**
78 * Loads a session whose web session ID is <code>web_session_id</code>. 79 * Loads a session whose web session ID is <code>web_session_id</code>.
79 * 80 *
80 * Note: After the session is successfully loaded, the CDM must call 81 * Note: After the session is successfully loaded, the CDM must call
81 * <code>SessionCreated()</code> with <code>web_session_id</code> on the 82 * <code>SessionCreated()</code> with <code>web_session_id</code> on the
82 * <code>PPB_ContentDecryptor_Private</code> interface. 83 * <code>PPB_ContentDecryptor_Private</code> interface.
83 * 84 *
84 * @param[in] promise_id A reference for the promise that gets resolved or 85 * @param[in] promise_id A reference for the promise that gets resolved or
85 * rejected depending upon the success or failure of loading the session. 86 * rejected depending upon the success or failure of loading the session.
86 * 87 *
88 * @param[in] session_type A <code>PP_SessionType</code> that indicates the
89 * type of session to be loaded.
90 *
87 * @param[in] web_session_id A <code>PP_Var</code> of type 91 * @param[in] web_session_id A <code>PP_Var</code> of type
88 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session 92 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
89 * to load. 93 * to load.
90 */ 94 */
91 void LoadSession( 95 void LoadSession(
92 [in] PP_Instance instance, 96 [in] PP_Instance instance,
93 [in] uint32_t promise_id, 97 [in] uint32_t promise_id,
98 [in] PP_SessionType session_type,
94 [in] PP_Var web_session_id); 99 [in] PP_Var web_session_id);
95 100
96 /** 101 /**
97 * Provides a license or other message to the decryptor. 102 * Provides a license or other message to the decryptor.
98 * 103 *
99 * When the CDM needs more information, it must call 104 * When the CDM needs more information, it must call
100 * <code>SessionMessage()</code> on the 105 * <code>SessionMessage()</code> on the
101 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser 106 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser
102 * must notify the web application. When the CDM has finished processing 107 * must notify the web application. When the CDM has finished processing
103 * <code>response</code> and needs no more information, it must call 108 * <code>response</code> and needs no more information, it must call
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session 154 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
150 * to be removed. 155 * to be removed.
151 * 156 *
152 */ 157 */
153 void RemoveSession( 158 void RemoveSession(
154 [in] PP_Instance instance, 159 [in] PP_Instance instance,
155 [in] uint32_t promise_id, 160 [in] uint32_t promise_id,
156 [in] PP_Var web_session_id); 161 [in] PP_Var web_session_id);
157 162
158 /** 163 /**
159 * Get the key IDs for keys in the session that the CDM knows are currently
160 * usable to decrypt media data.
161 *
162 * @param[in] promise_id A reference for the promise that gets resolved or
163 * rejected depending upon the success or failure of obtaining the key IDs.
164 *
165 * @param[in] web_session_id A <code>PP_Var</code> of type
166 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
167 * to be queried.
168 *
169 */
170 void GetUsableKeyIds(
171 [in] PP_Instance instance,
172 [in] uint32_t promise_id,
173 [in] PP_Var web_session_id);
174
175 /**
176 * Decrypts the block and returns the unencrypted block via 164 * Decrypts the block and returns the unencrypted block via
177 * <code>DeliverBlock()</code> on the 165 * <code>DeliverBlock()</code> on the
178 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block 166 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block
179 * contains encoded data. 167 * contains encoded data.
180 * 168 *
181 * @param[in] resource A <code>PP_Resource</code> corresponding to a 169 * @param[in] resource A <code>PP_Resource</code> corresponding to a
182 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data 170 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data
183 * block. 171 * block.
184 * 172 *
185 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that 173 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that 285 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that
298 * contains all auxiliary information needed for decryption of the 286 * contains all auxiliary information needed for decryption of the
299 * <code>encrypted_block</code>. 287 * <code>encrypted_block</code>.
300 */ 288 */
301 void DecryptAndDecode( 289 void DecryptAndDecode(
302 [in] PP_Instance instance, 290 [in] PP_Instance instance,
303 [in] PP_DecryptorStreamType decoder_type, 291 [in] PP_DecryptorStreamType decoder_type,
304 [in] PP_Resource encrypted_buffer, 292 [in] PP_Resource encrypted_buffer,
305 [in] PP_EncryptedBlockInfo encrypted_block_info); 293 [in] PP_EncryptedBlockInfo encrypted_block_info);
306 }; 294 };
OLDNEW
« no previous file with comments | « ppapi/api/private/ppb_content_decryptor_private.idl ('k') | ppapi/c/pp_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698