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

Side by Side Diff: ppapi/api/ppb_video_decoder.idl

Issue 703753002: Pepper: Expose visible_rect to PPB_VideoDecoder.GetPicture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
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]
11 11
12 label Chrome { 12 label Chrome {
13 /** Though not labeled 'channel=dev', 0.1 is a still a 'Dev' only API. */ 13 /** Though not labeled 'channel=dev', 0.1 is a still a 'Dev' only API. */
14 M36 = 0.1, 14 M36 = 0.1,
15 M39 = 0.2 15 M39 = 0.2,
16 M40 = 0.3
dmichael (off chromium) 2014/11/05 19:28:08 What do you think about calling this one 1.0?
bbudge 2014/11/05 22:41:48 A little gun-shy now, but OK. Done.
16 }; 17 };
17 18
18 /** 19 /**
19 * Video decoder interface. 20 * Video decoder interface.
20 * 21 *
21 * Typical usage: 22 * Typical usage:
22 * - Call Create() to create a new video decoder resource. 23 * - Call Create() to create a new video decoder resource.
23 * - Call Initialize() to initialize it with a 3d graphics context and the 24 * - Call Initialize() to initialize it with a 3d graphics context and the
24 * desired codec profile. 25 * desired codec profile.
25 * - Call Decode() continuously (waiting for each previous call to complete) to 26 * - Call Decode() continuously (waiting for each previous call to complete) to
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 * 176 *
176 * @return An int32_t containing an error code from <code>pp_errors.h</code>. 177 * @return An int32_t containing an error code from <code>pp_errors.h</code>.
177 * Returns PP_ERROR_FAILED if the decoder isn't initialized or if a Reset() 178 * Returns PP_ERROR_FAILED if the decoder isn't initialized or if a Reset()
178 * call is pending. 179 * call is pending.
179 * Returns PP_ERROR_INPROGRESS if there is another GetPicture() call pending. 180 * Returns PP_ERROR_INPROGRESS if there is another GetPicture() call pending.
180 * Returns PP_ERROR_ABORTED when Reset() is called, or if a call to Flush() 181 * Returns PP_ERROR_ABORTED when Reset() is called, or if a call to Flush()
181 * completes while GetPicture() is pending. 182 * completes while GetPicture() is pending.
182 */ 183 */
183 int32_t GetPicture( 184 int32_t GetPicture(
184 [in] PP_Resource video_decoder, 185 [in] PP_Resource video_decoder,
185 [out] PP_VideoPicture picture, 186 [out] PP_VideoPicture picture,
dmichael (off chromium) 2014/11/05 19:28:08 We could just make a separate PP_VideoPicture_0_2
bbudge 2014/11/05 22:41:47 Redid the patch to define a new version of PP_Vide
186 [in] PP_CompletionCallback callback); 187 [in] PP_CompletionCallback callback);
187 188
188 /** 189 /**
190 * Gets the next picture from the decoder. The picture is valid after the
191 * decoder signals completion by returning PP_OK or running |callback|. The
192 * plugin can call GetPicture() again after the decoder signals completion.
193 * When the plugin is finished using the picture, it should return it to the
194 * system by calling RecyclePicture().
195 *
196 * @param[in] video_decoder A <code>PP_Resource</code> identifying the video
197 * decoder.
198 * @param[out] picture A <code>PP_VideoPicture</code> to hold the decoded
199 * picture.
200 * @param[out] visible_rect A <code>PP_Rect</code> to hold the visible
201 * subrectangle of the picture. The plugin should only display the visible
202 * area of the picture.
203 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on
204 * completion.
205 *
206 * @return An int32_t containing an error code from <code>pp_errors.h</code>.
207 * Returns PP_ERROR_FAILED if the decoder isn't initialized or if a Reset()
208 * call is pending.
209 * Returns PP_ERROR_INPROGRESS if there is another GetPicture() call pending.
210 * Returns PP_ERROR_ABORTED when Reset() is called, or if a call to Flush()
211 * completes while GetPicture() is pending.
212 */
213 [version = 0.3]
214 int32_t GetPicture(
215 [in] PP_Resource video_decoder,
216 [out] PP_VideoPicture picture,
217 [out] PP_Rect visible_rect,
218 [in] PP_CompletionCallback callback);
219
220 /**
189 * Recycles a picture that the plugin has received from the decoder. 221 * Recycles a picture that the plugin has received from the decoder.
190 * The plugin should call this as soon as it has finished using the texture so 222 * The plugin should call this as soon as it has finished using the texture so
191 * the decoder can decode more pictures. 223 * the decoder can decode more pictures.
192 * 224 *
193 * @param[in] video_decoder A <code>PP_Resource</code> identifying the video 225 * @param[in] video_decoder A <code>PP_Resource</code> identifying the video
194 * decoder. 226 * decoder.
195 * @param[in] picture A <code>PP_VideoPicture</code> to return to 227 * @param[in] picture A <code>PP_VideoPicture</code> to return to
196 * the decoder. 228 * the decoder.
197 */ 229 */
198 void RecyclePicture( 230 void RecyclePicture(
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on 269 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on
238 * completion. 270 * completion.
239 * 271 *
240 * @return An int32_t containing an error code from <code>pp_errors.h</code>. 272 * @return An int32_t containing an error code from <code>pp_errors.h</code>.
241 * Returns PP_ERROR_FAILED if the decoder isn't initialized. 273 * Returns PP_ERROR_FAILED if the decoder isn't initialized.
242 */ 274 */
243 int32_t Reset( 275 int32_t Reset(
244 [in] PP_Resource video_decoder, 276 [in] PP_Resource video_decoder,
245 [in] PP_CompletionCallback callback); 277 [in] PP_CompletionCallback callback);
246 }; 278 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698