Chromium Code Reviews| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 */ | 84 */ |
| 85 int32_t Initialize( | 85 int32_t Initialize( |
| 86 [in] PP_Resource video_decoder, | 86 [in] PP_Resource video_decoder, |
| 87 [in] PP_Resource graphics3d_context, | 87 [in] PP_Resource graphics3d_context, |
| 88 [in] PP_VideoProfile profile, | 88 [in] PP_VideoProfile profile, |
| 89 [in] PP_Bool allow_software_fallback, | 89 [in] PP_Bool allow_software_fallback, |
| 90 [in] PP_CompletionCallback callback); | 90 [in] PP_CompletionCallback callback); |
| 91 | 91 |
| 92 /** | 92 /** |
| 93 * Decodes a bitstream buffer. Copies |size| bytes of data from the plugin's | 93 * Decodes a bitstream buffer. Copies |size| bytes of data from the plugin's |
| 94 * |buffer|. The plugin should maintain the buffer and not call Decode() again | 94 * |buffer|. The plugin should wait until the decoder signals completion by |
| 95 * until the decoder signals completion by returning PP_OK or by running | 95 * returning PP_OK or by running |callback| before calling Decode() again. |
|
dmichael (off chromium)
2014/05/20 19:47:32
May be worth noting that otherwise it will fail wi
bbudge
2014/05/20 21:04:57
Documented this in the @return section.
| |
| 96 * |callback|. | |
| 97 * | 96 * |
| 98 * In general, each bitstream buffer should contain a demuxed bitstream frame | 97 * In general, each bitstream buffer should contain a demuxed bitstream frame |
| 99 * for the selected video codec. For example, H264 decoders expect to receive | 98 * for the selected video codec. For example, H264 decoders expect to receive |
| 100 * one AnnexB NAL unit, including the 4 byte start code prefix, while VP8 | 99 * one AnnexB NAL unit, including the 4 byte start code prefix, while VP8 |
| 101 * decoders expect to receive a bitstream frame without the IVF frame header. | 100 * decoders expect to receive a bitstream frame without the IVF frame header. |
| 102 * | 101 * |
| 103 * If the call to Decode() eventually results in a picture, the |decode_id| | 102 * If the call to Decode() eventually results in a picture, the |decode_id| |
| 104 * parameter is copied into the returned picture. The plugin can use this to | 103 * parameter is copied into the returned picture. The plugin can use this to |
| 105 * associate decoded pictures with Decode() calls (e.g. to assign timestamps | 104 * associate decoded pictures with Decode() calls (e.g. to assign timestamps |
| 106 * or frame numbers to pictures.) This value is opaque to the API so the | 105 * or frame numbers to pictures.) This value is opaque to the API so the |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 194 * decoder. | 193 * decoder. |
| 195 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on | 194 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on |
| 196 * completion. | 195 * completion. |
| 197 * | 196 * |
| 198 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 197 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
| 199 */ | 198 */ |
| 200 int32_t Reset( | 199 int32_t Reset( |
| 201 [in] PP_Resource video_decoder, | 200 [in] PP_Resource video_decoder, |
| 202 [in] PP_CompletionCallback callback); | 201 [in] PP_CompletionCallback callback); |
| 203 }; | 202 }; |
| OLD | NEW |