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 Fri Aug 17 09:07:21 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_content_decryptor.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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 * must call call <code>KeyAdded()</code> on the | 73 * must call call <code>KeyAdded()</code> on the |
73 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser | 74 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser |
74 * must notify the web application. | 75 * must notify the web application. |
75 * | 76 * |
76 * @param[in] session_id A <code>PP_Var</code> of type | 77 * @param[in] session_id A <code>PP_Var</code> of type |
77 * <code>PP_VARTYPE_STRING</code> containing the session ID. | 78 * <code>PP_VARTYPE_STRING</code> containing the session ID. |
78 * | 79 * |
79 * @param[in] key A <code>PP_Var</code> of type | 80 * @param[in] key A <code>PP_Var</code> of type |
80 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the decryption key, license, | 81 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the decryption key, license, |
81 * or other message for the given session ID. | 82 * or other message for the given session ID. |
| 83 * |
| 84 * @param[in] init_data A <code>PP_Var</code> of type |
| 85 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific |
| 86 * initialization data. |
82 */ | 87 */ |
83 PP_Bool (*AddKey)(PP_Instance instance, | 88 PP_Bool (*AddKey)(PP_Instance instance, |
84 struct PP_Var session_id, | 89 struct PP_Var session_id, |
85 struct PP_Var key); | 90 struct PP_Var key, |
| 91 struct PP_Var init_data); |
86 /** | 92 /** |
87 * Cancels a pending key request for the specified session ID. | 93 * Cancels a pending key request for the specified session ID. |
88 * | 94 * |
89 * @param[in] session_id A <code>PP_Var</code> of type | 95 * @param[in] session_id A <code>PP_Var</code> of type |
90 * <code>PP_VARTYPE_STRING</code> containing the session ID. | 96 * <code>PP_VARTYPE_STRING</code> containing the session ID. |
91 */ | 97 */ |
92 PP_Bool (*CancelKeyRequest)(PP_Instance instance, struct PP_Var session_id); | 98 PP_Bool (*CancelKeyRequest)(PP_Instance instance, struct PP_Var session_id); |
93 /** | 99 /** |
94 * Decrypts the block and returns the unencrypted block via | 100 * Decrypts the block and returns the unencrypted block via |
95 * <code>DeliverBlock()</code> on the | 101 * <code>DeliverBlock()</code> on the |
96 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block | 102 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block |
97 * contains encoded data. | 103 * contains encoded data. |
98 * | 104 * |
99 * @param[in] resource A <code>PP_Resource</code> corresponding to a | 105 * @param[in] resource A <code>PP_Resource</code> corresponding to a |
100 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data | 106 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data |
101 * block. | 107 * block. |
102 * | 108 * |
103 * @param[in] request_id A value used by the browser to associate data | 109 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that |
104 * returned via the <code>PPB_ContentDecryptor_Private</code> interface with | 110 * contains all auxiliary information needed for decryption of the |
105 * decryption method calls. | 111 * <code>encrypted_block</code>. |
106 */ | 112 */ |
107 PP_Bool (*Decrypt)(PP_Instance instance, | 113 PP_Bool (*Decrypt)( |
108 PP_Resource encrypted_block, | 114 PP_Instance instance, |
109 int32_t request_id); | 115 PP_Resource encrypted_block, |
| 116 const struct PP_EncryptedBlockInfo* encrypted_block_info); |
110 /** | 117 /** |
111 * Decrypts the block, decodes it, and returns the unencrypted uncompressed | 118 * Decrypts the block, decodes it, and returns the unencrypted uncompressed |
112 * (decoded) media to the browser via the | 119 * (decoded) media to the browser via the |
113 * <code>PPB_ContentDecryptor_Private</code> interface. | 120 * <code>PPB_ContentDecryptor_Private</code> interface. |
114 * | 121 * |
115 * Decrypted and decoded video frames are sent to <code>DeliverFrame()</code>, | 122 * Decrypted and decoded video frames are sent to <code>DeliverFrame()</code>, |
116 * and decrypted and decoded audio samples are sent to | 123 * and decrypted and decoded audio samples are sent to |
117 * <code>DeliverSamples()</code>. | 124 * <code>DeliverSamples()</code>. |
118 * | 125 * |
119 * @param[in] resource A <code>PP_Resource</code> corresponding to a | 126 * @param[in] resource A <code>PP_Resource</code> corresponding to a |
120 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data | 127 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data |
121 * block. | 128 * block. |
122 * | 129 * |
123 * @param[in] request_id A value used by the browser to associate data | 130 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that |
124 * returned via the <code>PPB_ContentDecryptor_Private</code> interface with | 131 * contains all auxiliary information needed for decryption of the |
125 * decryption method calls. | 132 * <code>encrypted_block</code>. |
126 */ | 133 */ |
127 PP_Bool (*DecryptAndDecode)(PP_Instance instance, | 134 PP_Bool (*DecryptAndDecode)( |
128 PP_Resource encrypted_block, | 135 PP_Instance instance, |
129 int32_t request_id); | 136 PP_Resource encrypted_block, |
| 137 const struct PP_EncryptedBlockInfo* encrypted_block_info); |
130 }; | 138 }; |
131 | 139 |
132 typedef struct PPP_ContentDecryptor_Private_0_1 PPP_ContentDecryptor_Private; | 140 typedef struct PPP_ContentDecryptor_Private_0_1 PPP_ContentDecryptor_Private; |
133 /** | 141 /** |
134 * @} | 142 * @} |
135 */ | 143 */ |
136 | 144 |
137 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */ | 145 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */ |
138 | 146 |
OLD | NEW |