| 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 */ |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 [in] PP_Var key_system, | 126 [in] PP_Var key_system, |
| 127 [in] PP_Var session_id, | 127 [in] PP_Var session_id, |
| 128 [in] int32_t media_error, | 128 [in] int32_t media_error, |
| 129 [in] int32_t system_code); | 129 [in] int32_t system_code); |
| 130 | 130 |
| 131 /** | 131 /** |
| 132 * Called after the <code>Decrypt()</code> method on the | 132 * Called after the <code>Decrypt()</code> method on the |
| 133 * <code>PPP_ContentDecryptor_Private</code> interface completes to | 133 * <code>PPP_ContentDecryptor_Private</code> interface completes to |
| 134 * deliver decrypted_block to the browser for decoding and rendering. | 134 * deliver decrypted_block to the browser for decoding and rendering. |
| 135 * | 135 * |
| 136 * The plugin must not hold a reference to the encrypted buffer resource |
| 137 * provided to <code>Decrypt()</code> when it calls this method. The browser |
| 138 * will reuse the buffer in a subsequent <code>Decrypt()</code> call. |
| 139 * |
| 136 * @param[in] decrypted_block A <code>PP_Resource</code> corresponding to a | 140 * @param[in] decrypted_block A <code>PP_Resource</code> corresponding to a |
| 137 * <code>PPB_Buffer_Dev</code> resource that contains a decrypted data | 141 * <code>PPB_Buffer_Dev</code> resource that contains a decrypted data |
| 138 * block. | 142 * block. |
| 139 * | 143 * |
| 140 * @param[in] decrypted_block_info A <code>PP_DecryptedBlockInfo</code> that | 144 * @param[in] decrypted_block_info A <code>PP_DecryptedBlockInfo</code> that |
| 141 * contains the result code and tracking info associated with the | 145 * contains the result code and tracking info associated with the |
| 142 * <code>decrypted_block</code>. | 146 * <code>decrypted_block</code>. |
| 143 */ | 147 */ |
| 144 void DeliverBlock( | 148 void DeliverBlock( |
| 145 [in] PP_Instance instance, | 149 [in] PP_Instance instance, |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 void DecoderResetDone( | 204 void DecoderResetDone( |
| 201 [in] PP_Instance instance, | 205 [in] PP_Instance instance, |
| 202 [in] PP_DecryptorStreamType decoder_type, | 206 [in] PP_DecryptorStreamType decoder_type, |
| 203 [in] uint32_t request_id); | 207 [in] uint32_t request_id); |
| 204 | 208 |
| 205 /** | 209 /** |
| 206 * Called after the <code>DecryptAndDecode()</code> method on the | 210 * Called after the <code>DecryptAndDecode()</code> method on the |
| 207 * <code>PPP_ContentDecryptor_Private</code> interface completes to deliver | 211 * <code>PPP_ContentDecryptor_Private</code> interface completes to deliver |
| 208 * a decrypted and decoded video frame to the browser for rendering. | 212 * a decrypted and decoded video frame to the browser for rendering. |
| 209 * | 213 * |
| 214 * The plugin must not hold a reference to the encrypted buffer resource |
| 215 * provided to <code>DecryptAndDecode()</code> when it calls this method. The |
| 216 * browser will reuse the buffer in a subsequent |
| 217 * <code>DecryptAndDecode()</code> call. |
| 218 * |
| 210 * @param[in] decrypted_frame A <code>PP_Resource</code> corresponding to a | 219 * @param[in] decrypted_frame A <code>PP_Resource</code> corresponding to a |
| 211 * <code>PPB_Buffer_Dev</code> resource that contains a video frame. | 220 * <code>PPB_Buffer_Dev</code> resource that contains a video frame. |
| 212 * | 221 * |
| 213 * @param[in] decrypted_frame_info A <code>PP_DecryptedFrameInfo</code> that | 222 * @param[in] decrypted_frame_info A <code>PP_DecryptedFrameInfo</code> that |
| 214 * contains the result code, tracking info, and buffer format associated with | 223 * contains the result code, tracking info, and buffer format associated with |
| 215 * <code>decrypted_frame</code>. | 224 * <code>decrypted_frame</code>. |
| 216 */ | 225 */ |
| 217 void DeliverFrame( | 226 void DeliverFrame( |
| 218 [in] PP_Instance instance, | 227 [in] PP_Instance instance, |
| 219 [in] PP_Resource decrypted_frame, | 228 [in] PP_Resource decrypted_frame, |
| 220 [in] PP_DecryptedFrameInfo decrypted_frame_info); | 229 [in] PP_DecryptedFrameInfo decrypted_frame_info); |
| 221 | 230 |
| 222 /** | 231 /** |
| 223 * Called after the <code>DecryptAndDecode()</code> method on the | 232 * Called after the <code>DecryptAndDecode()</code> method on the |
| 224 * <code>PPP_ContentDecryptor_Private</code> interface completes to | 233 * <code>PPP_ContentDecryptor_Private</code> interface completes to deliver |
| 225 * deliver a buffer of decrypted and decoded audio samples to the browser for | 234 * a buffer of decrypted and decoded audio samples to the browser for |
| 226 * rendering. | 235 * rendering. |
| 227 * | 236 * |
| 237 * The plugin must not hold a reference to the encrypted buffer resource |
| 238 * provided to <code>DecryptAndDecode()</code> when it calls this method. The |
| 239 * browser will reuse the buffer in a subsequent |
| 240 * <code>DecryptAndDecode()</code> call. |
| 241 * |
| 228 * <code>audio_frames</code> can contain multiple audio output buffers. Each | 242 * <code>audio_frames</code> can contain multiple audio output buffers. Each |
| 229 * buffer is serialized in this format: | 243 * buffer is serialized in this format: |
| 230 * | 244 * |
| 231 * |<------------------- serialized audio buffer ------------------->| | 245 * |<------------------- serialized audio buffer ------------------->| |
| 232 * | int64_t timestamp | int64_t length | length bytes of audio data | | 246 * | int64_t timestamp | int64_t length | length bytes of audio data | |
| 233 * | 247 * |
| 234 * For example, with three audio output buffers, |audio_frames| will look | 248 * For example, with three audio output buffers, |audio_frames| will look |
| 235 * like this: | 249 * like this: |
| 236 * | 250 * |
| 237 * |<---------------- audio_frames ------------------>| | 251 * |<---------------- audio_frames ------------------>| |
| 238 * | audio buffer 0 | audio buffer 1 | audio buffer 2 | | 252 * | audio buffer 0 | audio buffer 1 | audio buffer 2 | |
| 239 * | 253 * |
| 240 * @param[in] audio_frames A <code>PP_Resource</code> corresponding to a | 254 * @param[in] audio_frames A <code>PP_Resource</code> corresponding to a |
| 241 * <code>PPB_Buffer_Dev</code> resource that contains a decrypted buffer | 255 * <code>PPB_Buffer_Dev</code> resource that contains a decrypted buffer |
| 242 * of decoded audio samples. | 256 * of decoded audio samples. |
| 243 * | 257 * |
| 244 * @param[in] decrypted_block_info A <code>PP_DecryptedBlockInfo</code> that | 258 * @param[in] decrypted_block_info A <code>PP_DecryptedBlockInfo</code> that |
| 245 * contains the tracking info and result code associated with the | 259 * contains the tracking info and result code associated with the |
| 246 * <code>decrypted_block</code>. | 260 * <code>decrypted_block</code>. |
| 247 */ | 261 */ |
| 248 void DeliverSamples( | 262 void DeliverSamples( |
| 249 [in] PP_Instance instance, | 263 [in] PP_Instance instance, |
| 250 [in] PP_Resource audio_frames, | 264 [in] PP_Resource audio_frames, |
| 251 [in] PP_DecryptedBlockInfo decrypted_block_info); | 265 [in] PP_DecryptedBlockInfo decrypted_block_info); |
| 252 }; | 266 }; |
| OLD | NEW |