Drive: Add BatchableRequest subclass.
[chromium-blink-merge.git] / ppapi / api / pp_codecs.idl
blob3a20e985ce1c8f790e7d21e9daaa0106361eadd1
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
3 * found in the LICENSE file.
4 */
6 /**
7 * Video profiles.
8 */
9 enum PP_VideoProfile {
10 PP_VIDEOPROFILE_H264BASELINE = 0,
11 PP_VIDEOPROFILE_H264MAIN = 1,
12 PP_VIDEOPROFILE_H264EXTENDED = 2,
13 PP_VIDEOPROFILE_H264HIGH = 3,
14 PP_VIDEOPROFILE_H264HIGH10PROFILE = 4,
15 PP_VIDEOPROFILE_H264HIGH422PROFILE = 5,
16 PP_VIDEOPROFILE_H264HIGH444PREDICTIVEPROFILE = 6,
17 PP_VIDEOPROFILE_H264SCALABLEBASELINE = 7,
18 PP_VIDEOPROFILE_H264SCALABLEHIGH = 8,
19 PP_VIDEOPROFILE_H264STEREOHIGH = 9,
20 PP_VIDEOPROFILE_H264MULTIVIEWHIGH = 10,
21 PP_VIDEOPROFILE_VP8_ANY = 11,
22 PP_VIDEOPROFILE_VP9_ANY = 12,
23 PP_VIDEOPROFILE_MAX = PP_VIDEOPROFILE_VP9_ANY
26 /**
27 * Hardware acceleration options.
29 enum PP_HardwareAcceleration {
30 /** Create a hardware accelerated resource only. */
31 PP_HARDWAREACCELERATION_ONLY = 0,
33 /**
34 * Create a hardware accelerated resource if possible. Otherwise, fall back
35 * to the software implementation.
37 PP_HARDWAREACCELERATION_WITHFALLBACK = 1,
39 /** Create the software implementation only. */
40 PP_HARDWAREACCELERATION_NONE = 2,
42 PP_HARDWAREACCELERATION_LAST = PP_HARDWAREACCELERATION_NONE
45 /**
46 * Struct describing a decoded video picture. The decoded picture data is stored
47 * in the GL texture corresponding to |texture_id|. The plugin can determine
48 * which Decode call generated the picture using |decode_id|.
50 struct PP_VideoPicture {
51 /**
52 * |decode_id| parameter of the Decode call which generated this picture.
53 * See the PPB_VideoDecoder function Decode() for more details.
55 uint32_t decode_id;
57 /**
58 * Texture ID in the plugin's GL context. The plugin can use this to render
59 * the decoded picture.
61 uint32_t texture_id;
63 /**
64 * The GL texture target for the decoded picture. Possible values are:
65 * GL_TEXTURE_2D
66 * GL_TEXTURE_RECTANGLE_ARB
67 * GL_TEXTURE_EXTERNAL_OES
69 * The pixel format of the texture is GL_RGBA.
71 uint32_t texture_target;
73 /**
74 * Dimensions of the texture holding the decoded picture.
76 PP_Size texture_size;
78 /**
79 * The visible subrectangle of the picture. The plugin should display only
80 * this part of the picture.
82 PP_Rect visible_rect;
85 /**
86 * Struct describing a decoded video picture. The decoded picture data is stored
87 * in the GL texture corresponding to |texture_id|. The plugin can determine
88 * which Decode call generated the picture using |decode_id|.
90 struct PP_VideoPicture_0_1 {
91 /**
92 * |decode_id| parameter of the Decode call which generated this picture.
93 * See the PPB_VideoDecoder function Decode() for more details.
95 uint32_t decode_id;
97 /**
98 * Texture ID in the plugin's GL context. The plugin can use this to render
99 * the decoded picture.
101 uint32_t texture_id;
104 * The GL texture target for the decoded picture. Possible values are:
105 * GL_TEXTURE_2D
106 * GL_TEXTURE_RECTANGLE_ARB
107 * GL_TEXTURE_EXTERNAL_OES
109 * The pixel format of the texture is GL_RGBA.
111 uint32_t texture_target;
114 * Dimensions of the texture holding the decoded picture.
116 PP_Size texture_size;
120 * Supported video profile information. See the PPB_VideoEncoder function
121 * GetSupportedProfiles() for more details.
123 struct PP_VideoProfileDescription {
125 * The codec profile.
127 PP_VideoProfile profile;
130 * Dimensions of the maximum resolution of video frames, in pixels.
132 PP_Size max_resolution;
135 * The numerator of the maximum frame rate.
137 uint32_t max_framerate_numerator;
140 * The denominator of the maximum frame rate.
142 uint32_t max_framerate_denominator;
145 * A value indicating if the profile is available in hardware, software, or
146 * both.
148 PP_HardwareAcceleration acceleration;
152 * Struct describing a bitstream buffer.
154 struct PP_BitstreamBuffer {
156 * The size, in bytes, of the bitstream data.
158 uint32_t size;
161 * The base address of the bitstream data.
163 mem_t buffer;
166 * Whether the buffer represents a key frame.
168 PP_Bool key_frame;