| 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 Thu Mar 28 15:22:02 2013. | 7 * modified Tue Sep 17 11:31:05 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" |
| 18 #include "ppapi/c/pp_var.h" | 18 #include "ppapi/c/pp_var.h" |
| 19 #include "ppapi/c/private/pp_content_decryptor.h" | 19 #include "ppapi/c/private/pp_content_decryptor.h" |
| 20 | 20 |
| 21 #define PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_6 \ | 21 #define PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_7 \ |
| 22 "PPB_ContentDecryptor_Private;0.6" | 22 "PPB_ContentDecryptor_Private;0.7" |
| 23 #define PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE \ | 23 #define PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE \ |
| 24 PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_6 | 24 PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_7 |
| 25 | 25 |
| 26 /** | 26 /** |
| 27 * @file | 27 * @file |
| 28 * This file defines the <code>PPB_ContentDecryptor_Private</code> | 28 * This file defines the <code>PPB_ContentDecryptor_Private</code> |
| 29 * interface. Note: This is a special interface, only to be used for Content | 29 * interface. Note: This is a special interface, only to be used for Content |
| 30 * Decryption Modules, not normal plugins. | 30 * Decryption Modules, not normal plugins. |
| 31 */ | 31 */ |
| 32 | 32 |
| 33 | 33 |
| 34 /** | 34 /** |
| 35 * @addtogroup Interfaces | 35 * @addtogroup Interfaces |
| 36 * @{ | 36 * @{ |
| 37 */ | 37 */ |
| 38 /** | 38 /** |
| 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 v0.1 of the | 42 * browser side support for the Content Decryption Module (CDM) for v0.1 of the |
| 43 * proposed Encrypted Media Extensions: http://goo.gl/rbdnR | 43 * proposed Encrypted Media Extensions: http://goo.gl/rbdnR |
| 44 */ | 44 */ |
| 45 struct PPB_ContentDecryptor_Private_0_6 { | 45 struct PPB_ContentDecryptor_Private_0_7 { |
| 46 /** | |
| 47 * The decryptor requires a key that has not been provided. | |
| 48 * | |
| 49 * Sent when the decryptor encounters encrypted content, but it does not have | |
| 50 * the key required to decrypt the data. The plugin will call this method in | |
| 51 * response to a call to the <code>Decrypt()</code> method on the | |
| 52 * <code>PPP_ContentDecryptor_Private<code> interface. | |
| 53 * | |
| 54 * The browser must notify the application that a key is needed, and, in | |
| 55 * response, the web application must direct the browser to call | |
| 56 * <code>AddKey()</code> on the <code>PPP_ContentDecryptor_Private</code> | |
| 57 * interface. | |
| 58 * | |
| 59 * @param[in] key_system A <code>PP_Var</code> of type | |
| 60 * <code>PP_VARTYPE_STRING</code> containing the name of the key system. | |
| 61 * | |
| 62 * @param[in] session_id A <code>PP_Var</code> of type | |
| 63 * <code>PP_VARTYPE_STRING</code> containing the session ID. | |
| 64 * | |
| 65 * @param[in] init_data A <code>PP_Var</code> of type | |
| 66 * <code>PP_VARTYPE_ARRAY_BUFFER</code> containing container-specific | |
| 67 * initialization data. | |
| 68 */ | |
| 69 void (*NeedKey)(PP_Instance instance, | |
| 70 struct PP_Var key_system, | |
| 71 struct PP_Var session_id, | |
| 72 struct PP_Var init_data); | |
| 73 /** | 46 /** |
| 74 * A key has been added as the result of a call to the <code>AddKey()</code> | 47 * A key has been added as the result of a call to the <code>AddKey()</code> |
| 75 * method on the <code>PPP_ContentDecryptor_Private</code> interface. | 48 * method on the <code>PPP_ContentDecryptor_Private</code> interface. |
| 76 * | 49 * |
| 77 * Note: The above describes the most simple case. Depending on the key | 50 * Note: The above describes the most simple case. Depending on the key |
| 78 * system, a series of <code>KeyMessage()</code> calls from the CDM will be | 51 * system, a series of <code>KeyMessage()</code> calls from the CDM will be |
| 79 * sent to the browser, and then on to the web application. The web | 52 * sent to the browser, and then on to the web application. The web |
| 80 * application must then provide more data to the CDM by directing the browser | 53 * application must then provide more data to the CDM by directing the browser |
| 81 * to pass the data to the CDM via calls to <code>AddKey()</code> on the | 54 * to pass the data to the CDM via calls to <code>AddKey()</code> on the |
| 82 * <code>PPP_ContentDecryptor_Private</code> interface. | 55 * <code>PPP_ContentDecryptor_Private</code> interface. |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 * @param[in] decrypted_block_info A <code>PP_DecryptedBlockInfo</code> that | 237 * @param[in] decrypted_block_info A <code>PP_DecryptedBlockInfo</code> that |
| 265 * contains the tracking info and result code associated with the | 238 * contains the tracking info and result code associated with the |
| 266 * <code>decrypted_block</code>. | 239 * <code>decrypted_block</code>. |
| 267 */ | 240 */ |
| 268 void (*DeliverSamples)( | 241 void (*DeliverSamples)( |
| 269 PP_Instance instance, | 242 PP_Instance instance, |
| 270 PP_Resource audio_frames, | 243 PP_Resource audio_frames, |
| 271 const struct PP_DecryptedBlockInfo* decrypted_block_info); | 244 const struct PP_DecryptedBlockInfo* decrypted_block_info); |
| 272 }; | 245 }; |
| 273 | 246 |
| 274 typedef struct PPB_ContentDecryptor_Private_0_6 PPB_ContentDecryptor_Private; | 247 typedef struct PPB_ContentDecryptor_Private_0_7 PPB_ContentDecryptor_Private; |
| 275 /** | 248 /** |
| 276 * @} | 249 * @} |
| 277 */ | 250 */ |
| 278 | 251 |
| 279 #endif /* PPAPI_C_PRIVATE_PPB_CONTENT_DECRYPTOR_PRIVATE_H_ */ | 252 #endif /* PPAPI_C_PRIVATE_PPB_CONTENT_DECRYPTOR_PRIVATE_H_ */ |
| 280 | 253 |
| OLD | NEW |