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

Side by Side Diff: ppapi/c/private/ppb_content_decryptor_private.h

Issue 811923002: Changes to support CDM_7 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cdm_7 changes Created 6 years 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
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 /* From private/ppb_content_decryptor_private.idl, 6 /* From private/ppb_content_decryptor_private.idl,
7 * modified Mon Aug 25 13:52:39 2014. 7 * modified Wed Dec 17 10:57:41 2014.
8 */ 8 */
9 9
10 #ifndef PPAPI_C_PRIVATE_PPB_CONTENT_DECRYPTOR_PRIVATE_H_ 10 #ifndef PPAPI_C_PRIVATE_PPB_CONTENT_DECRYPTOR_PRIVATE_H_
11 #define PPAPI_C_PRIVATE_PPB_CONTENT_DECRYPTOR_PRIVATE_H_ 11 #define PPAPI_C_PRIVATE_PPB_CONTENT_DECRYPTOR_PRIVATE_H_
12 12
13 #include "ppapi/c/pp_bool.h" 13 #include "ppapi/c/pp_bool.h"
14 #include "ppapi/c/pp_instance.h" 14 #include "ppapi/c/pp_instance.h"
15 #include "ppapi/c/pp_macros.h" 15 #include "ppapi/c/pp_macros.h"
16 #include "ppapi/c/pp_resource.h" 16 #include "ppapi/c/pp_resource.h"
17 #include "ppapi/c/pp_stdint.h" 17 #include "ppapi/c/pp_stdint.h"
18 #include "ppapi/c/pp_time.h" 18 #include "ppapi/c/pp_time.h"
19 #include "ppapi/c/pp_var.h" 19 #include "ppapi/c/pp_var.h"
20 #include "ppapi/c/private/pp_content_decryptor.h" 20 #include "ppapi/c/private/pp_content_decryptor.h"
21 21
22 #define PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_12 \ 22 #define PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_13 \
23 "PPB_ContentDecryptor_Private;0.12" 23 "PPB_ContentDecryptor_Private;0.13"
24 #define PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE \ 24 #define PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE \
25 PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_12 25 PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_13
26 26
27 /** 27 /**
28 * @file 28 * @file
29 * This file defines the <code>PPB_ContentDecryptor_Private</code> 29 * This file defines the <code>PPB_ContentDecryptor_Private</code>
30 * interface. Note: This is a special interface, only to be used for Content 30 * interface. Note: This is a special interface, only to be used for Content
31 * Decryption Modules, not normal plugins. 31 * Decryption Modules, not normal plugins.
32 */ 32 */
33 33
34 34
35 /** 35 /**
36 * @addtogroup Interfaces 36 * @addtogroup Interfaces
37 * @{ 37 * @{
38 */ 38 */
39 /** 39 /**
40 * <code>PPB_ContentDecryptor_Private</code> structure contains the function 40 * <code>PPB_ContentDecryptor_Private</code> structure contains the function
41 * pointers the browser must implement to support plugins implementing the 41 * pointers the browser must implement to support plugins implementing the
42 * <code>PPP_ContentDecryptor_Private</code> interface. This interface provides 42 * <code>PPP_ContentDecryptor_Private</code> interface. This interface provides
43 * browser side support for the Content Decryption Module (CDM) for Encrypted 43 * browser side support for the Content Decryption Module (CDM) for Encrypted
44 * Media Extensions: http://www.w3.org/TR/encrypted-media/ 44 * Media Extensions: http://www.w3.org/TR/encrypted-media/
45 */ 45 */
46 struct PPB_ContentDecryptor_Private_0_12 { 46 struct PPB_ContentDecryptor_Private_0_13 {
47 /** 47 /**
48 * A promise has been resolved by the CDM. 48 * A promise has been resolved by the CDM.
49 * 49 *
50 * @param[in] promise_id Identifies the promise that the CDM resolved. 50 * @param[in] promise_id Identifies the promise that the CDM resolved.
51 */ 51 */
52 void (*PromiseResolved)(PP_Instance instance, uint32_t promise_id); 52 void (*PromiseResolved)(PP_Instance instance, uint32_t promise_id);
53 /** 53 /**
54 * A promise that resulted in a new session has been resolved by the CDM. 54 * A promise that resulted in a new session has been resolved by the CDM.
55 * 55 *
56 * @param[in] promise_id Identifies the promise that the CDM resolved. 56 * @param[in] promise_id Identifies the promise that the CDM resolved.
57 * 57 *
58 * @param[in] web_session_id A <code>PP_Var</code> of type 58 * @param[in] web_session_id A <code>PP_Var</code> of type
59 * <code>PP_VARTYPE_STRING</code> containing the session's ID attribute. 59 * <code>PP_VARTYPE_STRING</code> containing the session's ID attribute.
60 */ 60 */
61 void (*PromiseResolvedWithSession)(PP_Instance instance, 61 void (*PromiseResolvedWithSession)(PP_Instance instance,
62 uint32_t promise_id, 62 uint32_t promise_id,
63 struct PP_Var web_session_id); 63 struct PP_Var web_session_id);
64 /** 64 /**
65 * A promise that returns a set of key IDs has been resolved by the CDM.
66 *
67 * @param[in] promise_id Identifies the promise that the CDM resolved.
68 *
69 * @param[in] key_ids A <code>PP_Var</code> of type
70 * <code>PP_VARTYPE_ARRAY</code> containing elements of type
71 * <code>PP_VARTYPE_ARRAYBUFFER</code> that are the session's usable key IDs.
72 */
73 void (*PromiseResolvedWithKeyIds)(PP_Instance instance,
74 uint32_t promise_id,
75 struct PP_Var key_ids_array);
76 /**
77 * A promise has been rejected by the CDM due to an error. 65 * A promise has been rejected by the CDM due to an error.
78 * 66 *
79 * @param[in] promise_id Identifies the promise that the CDM rejected. 67 * @param[in] promise_id Identifies the promise that the CDM rejected.
80 * 68 *
81 * @param[in] exception_code A <code>PP_CdmExceptionCode</code> containing 69 * @param[in] exception_code A <code>PP_CdmExceptionCode</code> containing
82 * the exception code. 70 * the exception code.
83 * 71 *
84 * @param[in] system_code A system error code. 72 * @param[in] system_code A system error code.
85 * 73 *
86 * @param[in] error_description A <code>PP_Var</code> of type 74 * @param[in] error_description A <code>PP_Var</code> of type
(...skipping 15 matching lines...) Expand all
102 * Note that <code>SessionMessage()</code> can be used for purposes other than 90 * Note that <code>SessionMessage()</code> can be used for purposes other than
103 * responses to <code>CreateSession()</code> calls. See also the text 91 * responses to <code>CreateSession()</code> calls. See also the text
104 * in the comment for <code>SessionReady()</code>, which describes a sequence 92 * in the comment for <code>SessionReady()</code>, which describes a sequence
105 * of <code>UpdateSession()</code> and <code>SessionMessage()</code> calls 93 * of <code>UpdateSession()</code> and <code>SessionMessage()</code> calls
106 * required to prepare for decryption. 94 * required to prepare for decryption.
107 * 95 *
108 * @param[in] web_session_id A <code>PP_Var</code> of type 96 * @param[in] web_session_id A <code>PP_Var</code> of type
109 * <code>PP_VARTYPE_STRING</code> containing the ID of a session for 97 * <code>PP_VARTYPE_STRING</code> containing the ID of a session for
110 * which this message is intended. 98 * which this message is intended.
111 * 99 *
100 * @param[in] message_type A <code>PP_MessageType</code> containing the
101 * message type.
102 *
112 * @param[in] message A <code>PP_Var</code> of type 103 * @param[in] message A <code>PP_Var</code> of type
113 * <code>PP_VARTYPE_ARRAY_BUFFER</code> that contains the message. 104 * <code>PP_VARTYPE_ARRAY_BUFFER</code> that contains the message.
114 *
115 * @param[in] destination_url A <code>PP_Var</code> of type
116 * <code>PP_VARTYPE_STRING</code> containing the destination URL for the
117 * message.
118 */ 105 */
119 void (*SessionMessage)(PP_Instance instance, 106 void (*SessionMessage)(PP_Instance instance,
120 struct PP_Var web_session_id, 107 struct PP_Var web_session_id,
121 struct PP_Var message, 108 PP_MessageType message_type,
122 struct PP_Var destination_url); 109 struct PP_Var message);
123 /** 110 /**
124 * The keys for a session have changed. 111 * The keys for a session have changed.
125 * 112 *
126 * @param[in] web_session_id A <code>PP_Var</code> of type 113 * @param[in] web_session_id A <code>PP_Var</code> of type
127 * <code>PP_VARTYPE_STRING</code> containing the ID of the session that has 114 * <code>PP_VARTYPE_STRING</code> containing the ID of the session that has
128 * a change in keys. 115 * a change in keys.
129 * 116 *
130 * @param[in] has_additional_usable_key A <code>PP_Bool</code> indicating if 117 * @param[in] has_additional_usable_key A <code>PP_Bool</code> indicating if
131 * a new usable key has been added. 118 * a new usable key has been added.
119 *
120 * @param[in] key_ids A <code>PP_Var</code> of type
121 * <code>PP_VARTYPE_ARRAY</code> containing elements of type
122 * <code>PP_KeyInformation</code> that are the session's key IDs.
132 */ 123 */
133 void (*SessionKeysChange)(PP_Instance instance, 124 void (*SessionKeysChange)(PP_Instance instance,
134 struct PP_Var web_session_id, 125 struct PP_Var web_session_id,
135 PP_Bool has_additional_usable_key); 126 PP_Bool has_additional_usable_key,
127 struct PP_Var key_information_array);
136 /** 128 /**
137 * The expiration time for a session has changed. 129 * The expiration time for a session has changed.
138 * 130 *
139 * @param[in] web_session_id A <code>PP_Var</code> of type 131 * @param[in] web_session_id A <code>PP_Var</code> of type
140 * <code>PP_VARTYPE_STRING</code> containing the ID of the session that has 132 * <code>PP_VARTYPE_STRING</code> containing the ID of the session that has
141 * a new expiration time. 133 * a new expiration time.
142 * 134 *
143 * @param[in] new_expiry_time A <code>PP_Time</code> indicating the new 135 * @param[in] new_expiry_time A <code>PP_Time</code> indicating the new
144 * expiry time of the session. The value is defined as the number of seconds 136 * expiry time of the session. The value is defined as the number of seconds
145 * since the Epoch (00:00:00 UTC, January 1, 1970). 137 * since the Epoch (00:00:00 UTC, January 1, 1970).
146 */ 138 */
147 void (*SessionExpirationChange)(PP_Instance instance, 139 void (*SessionExpirationChange)(PP_Instance instance,
148 struct PP_Var web_session_id, 140 struct PP_Var web_session_id,
149 PP_Time new_expiry_time); 141 PP_Time new_expiry_time);
150 /** 142 /**
151 * The session is now ready to decrypt the media stream.
152 *
153 * Note: The above describes the most simple case. Depending on the key
154 * system, a series of <code>SessionMessage()</code> calls from the CDM will
155 * be sent to the browser, and then on to the web application. The web
156 * application must then provide more data to the CDM by directing the browser
157 * to pass the data to the CDM via calls to <code>UpdateSession()</code> on
158 * the <code>PPP_ContentDecryptor_Private</code> interface.
159 * The CDM must call <code>SessionReady()</code> when the sequence is
160 * completed, and, in response, the browser must notify the web application.
161 *
162 * @param[in] web_session_id A <code>PP_Var</code> of type
163 * <code>PP_VARTYPE_STRING</code> containing the session's ID attribute of
164 * the session that is now ready.
165 */
166 void (*SessionReady)(PP_Instance instance, struct PP_Var web_session_id);
167 /**
168 * The session has been closed as the result of a call to the 143 * The session has been closed as the result of a call to the
169 * <code>ReleaseSession()</code> method on the 144 * <code>ReleaseSession()</code> method on the
170 * <code>PPP_ContentDecryptor_Private</code> interface, or due to other 145 * <code>PPP_ContentDecryptor_Private</code> interface, or due to other
171 * factors as determined by the CDM. 146 * factors as determined by the CDM.
172 * 147 *
173 * @param[in] web_session_id A <code>PP_Var</code> of type 148 * @param[in] web_session_id A <code>PP_Var</code> of type
174 * <code>PP_VARTYPE_STRING</code> containing the session's ID attribute of 149 * <code>PP_VARTYPE_STRING</code> containing the session's ID attribute of
175 * the session that is now closed. 150 * the session that is now closed.
176 */ 151 */
177 void (*SessionClosed)(PP_Instance instance, struct PP_Var web_session_id); 152 void (*SessionClosed)(PP_Instance instance, struct PP_Var web_session_id);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 * @param[in] decrypted_sample_info A <code>PP_DecryptedSampleInfo</code> that 293 * @param[in] decrypted_sample_info A <code>PP_DecryptedSampleInfo</code> that
319 * contains the tracking info and result code associated with the decrypted 294 * contains the tracking info and result code associated with the decrypted
320 * samples. 295 * samples.
321 */ 296 */
322 void (*DeliverSamples)( 297 void (*DeliverSamples)(
323 PP_Instance instance, 298 PP_Instance instance,
324 PP_Resource audio_frames, 299 PP_Resource audio_frames,
325 const struct PP_DecryptedSampleInfo* decrypted_sample_info); 300 const struct PP_DecryptedSampleInfo* decrypted_sample_info);
326 }; 301 };
327 302
328 typedef struct PPB_ContentDecryptor_Private_0_12 PPB_ContentDecryptor_Private; 303 typedef struct PPB_ContentDecryptor_Private_0_13 PPB_ContentDecryptor_Private;
329 /** 304 /**
330 * @} 305 * @}
331 */ 306 */
332 307
333 #endif /* PPAPI_C_PRIVATE_PPB_CONTENT_DECRYPTOR_PRIVATE_H_ */ 308 #endif /* PPAPI_C_PRIVATE_PPB_CONTENT_DECRYPTOR_PRIVATE_H_ */
334 309
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698