OLD | NEW |
1 /* Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2014 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 ppb_video_decoder.idl modified Wed May 21 09:50:52 2014. */ | 6 /* From ppb_video_decoder.idl modified Fri Jul 11 18:06:37 2014. */ |
7 | 7 |
8 #ifndef PPAPI_C_PPB_VIDEO_DECODER_H_ | 8 #ifndef PPAPI_C_PPB_VIDEO_DECODER_H_ |
9 #define PPAPI_C_PPB_VIDEO_DECODER_H_ | 9 #define PPAPI_C_PPB_VIDEO_DECODER_H_ |
10 | 10 |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_codecs.h" | 12 #include "ppapi/c/pp_codecs.h" |
13 #include "ppapi/c/pp_completion_callback.h" | 13 #include "ppapi/c/pp_completion_callback.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" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 void (*RecyclePicture)(PP_Resource video_decoder, | 173 void (*RecyclePicture)(PP_Resource video_decoder, |
174 const struct PP_VideoPicture* picture); | 174 const struct PP_VideoPicture* picture); |
175 /** | 175 /** |
176 * Flushes the decoder. The plugin should call Flush() when it reaches the | 176 * Flushes the decoder. The plugin should call Flush() when it reaches the |
177 * end of its video stream in order to stop cleanly. The decoder will run any | 177 * end of its video stream in order to stop cleanly. The decoder will run any |
178 * pending Decode() call to completion. The plugin should make no further | 178 * pending Decode() call to completion. The plugin should make no further |
179 * calls to the decoder other than GetPicture() and RecyclePicture() until | 179 * calls to the decoder other than GetPicture() and RecyclePicture() until |
180 * the decoder signals completion by running |callback|. Just before | 180 * the decoder signals completion by running |callback|. Just before |
181 * completion, any pending GetPicture() call will complete by running its | 181 * completion, any pending GetPicture() call will complete by running its |
182 * callback with result PP_ERROR_ABORTED to signal that no more pictures are | 182 * callback with result PP_ERROR_ABORTED to signal that no more pictures are |
183 * available. The plugin should recycle any pictures it is using before | 183 * available. Any pictures held by the plugin remain valid during and after |
184 * resuming decoding. | 184 * the flush and should be recycled back to the decoder. |
185 * | 185 * |
186 * @param[in] video_decoder A <code>PP_Resource</code> identifying the video | 186 * @param[in] video_decoder A <code>PP_Resource</code> identifying the video |
187 * decoder. | 187 * decoder. |
188 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on | 188 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on |
189 * completion. | 189 * completion. |
190 * | 190 * |
191 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 191 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
192 * Returns PP_ERROR_FAILED if the decoder isn't initialized. | 192 * Returns PP_ERROR_FAILED if the decoder isn't initialized. |
193 */ | 193 */ |
194 int32_t (*Flush)(PP_Resource video_decoder, | 194 int32_t (*Flush)(PP_Resource video_decoder, |
195 struct PP_CompletionCallback callback); | 195 struct PP_CompletionCallback callback); |
196 /** | 196 /** |
197 * Resets the decoder as quickly as possible. The plugin can call Reset() to | 197 * Resets the decoder as quickly as possible. The plugin can call Reset() to |
198 * skip to another position in the video stream. After Reset() returns, any | 198 * skip to another position in the video stream. After Reset() returns, any |
199 * pending calls to Decode() and GetPicture()) abort, causing their callbacks | 199 * pending calls to Decode() and GetPicture()) abort, causing their callbacks |
200 * to run with PP_ERROR_ABORTED. The plugin should not make further calls to | 200 * to run with PP_ERROR_ABORTED. The plugin should not make further calls to |
201 * the decoder until the decoder signals completion by running |callback|. | 201 * the decoder other than RecyclePicture() until the decoder signals |
202 * The pictures in use by the plugin remain valid until decoding is resumed, | 202 * completion by running |callback|. Any pictures held by the plugin remain |
203 * but need not be recycled. | 203 * valid during and after the reset and should be recycled back to the |
| 204 * decoder. |
204 * | 205 * |
205 * @param[in] video_decoder A <code>PP_Resource</code> identifying the video | 206 * @param[in] video_decoder A <code>PP_Resource</code> identifying the video |
206 * decoder. | 207 * decoder. |
207 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on | 208 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on |
208 * completion. | 209 * completion. |
209 * | 210 * |
210 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 211 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
211 * Returns PP_ERROR_FAILED if the decoder isn't initialized. | 212 * Returns PP_ERROR_FAILED if the decoder isn't initialized. |
212 */ | 213 */ |
213 int32_t (*Reset)(PP_Resource video_decoder, | 214 int32_t (*Reset)(PP_Resource video_decoder, |
214 struct PP_CompletionCallback callback); | 215 struct PP_CompletionCallback callback); |
215 }; | 216 }; |
216 /** | 217 /** |
217 * @} | 218 * @} |
218 */ | 219 */ |
219 | 220 |
220 #endif /* PPAPI_C_PPB_VIDEO_DECODER_H_ */ | 221 #endif /* PPAPI_C_PPB_VIDEO_DECODER_H_ */ |
221 | 222 |
OLD | NEW |