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

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

Issue 496203002: Pepper: PPB_VideoDecoder software-only mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 6 years, 4 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 | « ppapi/api/pp_codecs.idl ('k') | ppapi/c/pp_codecs.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) 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 [channel=dev] M36 = 0.1 13 [channel=dev] M36 = 0.1,
14 [channel=dev] M39 = 0.2
14 }; 15 };
15 16
16 /** 17 /**
17 * Video decoder interface. 18 * Video decoder interface.
18 * 19 *
19 * Typical usage: 20 * Typical usage:
20 * - Call Create() to create a new video decoder resource. 21 * - Call Create() to create a new video decoder resource.
21 * - Call Initialize() to initialize it with a 3d graphics context and the 22 * - Call Initialize() to initialize it with a 3d graphics context and the
22 * desired codec profile. 23 * desired codec profile.
23 * - Call Decode() continuously (waiting for each previous call to complete) to 24 * - Call Decode() continuously (waiting for each previous call to complete) to
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 * Initialize() again with different parameters to find a good configuration. 84 * Initialize() again with different parameters to find a good configuration.
84 */ 85 */
85 int32_t Initialize( 86 int32_t Initialize(
86 [in] PP_Resource video_decoder, 87 [in] PP_Resource video_decoder,
87 [in] PP_Resource graphics3d_context, 88 [in] PP_Resource graphics3d_context,
88 [in] PP_VideoProfile profile, 89 [in] PP_VideoProfile profile,
89 [in] PP_Bool allow_software_fallback, 90 [in] PP_Bool allow_software_fallback,
90 [in] PP_CompletionCallback callback); 91 [in] PP_CompletionCallback callback);
91 92
92 /** 93 /**
94 * Initializes a video decoder resource. This should be called after Create()
95 * and before any other functions.
96 *
97 * @param[in] video_decoder A <code>PP_Resource</code> identifying the video
98 * decoder.
99 * @param[in] graphics3d_context A <code>PPB_Graphics3D</code> resource to use
100 * during decoding.
101 * @param[in] profile A <code>PP_VideoProfile</code> specifying the video
102 * codec profile.
103 * @param[in] acceleration A <code>PP_HardwareAcceleration</code> specifying
104 * whether to use a hardware accelerated or a software implementation.
105 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
106 * completion.
107 *
108 * @return An int32_t containing an error code from <code>pp_errors.h</code>.
109 * Returns PP_ERROR_NOTSUPPORTED if video decoding is not available, or the
110 * requested profile is not supported. In this case, the client may call
111 * Initialize() again with different parameters to find a good configuration.
112 */
113 [version = 0.2]
114 int32_t Initialize(
115 [in] PP_Resource video_decoder,
116 [in] PP_Resource graphics3d_context,
117 [in] PP_VideoProfile profile,
118 [in] PP_HardwareAcceleration acceleration,
119 [in] PP_CompletionCallback callback);
120
121 /**
93 * Decodes a bitstream buffer. Copies |size| bytes of data from the plugin's 122 * Decodes a bitstream buffer. Copies |size| bytes of data from the plugin's
94 * |buffer|. The plugin should wait until the decoder signals completion by 123 * |buffer|. The plugin should wait until the decoder signals completion by
95 * returning PP_OK or by running |callback| before calling Decode() again. 124 * returning PP_OK or by running |callback| before calling Decode() again.
96 * 125 *
97 * In general, each bitstream buffer should contain a demuxed bitstream frame 126 * In general, each bitstream buffer should contain a demuxed bitstream frame
98 * for the selected video codec. For example, H264 decoders expect to receive 127 * for the selected video codec. For example, H264 decoders expect to receive
99 * one AnnexB NAL unit, including the 4 byte start code prefix, while VP8 128 * one AnnexB NAL unit, including the 4 byte start code prefix, while VP8
100 * decoders expect to receive a bitstream frame without the IVF frame header. 129 * decoders expect to receive a bitstream frame without the IVF frame header.
101 * 130 *
102 * If the call to Decode() eventually results in a picture, the |decode_id| 131 * If the call to Decode() eventually results in a picture, the |decode_id|
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on 236 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on
208 * completion. 237 * completion.
209 * 238 *
210 * @return An int32_t containing an error code from <code>pp_errors.h</code>. 239 * @return An int32_t containing an error code from <code>pp_errors.h</code>.
211 * Returns PP_ERROR_FAILED if the decoder isn't initialized. 240 * Returns PP_ERROR_FAILED if the decoder isn't initialized.
212 */ 241 */
213 int32_t Reset( 242 int32_t Reset(
214 [in] PP_Resource video_decoder, 243 [in] PP_Resource video_decoder,
215 [in] PP_CompletionCallback callback); 244 [in] PP_CompletionCallback callback);
216 }; 245 };
OLDNEW
« no previous file with comments | « ppapi/api/pp_codecs.idl ('k') | ppapi/c/pp_codecs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698