OLD | NEW |
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 Wed Nov 27 14:10:24 2013. | 7 * modified Fri Dec 6 12:16:22 2013. |
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" |
(...skipping 21 matching lines...) Expand all Loading... |
39 * <code>PPB_ContentDecryptor_Private</code> structure contains the function | 39 * <code>PPB_ContentDecryptor_Private</code> structure contains the function |
40 * pointers the browser must implement to support plugins implementing the | 40 * pointers the browser must implement to support plugins implementing the |
41 * <code>PPP_ContentDecryptor_Private</code> interface. This interface provides | 41 * <code>PPP_ContentDecryptor_Private</code> interface. This interface provides |
42 * browser side support for the Content Decryption Module (CDM) for Encrypted | 42 * browser side support for the Content Decryption Module (CDM) for Encrypted |
43 * Media Extensions: http://www.w3.org/TR/encrypted-media/ | 43 * Media Extensions: http://www.w3.org/TR/encrypted-media/ |
44 */ | 44 */ |
45 struct PPB_ContentDecryptor_Private_0_9 { | 45 struct PPB_ContentDecryptor_Private_0_9 { |
46 /** | 46 /** |
47 * A session has been created by the CDM. | 47 * A session has been created by the CDM. |
48 * | 48 * |
49 * @param[in] reference_id A reference for the session for which the CDM | 49 * @param[in] session_id Identifies the session for which the CDM |
50 * created a session. | 50 * created a session. |
51 * | 51 * |
52 * @param[in] web_session_id A <code>PP_Var</code> of type | 52 * @param[in] web_session_id A <code>PP_Var</code> of type |
53 * <code>PP_VARTYPE_STRING</code> containing the string for the | 53 * <code>PP_VARTYPE_STRING</code> containing the string for the |
54 * MediaKeySession's sessionId attribute. | 54 * MediaKeySession's sessionId attribute. |
55 * | 55 * |
56 */ | 56 */ |
57 void (*SessionCreated)(PP_Instance instance, | 57 void (*SessionCreated)(PP_Instance instance, |
58 uint32_t reference_id, | 58 uint32_t session_id, |
59 struct PP_Var web_session_id); | 59 struct PP_Var web_session_id); |
60 /** | 60 /** |
61 * A message or request has been generated for key_system in the CDM, and | 61 * A message or request has been generated for key_system in the CDM, and |
62 * must be sent to the web application. | 62 * must be sent to the web application. |
63 * | 63 * |
64 * For example, when the browser invokes <code>CreateSession()</code> | 64 * For example, when the browser invokes <code>CreateSession()</code> |
65 * on the <code>PPP_ContentDecryptor_Private</code> interface, the plugin | 65 * on the <code>PPP_ContentDecryptor_Private</code> interface, the plugin |
66 * must send a message containing the license request. | 66 * must send a message containing the license request. |
67 * | 67 * |
68 * Note that <code>SessionMessage()</code> can be used for purposes other than | 68 * Note that <code>SessionMessage()</code> can be used for purposes other than |
69 * responses to <code>CreateSession()</code> calls. See also the text | 69 * responses to <code>CreateSession()</code> calls. See also the text |
70 * in the comment for <code>SessionReady()</code>, which describes a sequence | 70 * in the comment for <code>SessionReady()</code>, which describes a sequence |
71 * of <code>UpdateSession()</code> and <code>SessionMessage()</code> calls | 71 * of <code>UpdateSession()</code> and <code>SessionMessage()</code> calls |
72 * required to prepare for decryption. | 72 * required to prepare for decryption. |
73 * | 73 * |
74 * @param[in] reference_id A reference for the session for which the message | 74 * @param[in] session_id Identifies the session for which the message |
75 * is intended. | 75 * is intended. |
76 * | 76 * |
77 * @param[in] message A <code>PP_Var</code> of type | 77 * @param[in] message A <code>PP_Var</code> of type |
78 * <code>PP_VARTYPE_ARRAY_BUFFER</code> that contains the message. | 78 * <code>PP_VARTYPE_ARRAY_BUFFER</code> that contains the message. |
79 * | 79 * |
80 * @param[in] destination_url A <code>PP_Var</code> of type | 80 * @param[in] destination_url A <code>PP_Var</code> of type |
81 * <code>PP_VARTYPE_STRING</code> containing the destination URL for the | 81 * <code>PP_VARTYPE_STRING</code> containing the destination URL for the |
82 * message. | 82 * message. |
83 */ | 83 */ |
84 void (*SessionMessage)(PP_Instance instance, | 84 void (*SessionMessage)(PP_Instance instance, |
85 uint32_t reference_id, | 85 uint32_t session_id, |
86 struct PP_Var message, | 86 struct PP_Var message, |
87 struct PP_Var destination_url); | 87 struct PP_Var destination_url); |
88 /** | 88 /** |
89 * The session is now ready to decrypt the media stream. | 89 * The session is now ready to decrypt the media stream. |
90 * | 90 * |
91 * Note: The above describes the most simple case. Depending on the key | 91 * Note: The above describes the most simple case. Depending on the key |
92 * system, a series of <code>SessionMessage()</code> calls from the CDM will | 92 * system, a series of <code>SessionMessage()</code> calls from the CDM will |
93 * be sent to the browser, and then on to the web application. The web | 93 * be sent to the browser, and then on to the web application. The web |
94 * application must then provide more data to the CDM by directing the browser | 94 * application must then provide more data to the CDM by directing the browser |
95 * to pass the data to the CDM via calls to <code>UpdateSession()</code> on | 95 * to pass the data to the CDM via calls to <code>UpdateSession()</code> on |
96 * the <code>PPP_ContentDecryptor_Private</code> interface. | 96 * the <code>PPP_ContentDecryptor_Private</code> interface. |
97 * The CDM must call <code>SessionReady()</code> when the sequence is | 97 * The CDM must call <code>SessionReady()</code> when the sequence is |
98 * completed, and, in response, the browser must notify the web application. | 98 * completed, and, in response, the browser must notify the web application. |
99 * | 99 * |
100 * @param[in] reference_id A reference for the session that is ready. | 100 * @param[in] session_id Identifies the session that is ready. |
101 */ | 101 */ |
102 void (*SessionReady)(PP_Instance instance, uint32_t reference_id); | 102 void (*SessionReady)(PP_Instance instance, uint32_t session_id); |
103 /** | 103 /** |
104 * The session has been closed as the result of a call to the | 104 * The session has been closed as the result of a call to the |
105 * <code>ReleaseSession()</code> method on the | 105 * <code>ReleaseSession()</code> method on the |
106 * <code>PPP_ContentDecryptor_Private</code> interface, or due to other | 106 * <code>PPP_ContentDecryptor_Private</code> interface, or due to other |
107 * factors as determined by the CDM. | 107 * factors as determined by the CDM. |
108 * | 108 * |
109 * @param[in] reference_id A reference for the session that is closed. | 109 * @param[in] session_id Identifies the session that is closed. |
110 */ | 110 */ |
111 void (*SessionClosed)(PP_Instance instance, uint32_t reference_id); | 111 void (*SessionClosed)(PP_Instance instance, uint32_t session_id); |
112 /** | 112 /** |
113 * An error occurred in a <code>PPP_ContentDecryptor_Private</code> method, | 113 * An error occurred in a <code>PPP_ContentDecryptor_Private</code> method, |
114 * or within the plugin implementing the interface. | 114 * or within the plugin implementing the interface. |
115 * | 115 * |
116 * @param[in] reference_id A reference for the session for which the error | 116 * @param[in] session_id Identifies the session for which the error |
117 * is intended. | 117 * is intended. |
118 * | 118 * |
119 * @param[in] media_error A MediaKeyError. | 119 * @param[in] media_error A MediaKeyError. |
120 * | 120 * |
121 * @param[in] system_error A system error code. | 121 * @param[in] system_error A system error code. |
122 */ | 122 */ |
123 void (*SessionError)(PP_Instance instance, | 123 void (*SessionError)(PP_Instance instance, |
124 uint32_t reference_id, | 124 uint32_t session_id, |
125 int32_t media_error, | 125 int32_t media_error, |
126 int32_t system_code); | 126 int32_t system_code); |
127 /** | 127 /** |
128 * Called after the <code>Decrypt()</code> method on the | 128 * Called after the <code>Decrypt()</code> method on the |
129 * <code>PPP_ContentDecryptor_Private</code> interface completes to | 129 * <code>PPP_ContentDecryptor_Private</code> interface completes to |
130 * deliver decrypted_block to the browser for decoding and rendering. | 130 * deliver decrypted_block to the browser for decoding and rendering. |
131 * | 131 * |
132 * The plugin must not hold a reference to the encrypted buffer resource | 132 * The plugin must not hold a reference to the encrypted buffer resource |
133 * provided to <code>Decrypt()</code> when it calls this method. The browser | 133 * provided to <code>Decrypt()</code> when it calls this method. The browser |
134 * will reuse the buffer in a subsequent <code>Decrypt()</code> call. | 134 * will reuse the buffer in a subsequent <code>Decrypt()</code> call. |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 const struct PP_DecryptedSampleInfo* decrypted_sample_info); | 253 const struct PP_DecryptedSampleInfo* decrypted_sample_info); |
254 }; | 254 }; |
255 | 255 |
256 typedef struct PPB_ContentDecryptor_Private_0_9 PPB_ContentDecryptor_Private; | 256 typedef struct PPB_ContentDecryptor_Private_0_9 PPB_ContentDecryptor_Private; |
257 /** | 257 /** |
258 * @} | 258 * @} |
259 */ | 259 */ |
260 | 260 |
261 #endif /* PPAPI_C_PRIVATE_PPB_CONTENT_DECRYPTOR_PRIVATE_H_ */ | 261 #endif /* PPAPI_C_PRIVATE_PPB_CONTENT_DECRYPTOR_PRIVATE_H_ */ |
262 | 262 |
OLD | NEW |