| 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/ppp_content_decryptor_private.idl, | 6 /* From private/ppp_content_decryptor_private.idl, |
| 7 * modified Tue Aug 14 11:06:05 2012. | 7 * modified Thu Aug 16 17:29:22 2012. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 #ifndef PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ | 10 #ifndef PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ |
| 11 #define PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ | 11 #define PPAPI_C_PRIVATE_PPP_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_decrypt_config.h" |
| 19 | 20 |
| 20 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_1 \ | 21 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_1 \ |
| 21 "PPP_ContentDecryptor_Private;0.1" | 22 "PPP_ContentDecryptor_Private;0.1" |
| 22 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE \ | 23 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE \ |
| 23 PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_1 | 24 PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_1 |
| 24 | 25 |
| 25 /** | 26 /** |
| 26 * @file | 27 * @file |
| 27 * This file defines the <code>PPP_ContentDecryptor_Private</code> | 28 * This file defines the <code>PPP_ContentDecryptor_Private</code> |
| 28 * 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 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 /** | 94 /** |
| 94 * Decrypts the block and returns the unencrypted block via | 95 * Decrypts the block and returns the unencrypted block via |
| 95 * <code>DeliverBlock()</code> on the | 96 * <code>DeliverBlock()</code> on the |
| 96 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block | 97 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block |
| 97 * contains encoded data. | 98 * contains encoded data. |
| 98 * | 99 * |
| 99 * @param[in] resource A <code>PP_Resource</code> corresponding to a | 100 * @param[in] resource A <code>PP_Resource</code> corresponding to a |
| 100 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data | 101 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data |
| 101 * block. | 102 * block. |
| 102 * | 103 * |
| 103 * @param[in] request_id A value used by the browser to associate data | 104 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that |
| 104 * returned via the <code>PPB_ContentDecryptor_Private</code> interface with | 105 * contains all auxiliary information needed for decryption of the |
| 105 * decryption method calls. | 106 * <code>encrypted_block</code>. |
| 106 */ | 107 */ |
| 107 PP_Bool (*Decrypt)(PP_Instance instance, | 108 PP_Bool (*Decrypt)( |
| 108 PP_Resource encrypted_block, | 109 PP_Instance instance, |
| 109 int32_t request_id); | 110 PP_Resource encrypted_block, |
| 111 const struct PP_EncryptedBlockInfo* encrypted_block_info); |
| 110 /** | 112 /** |
| 111 * Decrypts the block, decodes it, and returns the unencrypted uncompressed | 113 * Decrypts the block, decodes it, and returns the unencrypted uncompressed |
| 112 * (decoded) media to the browser via the | 114 * (decoded) media to the browser via the |
| 113 * <code>PPB_ContentDecryptor_Private</code> interface. | 115 * <code>PPB_ContentDecryptor_Private</code> interface. |
| 114 * | 116 * |
| 115 * Decrypted and decoded video frames are sent to <code>DeliverFrame()</code>, | 117 * Decrypted and decoded video frames are sent to <code>DeliverFrame()</code>, |
| 116 * and decrypted and decoded audio samples are sent to | 118 * and decrypted and decoded audio samples are sent to |
| 117 * <code>DeliverSamples()</code>. | 119 * <code>DeliverSamples()</code>. |
| 118 * | 120 * |
| 119 * @param[in] resource A <code>PP_Resource</code> corresponding to a | 121 * @param[in] resource A <code>PP_Resource</code> corresponding to a |
| 120 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data | 122 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data |
| 121 * block. | 123 * block. |
| 122 * | 124 * |
| 123 * @param[in] request_id A value used by the browser to associate data | 125 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that |
| 124 * returned via the <code>PPB_ContentDecryptor_Private</code> interface with | 126 * contains all auxiliary information needed for decryption of the |
| 125 * decryption method calls. | 127 * <code>encrypted_block</code>. |
| 126 */ | 128 */ |
| 127 PP_Bool (*DecryptAndDecode)(PP_Instance instance, | 129 PP_Bool (*DecryptAndDecode)( |
| 128 PP_Resource encrypted_block, | 130 PP_Instance instance, |
| 129 int32_t request_id); | 131 PP_Resource encrypted_block, |
| 132 const struct PP_EncryptedBlockInfo* encrypted_block_info); |
| 130 }; | 133 }; |
| 131 | 134 |
| 132 typedef struct PPP_ContentDecryptor_Private_0_1 PPP_ContentDecryptor_Private; | 135 typedef struct PPP_ContentDecryptor_Private_0_1 PPP_ContentDecryptor_Private; |
| 133 /** | 136 /** |
| 134 * @} | 137 * @} |
| 135 */ | 138 */ |
| 136 | 139 |
| 137 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */ | 140 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */ |
| 138 | 141 |
| OLD | NEW |