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

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

Issue 6901036: Update VideoDecode PPAPI structs to be consistent with media structures, part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing a few parameter types 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
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_5 "PPB_VideoDecoder(Dev);0.5" 12 #define PPB_VIDEODECODER_DEV_INTERFACE_0_6 "PPB_VideoDecoder(Dev);0.6"
13 #define PPB_VIDEODECODER_DEV_INTERFACE PPB_VIDEODECODER_DEV_INTERFACE_0_5 13 #define PPB_VIDEODECODER_DEV_INTERFACE PPB_VIDEODECODER_DEV_INTERFACE_0_6
Ami GONE FROM CHROMIUM 2011/04/29 18:40:34 ??
vrk (LEFT CHROMIUM) 2011/05/03 18:19:58 Talked offline.
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // with valid elements to the buffer pointed by |matching_configs|. No more 63 // with valid elements to the buffer pointed by |matching_configs|. No more
64 // than |config_size| PP_VideoConfig_Devs will be returned even if more would 64 // than |config_size| PP_VideoConfig_Devs will be returned even if more would
65 // be available for the decoder device. 65 // be available for the decoder device.
66 // 66 //
67 // When this function is called with |matching_configs| = NULL, then no 67 // When this function is called with |matching_configs| = NULL, then no
68 // configurations are returned, but the total number of PP_VideoConfig_Devs 68 // configurations are returned, but the total number of PP_VideoConfig_Devs
69 // available will be returned in |num_of_matching_configs|. 69 // available will be returned in |num_of_matching_configs|.
70 // 70 //
71 // Returns PP_TRUE on success, PP_FALSE otherwise. 71 // Returns PP_TRUE on success, PP_FALSE otherwise.
72 PP_Bool (*GetConfigs)(PP_Instance instance, 72 PP_Bool (*GetConfigs)(PP_Instance instance,
73 struct PP_VideoDecoderConfig_Dev* proto_config, 73 PP_VideoConfigElement* proto_config,
74 struct PP_VideoDecoderConfig_Dev* matching_configs, 74 PP_VideoConfigElement* matching_configs,
75 int32_t matching_configs_size, 75 uint32_t matching_configs_size,
76 int32_t* num_of_matching_configs); 76 uint32_t* num_of_matching_configs);
77 77
78 // Creates a video decoder with requested |decoder_config|. 78 // Creates a video decoder with requested |decoder_config|.
79 // |input_format| in |decoder_config| specifies the format of input access 79 // |input_format| in |decoder_config| specifies the format of input access
80 // unit, with PP_VIDEOKEY_CODECID and PP_VIDEOKEY_PAYLOADFORMAT required. 80 // unit, with PP_VIDEOKEY_CODECID and PP_VIDEOKEY_PAYLOADFORMAT required.
81 // Plugin has the option to specify codec profile/level and other 81 // Plugin has the option to specify codec profile/level and other
82 // information such as PP_VIDEOKEY_ACCELERATION, to let browser choose 82 // information such as PP_VIDEOKEY_ACCELERATION, to let browser choose
83 // the most appropriate decoder. 83 // the most appropriate decoder.
84 // 84 //
85 // Parameters: 85 // Parameters:
86 // |instance| pointer to the plugin instance. 86 // |instance| pointer to the plugin instance.
87 // |dec_config| the configuration which to use to initialize the decoder. 87 // |dec_config| the configuration which to use to initialize the decoder.
88 // 88 //
89 // The created decoder is returned as PP_Resource. NULL means failure. 89 // The created decoder is returned as PP_Resource. NULL means failure.
90 PP_Resource (*Create)(PP_Instance instance, 90 PP_Resource (*Create)(PP_Instance instance,
91 struct PP_VideoDecoderConfig_Dev* dec_config); 91 PP_VideoConfigElement* dec_config);
92 92
93 // Tests whether |resource| is a video decoder created through Create 93 // Tests whether |resource| is a video decoder created through Create
94 // function of this interface. 94 // function of this interface.
95 // 95 //
96 // Parameters: 96 // Parameters:
97 // |resource| is handle to resource to test. 97 // |resource| is handle to resource to test.
98 // 98 //
99 // Returns true if is a video decoder, false otherwise. 99 // Returns true if is a video decoder, false otherwise.
100 PP_Bool (*IsVideoDecoder)(PP_Resource resource); 100 PP_Bool (*IsVideoDecoder)(PP_Resource resource);
101 101
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // AssignPictureBuffer should only get called in response to 137 // AssignPictureBuffer should only get called in response to
138 // ProvidePictureBuffer? 138 // ProvidePictureBuffer?
139 // 139 //
140 // Parameters: 140 // Parameters:
141 // |video_decoder| is the previously created handle to the decoder instance. 141 // |video_decoder| is the previously created handle to the decoder instance.
142 // |no_of_buffers| how many buffers are behind picture buffer pointer. 142 // |no_of_buffers| how many buffers are behind picture buffer pointer.
143 // |picture_buffer| contains the reference to the picture buffer that was 143 // |picture_buffer| contains the reference to the picture buffer that was
144 // processed. 144 // processed.
145 void (*AssignPictureBuffer)(PP_Resource video_decoder, 145 void (*AssignPictureBuffer)(PP_Resource video_decoder,
146 uint32_t no_of_buffers, 146 uint32_t no_of_buffers,
147 union PP_PictureData_Dev* picture_buffer); 147 struct PP_PictureBuffer_Dev* picture_buffers);
148 148
149 // Tells the decoder to reuse given picture buffer. Typical use of this 149 // Tells the decoder to reuse given picture buffer. Typical use of this
150 // function is to call from PictureReady callback to recycle picture buffer 150 // function is to call from PictureReady callback to recycle picture buffer
151 // back to the decoder after blitting the image so that decoder can use the 151 // back to the decoder after blitting the image so that decoder can use the
152 // image for output again. 152 // image for output again.
153 // 153 //
154 // The decoder will ignore any picture buffer not previously provided via 154 // The decoder will ignore any picture buffer not previously provided via
155 // AssignPictureBuffer. 155 // AssignPictureBuffer.
156 // 156 //
157 // TODO(vmr): figure out how the sync will be handled with command buffer as 157 // TODO(vmr): figure out how the sync will be handled with command buffer as
158 // there will be possibly lag due to command buffer implementation 158 // there will be possibly lag due to command buffer implementation
159 // to actual GL swap. At that moment decoder may have already taken 159 // to actual GL swap. At that moment decoder may have already taken
160 // the GL textures for writing output again. 160 // the GL textures for writing output again.
161 // 161 //
162 // Parameters: 162 // Parameters:
163 // |video_decoder| is the previously created handle to the decoder instance. 163 // |video_decoder| is the previously created handle to the decoder instance.
164 // |picture_buffer| contains the reference to the picture buffer that was 164 // |picture_buffer| contains the reference to the picture buffer that was
165 // processed. 165 // processed.
166 void (*ReusePictureBuffer)(PP_Resource video_decoder, 166 void (*ReusePictureBuffer)(PP_Resource video_decoder,
167 union PP_PictureData_Dev* picture_buffer); 167 int32_t picture_buffer_id);
168 168
169 // Dispatches flushing request to the decoder to flush both input and output 169 // Dispatches flushing request to the decoder to flush both input and output
170 // buffers. Successful flushing will result in output of the pictures and 170 // buffers. Successful flushing will result in output of the pictures and
171 // buffers held inside the decoder and returning of bitstream buffers using 171 // buffers held inside the decoder and returning of bitstream buffers using
172 // the callbacks implemented by the plug-in. Once done with flushing, the 172 // the callbacks implemented by the plug-in. Once done with flushing, the
173 // decode will call the |callback|. 173 // decode will call the |callback|.
174 // 174 //
175 // Parameters: 175 // Parameters:
176 // |video_decoder| is the previously created handle to the decoder instance. 176 // |video_decoder| is the previously created handle to the decoder instance.
177 // |callback| is one-time callback that will be called once the flushing 177 // |callback| is one-time callback that will be called once the flushing
(...skipping 15 matching lines...) Expand all
193 // |callback| is one-time callback that will be called once the abortion 193 // |callback| is one-time callback that will be called once the abortion
194 // request has been completed. 194 // request has been completed.
195 // 195 //
196 // Returns PP_TRUE on acceptance of abort request and PP_FALSE if request to 196 // Returns PP_TRUE on acceptance of abort request and PP_FALSE if request to
197 // abort is rejected by the decoder. 197 // abort is rejected by the decoder.
198 PP_Bool (*Abort)(PP_Resource video_decoder, 198 PP_Bool (*Abort)(PP_Resource video_decoder,
199 struct PP_CompletionCallback callback); 199 struct PP_CompletionCallback callback);
200 }; 200 };
201 201
202 #endif /* PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ */ 202 #endif /* PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698