Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: ppapi/c/dev/ppb_video_decoder_dev.h

Issue 7065010: Add initialization callback support for Video Decoder PPAPI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CR comments Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/video/video_decode_accelerator.h ('k') | ppapi/cpp/dev/video_decoder_dev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2011 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 #ifndef PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ 5 #ifndef PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_
6 #define PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ 6 #define PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_
7 7
8 #include "ppapi/c/dev/pp_video_dev.h" 8 #include "ppapi/c/dev/pp_video_dev.h"
9 #include "ppapi/c/pp_completion_callback.h" 9 #include "ppapi/c/pp_completion_callback.h"
10 #include "ppapi/c/pp_var.h" 10 #include "ppapi/c/pp_var.h"
11 11
12 #define PPB_VIDEODECODER_DEV_INTERFACE_0_7 "PPB_VideoDecoder(Dev);0.7" 12 #define PPB_VIDEODECODER_DEV_INTERFACE_0_8 "PPB_VideoDecoder(Dev);0.8"
13 #define PPB_VIDEODECODER_DEV_INTERFACE PPB_VIDEODECODER_DEV_INTERFACE_0_7 13 #define PPB_VIDEODECODER_DEV_INTERFACE PPB_VIDEODECODER_DEV_INTERFACE_0_8
14 14
15 // Video decoder interface. 15 // Video decoder interface.
16 // 16 //
17 // Basic usage: 17 // Basic usage:
18 // 1. Use GetConfigs() to query potential configurations. Configuration 18 // 1. Use GetConfigs() to query potential configurations. Configuration
19 // information includes: 19 // information includes:
20 // a. Bitstream format. 20 // a. Bitstream format.
21 // b. Output picture format. 21 // b. Output picture format.
22 // c. Output picture buffer storage type. 22 // c. Output picture buffer storage type.
23 // 2. Select configuration that suits you and Create() the decoder with the 23 // 2. Select configuration that suits you and Create() the decoder with the
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // Creates a video decoder with requested |decoder_config|. 124 // Creates a video decoder with requested |decoder_config|.
125 // |input_format| in |decoder_config| specifies the format of input access 125 // |input_format| in |decoder_config| specifies the format of input access
126 // unit, with PP_VIDEOKEY_CODECID and PP_VIDEOKEY_PAYLOADFORMAT required. 126 // unit, with PP_VIDEOKEY_CODECID and PP_VIDEOKEY_PAYLOADFORMAT required.
127 // Plugin has the option to specify codec profile/level and other 127 // Plugin has the option to specify codec profile/level and other
128 // information such as PP_VIDEOKEY_ACCELERATION, to let browser choose 128 // information such as PP_VIDEOKEY_ACCELERATION, to let browser choose
129 // the most appropriate decoder. 129 // the most appropriate decoder.
130 // 130 //
131 // Parameters: 131 // Parameters:
132 // |instance| pointer to the plugin instance. 132 // |instance| pointer to the plugin instance.
133 // |dec_config| the configuration which to use to initialize the decoder. 133 // |dec_config| the configuration which to use to initialize the decoder.
134 // |callback| called after initialize is complete.
134 // 135 //
135 // The created decoder is returned as PP_Resource. NULL means failure. 136 // The created decoder is returned as PP_Resource. NULL means failure.
136 PP_Resource (*Create)(PP_Instance instance, 137 PP_Resource (*Create)(PP_Instance instance,
darin (slow to review) 2011/05/31 21:40:47 This method is misusing PP_CompletionCallback. An
137 PP_VideoConfigElement* dec_config); 138 PP_VideoConfigElement* dec_config,
139 struct PP_CompletionCallback callback);
138 140
139 // Tests whether |resource| is a video decoder created through Create 141 // Tests whether |resource| is a video decoder created through Create
140 // function of this interface. 142 // function of this interface.
141 // 143 //
142 // Parameters: 144 // Parameters:
143 // |resource| is handle to resource to test. 145 // |resource| is handle to resource to test.
144 // 146 //
145 // Returns true if is a video decoder, false otherwise. 147 // Returns true if is a video decoder, false otherwise.
146 PP_Bool (*IsVideoDecoder)(PP_Resource resource); 148 PP_Bool (*IsVideoDecoder)(PP_Resource resource);
147 149
148 // Dispatches bitstream buffer to the decoder. This is asynchronous and 150 // Dispatches bitstream buffer to the decoder. This is asynchronous and
149 // non-blocking function. 151 // non-blocking function.
150 // 152 //
151 // Parameters: 153 // Parameters:
152 // |video_decoder| is the previously created handle to the decoder instance. 154 // |video_decoder| is the previously created handle to the decoder instance.
153 // |bitstream_buffer| is the bitstream buffer that contains the input data. 155 // |bitstream_buffer| is the bitstream buffer that contains the input data.
154 // |callback| will be called when |bitstream_buffer| has been processed by 156 // |callback| will be called when |bitstream_buffer| has been processed by
155 // the decoder. 157 // the decoder.
156 // 158 //
157 // Returns PP_TRUE on decoder successfully accepting buffer, PP_FALSE 159 // Returns PP_TRUE on decoder successfully accepting buffer, PP_FALSE
158 // otherwise. 160 // otherwise.
159 PP_Bool (*Decode)(PP_Resource video_decoder, 161 PP_Bool (*Decode)(PP_Resource video_decoder,
darin (slow to review) 2011/05/31 21:40:47 this method signature is also wrong. it should re
160 struct PP_VideoBitstreamBuffer_Dev* bitstream_buffer, 162 struct PP_VideoBitstreamBuffer_Dev* bitstream_buffer,
161 struct PP_CompletionCallback callback); 163 struct PP_CompletionCallback callback);
162 164
163 // Provides the decoder with picture buffers for video decoding. 165 // Provides the decoder with picture buffers for video decoding.
164 // AssignGLESBuffers provides texture-backed buffers, whereas 166 // AssignGLESBuffers provides texture-backed buffers, whereas
165 // AssignSysmemBuffers provides system memory-backed buffers. 167 // AssignSysmemBuffers provides system memory-backed buffers.
166 // 168 //
167 // This function should be called when decoder has issued the 169 // This function should be called when decoder has issued the
168 // ProvidePictureBuffers callback to the plugin with buffer requirements. 170 // ProvidePictureBuffers callback to the plugin with buffer requirements.
169 // 171 //
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // the callbacks implemented by the plug-in. Once done with flushing, the 222 // the callbacks implemented by the plug-in. Once done with flushing, the
221 // decode will call the |callback|. 223 // decode will call the |callback|.
222 // 224 //
223 // Parameters: 225 // Parameters:
224 // |video_decoder| is the previously created handle to the decoder instance. 226 // |video_decoder| is the previously created handle to the decoder instance.
225 // |callback| is one-time callback that will be called once the flushing 227 // |callback| is one-time callback that will be called once the flushing
226 // request has been completed. 228 // request has been completed.
227 // 229 //
228 // Returns PP_TRUE on acceptance of flush request and PP_FALSE if request to 230 // Returns PP_TRUE on acceptance of flush request and PP_FALSE if request to
229 // flush is rejected by the decoder. 231 // flush is rejected by the decoder.
230 PP_Bool (*Flush)(PP_Resource video_decoder, 232 PP_Bool (*Flush)(PP_Resource video_decoder,
darin (slow to review) 2011/05/31 21:40:47 ditto
231 struct PP_CompletionCallback callback); 233 struct PP_CompletionCallback callback);
232 234
233 // Dispatches abortion request to the decoder to abort decoding as soon as 235 // Dispatches abortion request to the decoder to abort decoding as soon as
234 // possible and will not output anything or generate new callbacks. |callback| 236 // possible and will not output anything or generate new callbacks. |callback|
235 // will be called as soon as abortion has been finished. After abortion all 237 // will be called as soon as abortion has been finished. After abortion all
236 // buffers can be considered dismissed even when there has not been callbacks 238 // buffers can be considered dismissed even when there has not been callbacks
237 // to dismiss them. 239 // to dismiss them.
238 // 240 //
239 // Parameters: 241 // Parameters:
240 // |video_decoder| is the previously created handle to the decoder instance. 242 // |video_decoder| is the previously created handle to the decoder instance.
241 // |callback| is one-time callback that will be called once the abortion 243 // |callback| is one-time callback that will be called once the abortion
242 // request has been completed. 244 // request has been completed.
243 // 245 //
244 // Returns PP_TRUE on acceptance of abort request and PP_FALSE if request to 246 // Returns PP_TRUE on acceptance of abort request and PP_FALSE if request to
245 // abort is rejected by the decoder. 247 // abort is rejected by the decoder.
246 PP_Bool (*Abort)(PP_Resource video_decoder, 248 PP_Bool (*Abort)(PP_Resource video_decoder,
darin (slow to review) 2011/05/31 21:40:47 ditto
247 struct PP_CompletionCallback callback); 249 struct PP_CompletionCallback callback);
248 }; 250 };
249 251
250 #endif /* PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ */ 252 #endif /* PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ */
OLDNEW
« no previous file with comments | « media/video/video_decode_accelerator.h ('k') | ppapi/cpp/dev/video_decoder_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698