Fix race condition in WebstoreInstallHelper.
[chromium-blink-merge.git] / ppapi / c / pp_codecs.h
blob173f9f4325e129aa7792728c48312b53b18eb6c2
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 /* From pp_codecs.idl modified Fri Apr 17 10:55:27 2015. */
8 #ifndef PPAPI_C_PP_CODECS_H_
9 #define PPAPI_C_PP_CODECS_H_
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_macros.h"
13 #include "ppapi/c/pp_point.h"
14 #include "ppapi/c/pp_rect.h"
15 #include "ppapi/c/pp_size.h"
16 #include "ppapi/c/pp_stdint.h"
18 /**
19 * @file
20 * Video profiles.
24 /**
25 * @addtogroup Enums
26 * @{
28 typedef enum {
29 PP_VIDEOPROFILE_H264BASELINE = 0,
30 PP_VIDEOPROFILE_H264MAIN = 1,
31 PP_VIDEOPROFILE_H264EXTENDED = 2,
32 PP_VIDEOPROFILE_H264HIGH = 3,
33 PP_VIDEOPROFILE_H264HIGH10PROFILE = 4,
34 PP_VIDEOPROFILE_H264HIGH422PROFILE = 5,
35 PP_VIDEOPROFILE_H264HIGH444PREDICTIVEPROFILE = 6,
36 PP_VIDEOPROFILE_H264SCALABLEBASELINE = 7,
37 PP_VIDEOPROFILE_H264SCALABLEHIGH = 8,
38 PP_VIDEOPROFILE_H264STEREOHIGH = 9,
39 PP_VIDEOPROFILE_H264MULTIVIEWHIGH = 10,
40 PP_VIDEOPROFILE_VP8_ANY = 11,
41 PP_VIDEOPROFILE_VP9_ANY = 12,
42 PP_VIDEOPROFILE_MAX = PP_VIDEOPROFILE_VP9_ANY
43 } PP_VideoProfile;
45 /**
46 * Hardware acceleration options.
48 typedef enum {
49 /** Create a hardware accelerated resource only. */
50 PP_HARDWAREACCELERATION_ONLY = 0,
51 /**
52 * Create a hardware accelerated resource if possible. Otherwise, fall back
53 * to the software implementation.
55 PP_HARDWAREACCELERATION_WITHFALLBACK = 1,
56 /** Create the software implementation only. */
57 PP_HARDWAREACCELERATION_NONE = 2,
58 PP_HARDWAREACCELERATION_LAST = PP_HARDWAREACCELERATION_NONE
59 } PP_HardwareAcceleration;
60 /**
61 * @}
64 /**
65 * @addtogroup Structs
66 * @{
68 /**
69 * Struct describing a decoded video picture. The decoded picture data is stored
70 * in the GL texture corresponding to |texture_id|. The plugin can determine
71 * which Decode call generated the picture using |decode_id|.
73 struct PP_VideoPicture {
74 /**
75 * |decode_id| parameter of the Decode call which generated this picture.
76 * See the PPB_VideoDecoder function Decode() for more details.
78 uint32_t decode_id;
79 /**
80 * Texture ID in the plugin's GL context. The plugin can use this to render
81 * the decoded picture.
83 uint32_t texture_id;
84 /**
85 * The GL texture target for the decoded picture. Possible values are:
86 * GL_TEXTURE_2D
87 * GL_TEXTURE_RECTANGLE_ARB
88 * GL_TEXTURE_EXTERNAL_OES
90 * The pixel format of the texture is GL_RGBA.
92 uint32_t texture_target;
93 /**
94 * Dimensions of the texture holding the decoded picture.
96 struct PP_Size texture_size;
97 /**
98 * The visible subrectangle of the picture. The plugin should display only
99 * this part of the picture.
101 struct PP_Rect visible_rect;
105 * Struct describing a decoded video picture. The decoded picture data is stored
106 * in the GL texture corresponding to |texture_id|. The plugin can determine
107 * which Decode call generated the picture using |decode_id|.
109 struct PP_VideoPicture_0_1 {
111 * |decode_id| parameter of the Decode call which generated this picture.
112 * See the PPB_VideoDecoder function Decode() for more details.
114 uint32_t decode_id;
116 * Texture ID in the plugin's GL context. The plugin can use this to render
117 * the decoded picture.
119 uint32_t texture_id;
121 * The GL texture target for the decoded picture. Possible values are:
122 * GL_TEXTURE_2D
123 * GL_TEXTURE_RECTANGLE_ARB
124 * GL_TEXTURE_EXTERNAL_OES
126 * The pixel format of the texture is GL_RGBA.
128 uint32_t texture_target;
130 * Dimensions of the texture holding the decoded picture.
132 struct PP_Size texture_size;
136 * Supported video profile information. See the PPB_VideoEncoder function
137 * GetSupportedProfiles() for more details.
139 struct PP_VideoProfileDescription {
141 * The codec profile.
143 PP_VideoProfile profile;
145 * Dimensions of the maximum resolution of video frames, in pixels.
147 struct PP_Size max_resolution;
149 * The numerator of the maximum frame rate.
151 uint32_t max_framerate_numerator;
153 * The denominator of the maximum frame rate.
155 uint32_t max_framerate_denominator;
157 * Whether the profile is hardware accelerated.
159 PP_Bool hardware_accelerated;
163 * Supported video profile information. See the PPB_VideoEncoder function
164 * GetSupportedProfiles() for more details.
166 struct PP_VideoProfileDescription_0_1 {
168 * The codec profile.
170 PP_VideoProfile profile;
172 * Dimensions of the maximum resolution of video frames, in pixels.
174 struct PP_Size max_resolution;
176 * The numerator of the maximum frame rate.
178 uint32_t max_framerate_numerator;
180 * The denominator of the maximum frame rate.
182 uint32_t max_framerate_denominator;
184 * A value indicating if the profile is available in hardware, software, or
185 * both.
187 PP_HardwareAcceleration acceleration;
191 * Struct describing a bitstream buffer.
193 struct PP_BitstreamBuffer {
195 * The size, in bytes, of the bitstream data.
197 uint32_t size;
199 * The base address of the bitstream data.
201 void* buffer;
203 * Whether the buffer represents a key frame.
205 PP_Bool key_frame;
208 * @}
211 #endif /* PPAPI_C_PP_CODECS_H_ */