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 Mon Oct 8 13:45:19 2012. | 7 * modified Thu Oct 11 20:53:07 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" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 * @param[in] codec_extra_data A <code>PP_Resource</code> corresponding to a | 128 * @param[in] codec_extra_data A <code>PP_Resource</code> corresponding to a |
129 * <code>PPB_Buffer_Dev</code> resource containing codec setup data required | 129 * <code>PPB_Buffer_Dev</code> resource containing codec setup data required |
130 * by some codecs. It should be set to 0 when the codec being initialized | 130 * by some codecs. It should be set to 0 when the codec being initialized |
131 * does not require it. | 131 * does not require it. |
132 */ | 132 */ |
133 void (*InitializeVideoDecoder)( | 133 void (*InitializeVideoDecoder)( |
134 PP_Instance instance, | 134 PP_Instance instance, |
135 const struct PP_VideoDecoderConfig* decoder_config, | 135 const struct PP_VideoDecoderConfig* decoder_config, |
136 PP_Resource codec_extra_data); | 136 PP_Resource codec_extra_data); |
137 /** | 137 /** |
| 138 * De-initializes the decoder for the <code>PP_DecryptorStreamType</code> |
| 139 * specified by <code>decoder_type</code> and sets it to an uninitialized |
| 140 * state. The decoder can be re-initialized after de-initialization completes |
| 141 * by calling <code>InitializeAudioDecoder</code> or |
| 142 * <code>InitializeVideoDecoder</code>. |
| 143 * |
| 144 * De-initialization completion is reported to the browser using the |
| 145 * <code>DecoderDeinitializeDone()</code> method on the |
| 146 * <code>PPB_ContentDecryptor_Private</code> interface. |
| 147 * |
| 148 * @param[in] decoder_type A <code>PP_DecryptorStreamType</code> that |
| 149 * specifies the decoder to de-initialize. |
| 150 * |
| 151 * @param[in] request_id A request ID that allows the browser to associate a |
| 152 * request to de-initialize a decoder with the corresponding call to the |
| 153 * <code>DecoderDeinitializeDone()</code> method on the |
| 154 * <code>PPB_ContentDecryptor_Private</code> interface. |
| 155 */ |
| 156 void (*DeinitializeDecoder)(PP_Instance instance, |
| 157 PP_DecryptorStreamType decoder_type, |
| 158 uint32_t request_id); |
| 159 /** |
| 160 * Resets the decoder for the <code>PP_DecryptorStreamType</code> specified |
| 161 * by <code>decoder_type</code> to an initialized clean state. Reset |
| 162 * completion is reported to the browser using the |
| 163 * <code>DecoderResetDone()</code> method on the |
| 164 * <code>PPB_ContentDecryptor_Private</code> interface. This method can be |
| 165 * used to signal a discontinuity in the encoded data stream, and is safe to |
| 166 * call multiple times. |
| 167 * |
| 168 * @param[in] decoder_type A <code>PP_DecryptorStreamType</code> that |
| 169 * specifies the decoder to reset. |
| 170 * |
| 171 * @param[in] request_id A request ID that allows the browser to associate a |
| 172 * request to reset the decoder with a corresponding call to the |
| 173 * <code>DecoderResetDone()</code> method on the |
| 174 * <code>PPB_ContentDecryptor_Private</code> interface. |
| 175 */ |
| 176 void (*ResetDecoder)(PP_Instance instance, |
| 177 PP_DecryptorStreamType decoder_type, |
| 178 uint32_t request_id); |
| 179 /** |
138 * Decrypts encrypted_video_frame, decodes it, and returns the unencrypted | 180 * Decrypts encrypted_video_frame, decodes it, and returns the unencrypted |
139 * uncompressed (decoded) video frame to the browser via the | 181 * uncompressed (decoded) video frame to the browser via the |
140 * <code>DeliverFrame()</code> method on the | 182 * <code>DeliverFrame()</code> method on the |
141 * <code>PPB_ContentDecryptor_Private</code> interface. | 183 * <code>PPB_ContentDecryptor_Private</code> interface. |
142 * | 184 * |
143 * @param[in] encrypted_video_frame A <code>PP_Resource</code> corresponding | 185 * @param[in] encrypted_video_frame A <code>PP_Resource</code> corresponding |
144 * to a <code>PPB_Buffer_Dev</code> resource that contains an encrypted video | 186 * to a <code>PPB_Buffer_Dev</code> resource that contains an encrypted video |
145 * frame. | 187 * frame. |
146 * | 188 * |
147 * @param[in] encrypted_video_frame_info A | 189 * @param[in] encrypted_video_frame_info A |
148 * <code>PP_EncryptedVideoFrameInfo</code> that contains all information | 190 * <code>PP_EncryptedVideoFrameInfo</code> that contains all information |
149 * needed to decrypt and decode <code>encrypted_video_frame</code>. | 191 * needed to decrypt and decode <code>encrypted_video_frame</code>. |
150 */ | 192 */ |
151 void (*DecryptAndDecodeFrame)( | 193 void (*DecryptAndDecodeFrame)( |
152 PP_Instance instance, | 194 PP_Instance instance, |
153 PP_Resource encrypted_video_frame, | 195 PP_Resource encrypted_video_frame, |
154 const struct PP_EncryptedVideoFrameInfo* encrypted_video_frame_info); | 196 const struct PP_EncryptedVideoFrameInfo* encrypted_video_frame_info); |
155 }; | 197 }; |
156 | 198 |
157 typedef struct PPP_ContentDecryptor_Private_0_3 PPP_ContentDecryptor_Private; | 199 typedef struct PPP_ContentDecryptor_Private_0_3 PPP_ContentDecryptor_Private; |
158 /** | 200 /** |
159 * @} | 201 * @} |
160 */ | 202 */ |
161 | 203 |
162 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */ | 204 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */ |
163 | 205 |
OLD | NEW |