| 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 /** | 6 /** |
| 7 * This file defines the <code>PPB_VideoDecoder</code> interface. | 7 * This file defines the <code>PPB_VideoDecoder</code> interface. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 [generate_thunk] | 10 [generate_thunk] |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 [in] PP_VideoPicture picture); | 170 [in] PP_VideoPicture picture); |
| 171 | 171 |
| 172 /** | 172 /** |
| 173 * Flushes the decoder. The plugin should call Flush() when it reaches the | 173 * Flushes the decoder. The plugin should call Flush() when it reaches the |
| 174 * end of its video stream in order to stop cleanly. The decoder will run any | 174 * end of its video stream in order to stop cleanly. The decoder will run any |
| 175 * pending Decode() call to completion. The plugin should make no further | 175 * pending Decode() call to completion. The plugin should make no further |
| 176 * calls to the decoder other than GetPicture() and RecyclePicture() until | 176 * calls to the decoder other than GetPicture() and RecyclePicture() until |
| 177 * the decoder signals completion by running |callback|. Just before | 177 * the decoder signals completion by running |callback|. Just before |
| 178 * completion, any pending GetPicture() call will complete by running its | 178 * completion, any pending GetPicture() call will complete by running its |
| 179 * callback with result PP_ERROR_ABORTED to signal that no more pictures are | 179 * callback with result PP_ERROR_ABORTED to signal that no more pictures are |
| 180 * available. The plugin should recycle any pictures it is using before | 180 * available. Any pictures held by the plugin remain valid during and after |
| 181 * resuming decoding. | 181 * the flush and should be recycled back to the decoder. |
| 182 * | 182 * |
| 183 * @param[in] video_decoder A <code>PP_Resource</code> identifying the video | 183 * @param[in] video_decoder A <code>PP_Resource</code> identifying the video |
| 184 * decoder. | 184 * decoder. |
| 185 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on | 185 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on |
| 186 * completion. | 186 * completion. |
| 187 * | 187 * |
| 188 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 188 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
| 189 * Returns PP_ERROR_FAILED if the decoder isn't initialized. | 189 * Returns PP_ERROR_FAILED if the decoder isn't initialized. |
| 190 */ | 190 */ |
| 191 int32_t Flush( | 191 int32_t Flush( |
| 192 [in] PP_Resource video_decoder, | 192 [in] PP_Resource video_decoder, |
| 193 [in] PP_CompletionCallback callback); | 193 [in] PP_CompletionCallback callback); |
| 194 | 194 |
| 195 /** | 195 /** |
| 196 * Resets the decoder as quickly as possible. The plugin can call Reset() to | 196 * Resets the decoder as quickly as possible. The plugin can call Reset() to |
| 197 * skip to another position in the video stream. After Reset() returns, any | 197 * skip to another position in the video stream. After Reset() returns, any |
| 198 * pending calls to Decode() and GetPicture()) abort, causing their callbacks | 198 * pending calls to Decode() and GetPicture()) abort, causing their callbacks |
| 199 * to run with PP_ERROR_ABORTED. The plugin should not make further calls to | 199 * to run with PP_ERROR_ABORTED. The plugin should not make further calls to |
| 200 * the decoder until the decoder signals completion by running |callback|. | 200 * the decoder other than RecyclePicture() until the decoder signals |
| 201 * The pictures in use by the plugin remain valid until decoding is resumed, | 201 * completion by running |callback|. Any pictures held by the plugin remain |
| 202 * but need not be recycled. | 202 * valid during and after the reset and should be recycled back to the |
| 203 * decoder. |
| 203 * | 204 * |
| 204 * @param[in] video_decoder A <code>PP_Resource</code> identifying the video | 205 * @param[in] video_decoder A <code>PP_Resource</code> identifying the video |
| 205 * decoder. | 206 * decoder. |
| 206 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on | 207 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on |
| 207 * completion. | 208 * completion. |
| 208 * | 209 * |
| 209 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 210 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
| 210 * Returns PP_ERROR_FAILED if the decoder isn't initialized. | 211 * Returns PP_ERROR_FAILED if the decoder isn't initialized. |
| 211 */ | 212 */ |
| 212 int32_t Reset( | 213 int32_t Reset( |
| 213 [in] PP_Resource video_decoder, | 214 [in] PP_Resource video_decoder, |
| 214 [in] PP_CompletionCallback callback); | 215 [in] PP_CompletionCallback callback); |
| 215 }; | 216 }; |
| OLD | NEW |