Chromium Code Reviews| 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 /** | 6 /** |
| 7 * This file defines the <code>PPB_ContentDecryptor_Private</code> | 7 * This file defines the <code>PPB_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 | 11 |
| 12 [generate_thunk] | 12 [generate_thunk] |
| 13 | 13 |
| 14 label Chrome { | 14 label Chrome { |
| 15 M36 = 0.12 | 15 M41 = 0.13 |
| 16 }; | 16 }; |
| 17 | 17 |
| 18 /** | 18 /** |
| 19 * <code>PPB_ContentDecryptor_Private</code> structure contains the function | 19 * <code>PPB_ContentDecryptor_Private</code> structure contains the function |
| 20 * pointers the browser must implement to support plugins implementing the | 20 * pointers the browser must implement to support plugins implementing the |
| 21 * <code>PPP_ContentDecryptor_Private</code> interface. This interface provides | 21 * <code>PPP_ContentDecryptor_Private</code> interface. This interface provides |
| 22 * browser side support for the Content Decryption Module (CDM) for Encrypted | 22 * browser side support for the Content Decryption Module (CDM) for Encrypted |
| 23 * Media Extensions: http://www.w3.org/TR/encrypted-media/ | 23 * Media Extensions: http://www.w3.org/TR/encrypted-media/ |
| 24 */ | 24 */ |
| 25 interface PPB_ContentDecryptor_Private { | 25 interface PPB_ContentDecryptor_Private { |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 38 * @param[in] promise_id Identifies the promise that the CDM resolved. | 38 * @param[in] promise_id Identifies the promise that the CDM resolved. |
| 39 * | 39 * |
| 40 * @param[in] web_session_id A <code>PP_Var</code> of type | 40 * @param[in] web_session_id A <code>PP_Var</code> of type |
| 41 * <code>PP_VARTYPE_STRING</code> containing the session's ID attribute. | 41 * <code>PP_VARTYPE_STRING</code> containing the session's ID attribute. |
| 42 */ | 42 */ |
| 43 void PromiseResolvedWithSession( | 43 void PromiseResolvedWithSession( |
| 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 web_session_id); | 46 [in] PP_Var web_session_id); |
| 47 | 47 |
| 48 /** | |
| 49 * A promise that returns a set of key IDs has been resolved by the CDM. | |
| 50 * | |
| 51 * @param[in] promise_id Identifies the promise that the CDM resolved. | |
| 52 * | |
| 53 * @param[in] key_ids A <code>PP_Var</code> of type | |
| 54 * <code>PP_VARTYPE_ARRAY</code> containing elements of type | |
| 55 * <code>PP_VARTYPE_ARRAYBUFFER</code> that are the session's usable key IDs. | |
| 56 */ | |
| 57 void PromiseResolvedWithKeyIds( | |
| 58 [in] PP_Instance instance, | |
| 59 [in] uint32_t promise_id, | |
| 60 [in] PP_Var key_ids_array); | |
| 61 | 48 |
| 62 /** | 49 /** |
| 63 * A promise has been rejected by the CDM due to an error. | 50 * A promise has been rejected by the CDM due to an error. |
| 64 * | 51 * |
| 65 * @param[in] promise_id Identifies the promise that the CDM rejected. | 52 * @param[in] promise_id Identifies the promise that the CDM rejected. |
| 66 * | 53 * |
| 67 * @param[in] exception_code A <code>PP_CdmExceptionCode</code> containing | 54 * @param[in] exception_code A <code>PP_CdmExceptionCode</code> containing |
| 68 * the exception code. | 55 * the exception code. |
| 69 * | 56 * |
| 70 * @param[in] system_code A system error code. | 57 * @param[in] system_code A system error code. |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 90 * Note that <code>SessionMessage()</code> can be used for purposes other than | 77 * Note that <code>SessionMessage()</code> can be used for purposes other than |
| 91 * responses to <code>CreateSession()</code> calls. See also the text | 78 * responses to <code>CreateSession()</code> calls. See also the text |
| 92 * in the comment for <code>SessionReady()</code>, which describes a sequence | 79 * in the comment for <code>SessionReady()</code>, which describes a sequence |
| 93 * of <code>UpdateSession()</code> and <code>SessionMessage()</code> calls | 80 * of <code>UpdateSession()</code> and <code>SessionMessage()</code> calls |
| 94 * required to prepare for decryption. | 81 * required to prepare for decryption. |
| 95 * | 82 * |
| 96 * @param[in] web_session_id A <code>PP_Var</code> of type | 83 * @param[in] web_session_id A <code>PP_Var</code> of type |
| 97 * <code>PP_VARTYPE_STRING</code> containing the ID of a session for | 84 * <code>PP_VARTYPE_STRING</code> containing the ID of a session for |
| 98 * which this message is intended. | 85 * which this message is intended. |
| 99 * | 86 * |
| 87 * @param[in] message_type A <code>PP_MessageType</code> containing the | |
| 88 * message type. | |
| 89 * | |
| 100 * @param[in] message A <code>PP_Var</code> of type | 90 * @param[in] message A <code>PP_Var</code> of type |
| 101 * <code>PP_VARTYPE_ARRAY_BUFFER</code> that contains the message. | 91 * <code>PP_VARTYPE_ARRAY_BUFFER</code> that contains the message. |
| 102 * | |
| 103 * @param[in] destination_url A <code>PP_Var</code> of type | |
| 104 * <code>PP_VARTYPE_STRING</code> containing the destination URL for the | |
| 105 * message. | |
| 106 */ | 92 */ |
| 107 void SessionMessage( | 93 void SessionMessage( |
| 108 [in] PP_Instance instance, | 94 [in] PP_Instance instance, |
| 109 [in] PP_Var web_session_id, | 95 [in] PP_Var web_session_id, |
| 110 [in] PP_Var message, | 96 [in] PP_MessageType message_type, |
| 111 [in] PP_Var destination_url); | 97 [in] PP_Var message); |
| 112 | 98 |
| 113 /** | 99 /** |
| 114 * The keys for a session have changed. | 100 * The keys for a session have changed. |
| 115 * | 101 * |
| 116 * @param[in] web_session_id A <code>PP_Var</code> of type | 102 * @param[in] web_session_id A <code>PP_Var</code> of type |
| 117 * <code>PP_VARTYPE_STRING</code> containing the ID of the session that has | 103 * <code>PP_VARTYPE_STRING</code> containing the ID of the session that has |
| 118 * a change in keys. | 104 * a change in keys. |
| 119 * | 105 * |
| 120 * @param[in] has_additional_usable_key A <code>PP_Bool</code> indicating if | 106 * @param[in] has_additional_usable_key A <code>PP_Bool</code> indicating if |
| 121 * a new usable key has been added. | 107 * a new usable key has been added. |
| 108 * | |
| 109 * @param[in] key_ids A <code>PP_Var</code> of type | |
| 110 * <code>PP_VARTYPE_ARRAY</code> containing elements of type | |
| 111 * <code>PP_VARTYPE_ARRAYBUFFER</code> that are the session's usable key IDs. | |
|
ddorwin
2014/12/17 01:01:15
Update this line
Specifically, not just "usable" k
jrummell
2014/12/17 19:17:19
Done.
| |
| 122 */ | 112 */ |
| 123 void SessionKeysChange( | 113 void SessionKeysChange( |
| 124 [in] PP_Instance instance, | 114 [in] PP_Instance instance, |
| 125 [in] PP_Var web_session_id, | 115 [in] PP_Var web_session_id, |
| 126 [in] PP_Bool has_additional_usable_key); | 116 [in] PP_Bool has_additional_usable_key, |
| 117 [in] PP_Var key_information_array); | |
| 127 | 118 |
| 128 /** | 119 /** |
| 129 * The expiration time for a session has changed. | 120 * The expiration time for a session has changed. |
| 130 * | 121 * |
| 131 * @param[in] web_session_id A <code>PP_Var</code> of type | 122 * @param[in] web_session_id A <code>PP_Var</code> of type |
| 132 * <code>PP_VARTYPE_STRING</code> containing the ID of the session that has | 123 * <code>PP_VARTYPE_STRING</code> containing the ID of the session that has |
| 133 * a new expiration time. | 124 * a new expiration time. |
| 134 * | 125 * |
| 135 * @param[in] new_expiry_time A <code>PP_Time</code> indicating the new | 126 * @param[in] new_expiry_time A <code>PP_Time</code> indicating the new |
| 136 * expiry time of the session. The value is defined as the number of seconds | 127 * expiry time of the session. The value is defined as the number of seconds |
| 137 * since the Epoch (00:00:00 UTC, January 1, 1970). | 128 * since the Epoch (00:00:00 UTC, January 1, 1970). |
| 138 */ | 129 */ |
| 139 void SessionExpirationChange( | 130 void SessionExpirationChange( |
| 140 [in] PP_Instance instance, | 131 [in] PP_Instance instance, |
| 141 [in] PP_Var web_session_id, | 132 [in] PP_Var web_session_id, |
| 142 [in] PP_Time new_expiry_time); | 133 [in] PP_Time new_expiry_time); |
| 143 | 134 |
| 144 /** | 135 /** |
|
ddorwin
2014/12/17 01:01:15
Wasn't SessionReady used for prefixed's keyadded e
jrummell
2014/12/17 19:17:19
Neither CDM_6 nor CDM_7 generate the ready event.
| |
| 145 * The session is now ready to decrypt the media stream. | |
| 146 * | |
| 147 * Note: The above describes the most simple case. Depending on the key | |
| 148 * system, a series of <code>SessionMessage()</code> calls from the CDM will | |
| 149 * be sent to the browser, and then on to the web application. The web | |
| 150 * application must then provide more data to the CDM by directing the browser | |
| 151 * to pass the data to the CDM via calls to <code>UpdateSession()</code> on | |
| 152 * the <code>PPP_ContentDecryptor_Private</code> interface. | |
| 153 * The CDM must call <code>SessionReady()</code> when the sequence is | |
| 154 * completed, and, in response, the browser must notify the web application. | |
| 155 * | |
| 156 * @param[in] web_session_id A <code>PP_Var</code> of type | |
| 157 * <code>PP_VARTYPE_STRING</code> containing the session's ID attribute of | |
| 158 * the session that is now ready. | |
| 159 */ | |
| 160 void SessionReady( | |
| 161 [in] PP_Instance instance, | |
| 162 [in] PP_Var web_session_id); | |
| 163 | |
| 164 /** | |
| 165 * The session has been closed as the result of a call to the | 136 * The session has been closed as the result of a call to the |
| 166 * <code>ReleaseSession()</code> method on the | 137 * <code>ReleaseSession()</code> method on the |
| 167 * <code>PPP_ContentDecryptor_Private</code> interface, or due to other | 138 * <code>PPP_ContentDecryptor_Private</code> interface, or due to other |
| 168 * factors as determined by the CDM. | 139 * factors as determined by the CDM. |
| 169 * | 140 * |
| 170 * @param[in] web_session_id A <code>PP_Var</code> of type | 141 * @param[in] web_session_id A <code>PP_Var</code> of type |
| 171 * <code>PP_VARTYPE_STRING</code> containing the session's ID attribute of | 142 * <code>PP_VARTYPE_STRING</code> containing the session's ID attribute of |
| 172 * the session that is now closed. | 143 * the session that is now closed. |
| 173 */ | 144 */ |
| 174 void SessionClosed( | 145 void SessionClosed( |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 327 * | 298 * |
| 328 * @param[in] decrypted_sample_info A <code>PP_DecryptedSampleInfo</code> that | 299 * @param[in] decrypted_sample_info A <code>PP_DecryptedSampleInfo</code> that |
| 329 * contains the tracking info and result code associated with the decrypted | 300 * contains the tracking info and result code associated with the decrypted |
| 330 * samples. | 301 * samples. |
| 331 */ | 302 */ |
| 332 void DeliverSamples( | 303 void DeliverSamples( |
| 333 [in] PP_Instance instance, | 304 [in] PP_Instance instance, |
| 334 [in] PP_Resource audio_frames, | 305 [in] PP_Resource audio_frames, |
| 335 [in] PP_DecryptedSampleInfo decrypted_sample_info); | 306 [in] PP_DecryptedSampleInfo decrypted_sample_info); |
| 336 }; | 307 }; |
| OLD | NEW |