| 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 Tue May 6 05:19:45 2014. */ | 6 /* From ppb_video_decoder.idl modified Mon May 19 18:06:32 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 * requested profile is not supported. In this case, the client may call | 93 * requested profile is not supported. In this case, the client may call |
| 94 * Initialize() again with different parameters to find a good configuration. | 94 * Initialize() again with different parameters to find a good configuration. |
| 95 */ | 95 */ |
| 96 int32_t (*Initialize)(PP_Resource video_decoder, | 96 int32_t (*Initialize)(PP_Resource video_decoder, |
| 97 PP_Resource graphics3d_context, | 97 PP_Resource graphics3d_context, |
| 98 PP_VideoProfile profile, | 98 PP_VideoProfile profile, |
| 99 PP_Bool allow_software_fallback, | 99 PP_Bool allow_software_fallback, |
| 100 struct PP_CompletionCallback callback); | 100 struct PP_CompletionCallback callback); |
| 101 /** | 101 /** |
| 102 * Decodes a bitstream buffer. Copies |size| bytes of data from the plugin's | 102 * Decodes a bitstream buffer. Copies |size| bytes of data from the plugin's |
| 103 * |buffer|. The plugin should maintain the buffer and not call Decode() again | 103 * |buffer|. The plugin should wait until the decoder signals completion by |
| 104 * until the decoder signals completion by returning PP_OK or by running | 104 * returning PP_OK or by running |callback| before calling Decode() again. |
| 105 * |callback|. | |
| 106 * | 105 * |
| 107 * In general, each bitstream buffer should contain a demuxed bitstream frame | 106 * In general, each bitstream buffer should contain a demuxed bitstream frame |
| 108 * for the selected video codec. For example, H264 decoders expect to receive | 107 * for the selected video codec. For example, H264 decoders expect to receive |
| 109 * one AnnexB NAL unit, including the 4 byte start code prefix, while VP8 | 108 * one AnnexB NAL unit, including the 4 byte start code prefix, while VP8 |
| 110 * decoders expect to receive a bitstream frame without the IVF frame header. | 109 * decoders expect to receive a bitstream frame without the IVF frame header. |
| 111 * | 110 * |
| 112 * If the call to Decode() eventually results in a picture, the |decode_id| | 111 * If the call to Decode() eventually results in a picture, the |decode_id| |
| 113 * parameter is copied into the returned picture. The plugin can use this to | 112 * parameter is copied into the returned picture. The plugin can use this to |
| 114 * associate decoded pictures with Decode() calls (e.g. to assign timestamps | 113 * associate decoded pictures with Decode() calls (e.g. to assign timestamps |
| 115 * or frame numbers to pictures.) This value is opaque to the API so the | 114 * or frame numbers to pictures.) This value is opaque to the API so the |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 */ | 199 */ |
| 201 int32_t (*Reset)(PP_Resource video_decoder, | 200 int32_t (*Reset)(PP_Resource video_decoder, |
| 202 struct PP_CompletionCallback callback); | 201 struct PP_CompletionCallback callback); |
| 203 }; | 202 }; |
| 204 /** | 203 /** |
| 205 * @} | 204 * @} |
| 206 */ | 205 */ |
| 207 | 206 |
| 208 #endif /* PPAPI_C_PPB_VIDEO_DECODER_H_ */ | 207 #endif /* PPAPI_C_PPB_VIDEO_DECODER_H_ */ |
| 209 | 208 |
| OLD | NEW |