Pepper_47_C_interfaces
pp_codecs.h
Go to the documentation of this file.
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  */
5 
6 /* From pp_codecs.idl modified Thu Oct 20 13:57:04 2016. */
7 
8 #ifndef PPAPI_C_PP_CODECS_H_
9 #define PPAPI_C_PP_CODECS_H_
10 
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"
17 
18 /**
19  * @file
20  * Video profiles.
21  */
22 
23 
24 /**
25  * @addtogroup Enums
26  * @{
27  */
28 typedef enum {
44 
45 /**
46  * Audio profiles.
47  */
48 typedef enum {
52 
53 /**
54  * Hardware acceleration options.
55  */
56 typedef enum {
57  /** Create a hardware accelerated resource only. */
59  /**
60  * Create a hardware accelerated resource if possible. Otherwise, fall back
61  * to the software implementation.
62  */
64  /** Create the software implementation only. */
68 /**
69  * @}
70  */
71 
72 /**
73  * @addtogroup Structs
74  * @{
75  */
76 /**
77  * Struct describing a decoded video picture. The decoded picture data is stored
78  * in the GL texture corresponding to |texture_id|. The plugin can determine
79  * which Decode call generated the picture using |decode_id|.
80  */
82  /**
83  * |decode_id| parameter of the Decode call which generated this picture.
84  * See the PPB_VideoDecoder function Decode() for more details.
85  */
86  uint32_t decode_id;
87  /**
88  * Texture ID in the plugin's GL context. The plugin can use this to render
89  * the decoded picture.
90  */
91  uint32_t texture_id;
92  /**
93  * The GL texture target for the decoded picture. Possible values are:
94  * GL_TEXTURE_2D
95  * GL_TEXTURE_RECTANGLE_ARB
96  * GL_TEXTURE_EXTERNAL_OES
97  *
98  * The pixel format of the texture is GL_RGBA.
99  */
100  uint32_t texture_target;
101  /**
102  * Dimensions of the texture holding the decoded picture.
103  */
105  /**
106  * The visible subrectangle of the picture. The plugin should display only
107  * this part of the picture.
108  */
110 };
111 
112 /**
113  * Struct describing a decoded video picture. The decoded picture data is stored
114  * in the GL texture corresponding to |texture_id|. The plugin can determine
115  * which Decode call generated the picture using |decode_id|.
116  */
118  /**
119  * |decode_id| parameter of the Decode call which generated this picture.
120  * See the PPB_VideoDecoder function Decode() for more details.
121  */
122  uint32_t decode_id;
123  /**
124  * Texture ID in the plugin's GL context. The plugin can use this to render
125  * the decoded picture.
126  */
127  uint32_t texture_id;
128  /**
129  * The GL texture target for the decoded picture. Possible values are:
130  * GL_TEXTURE_2D
131  * GL_TEXTURE_RECTANGLE_ARB
132  * GL_TEXTURE_EXTERNAL_OES
133  *
134  * The pixel format of the texture is GL_RGBA.
135  */
136  uint32_t texture_target;
137  /**
138  * Dimensions of the texture holding the decoded picture.
139  */
141 };
142 
143 /**
144  * Supported video profile information. See the PPB_VideoEncoder function
145  * GetSupportedProfiles() for more details.
146  */
148  /**
149  * The codec profile.
150  */
152  /**
153  * Dimensions of the maximum resolution of video frames, in pixels.
154  */
156  /**
157  * The numerator of the maximum frame rate.
158  */
160  /**
161  * The denominator of the maximum frame rate.
162  */
164  /**
165  * Whether the profile is hardware accelerated.
166  */
168 };
169 
170 /**
171  * Supported video profile information. See the PPB_VideoEncoder function
172  * GetSupportedProfiles() for more details.
173  */
175  /**
176  * The codec profile.
177  */
179  /**
180  * Dimensions of the maximum resolution of video frames, in pixels.
181  */
183  /**
184  * The numerator of the maximum frame rate.
185  */
187  /**
188  * The denominator of the maximum frame rate.
189  */
191  /**
192  * A value indicating if the profile is available in hardware, software, or
193  * both.
194  */
196 };
197 
198 /**
199  * Supported audio profile information. See the PPB_AudioEncoder function
200  * GetSupportedProfiles() for more details.
201  */
203  /**
204  * The codec profile.
205  */
207  /**
208  * Maximum number of channels that can be encoded.
209  */
210  uint32_t max_channels;
211  /**
212  * Sample size.
213  */
214  uint32_t sample_size;
215  /**
216  * Sampling rate that can be encoded
217  */
218  uint32_t sample_rate;
219  /**
220  * Whether the profile is hardware accelerated.
221  */
223 };
224 
225 /**
226  * Struct describing a bitstream buffer.
227  */
229  /**
230  * The size, in bytes, of the bitstream data.
231  */
232  uint32_t size;
233  /**
234  * The base address of the bitstream data.
235  */
236  void* buffer;
237  /**
238  * Whether the buffer represents a key frame.
239  */
241 };
242 
243 /**
244  * Struct describing an audio bitstream buffer.
245  */
247  /**
248  * The size, in bytes, of the bitstream data.
249  */
250  uint32_t size;
251  /**
252  * The base address of the bitstream data.
253  */
254  void* buffer;
255 };
256 /**
257  * @}
258  */
259 
260 #endif /* PPAPI_C_PP_CODECS_H_ */
261 
PP_VideoProfile
Definition: pp_codecs.h:28
PP_HardwareAcceleration
Definition: pp_codecs.h:56
uint32_t texture_id
Definition: pp_codecs.h:127
uint32_t max_framerate_denominator
Definition: pp_codecs.h:163
struct PP_Size max_resolution
Definition: pp_codecs.h:155
PP_VideoProfile profile
Definition: pp_codecs.h:151
struct PP_Size max_resolution
Definition: pp_codecs.h:182
struct PP_Rect visible_rect
Definition: pp_codecs.h:109
uint32_t texture_target
Definition: pp_codecs.h:100
struct PP_Size texture_size
Definition: pp_codecs.h:140
struct PP_Size texture_size
Definition: pp_codecs.h:104
uint32_t max_framerate_numerator
Definition: pp_codecs.h:159
uint32_t texture_target
Definition: pp_codecs.h:136
uint32_t decode_id
Definition: pp_codecs.h:86
uint32_t texture_id
Definition: pp_codecs.h:91
PP_Bool
Definition: pp_bool.h:30
PP_AudioProfile
Definition: pp_codecs.h:48
uint32_t decode_id
Definition: pp_codecs.h:122
PP_HardwareAcceleration acceleration
Definition: pp_codecs.h:195
PP_AudioProfile profile
Definition: pp_codecs.h:206