Pepper_42_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 Fri Jan 8 13:55:32 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  * Hardware acceleration options.
47  */
48 typedef enum {
49  /** Create a hardware accelerated resource only. */
51  /**
52  * Create a hardware accelerated resource if possible. Otherwise, fall back
53  * to the software implementation.
54  */
56  /** Create the software implementation only. */
60 /**
61  * @}
62  */
63 
64 /**
65  * @addtogroup Structs
66  * @{
67  */
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|.
72  */
74  /**
75  * |decode_id| parameter of the Decode call which generated this picture.
76  * See the PPB_VideoDecoder function Decode() for more details.
77  */
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.
82  */
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
89  *
90  * The pixel format of the texture is GL_RGBA.
91  */
92  uint32_t texture_target;
93  /**
94  * Dimensions of the texture holding the decoded picture.
95  */
97  /**
98  * The visible subrectangle of the picture. The plugin should display only
99  * this part of the picture.
100  */
102 };
103 
104 /**
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|.
108  */
110  /**
111  * |decode_id| parameter of the Decode call which generated this picture.
112  * See the PPB_VideoDecoder function Decode() for more details.
113  */
114  uint32_t decode_id;
115  /**
116  * Texture ID in the plugin's GL context. The plugin can use this to render
117  * the decoded picture.
118  */
119  uint32_t texture_id;
120  /**
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
125  *
126  * The pixel format of the texture is GL_RGBA.
127  */
128  uint32_t texture_target;
129  /**
130  * Dimensions of the texture holding the decoded picture.
131  */
133 };
134 
135 /**
136  * Supported video profile information. See the PPB_VideoEncoder function
137  * GetSupportedProfiles() for more details.
138  */
140  /**
141  * The codec profile.
142  */
144  /**
145  * Dimensions of the maximum resolution of video frames, in pixels.
146  */
148  /**
149  * The numerator of the maximum frame rate.
150  */
152  /**
153  * The denominator of the maximum frame rate.
154  */
156  /**
157  * Whether the profile is hardware accelerated.
158  */
160 };
161 
162 /**
163  * Supported video profile information. See the PPB_VideoEncoder function
164  * GetSupportedProfiles() for more details.
165  */
167  /**
168  * The codec profile.
169  */
171  /**
172  * Dimensions of the maximum resolution of video frames, in pixels.
173  */
175  /**
176  * The numerator of the maximum frame rate.
177  */
179  /**
180  * The denominator of the maximum frame rate.
181  */
183  /**
184  * A value indicating if the profile is available in hardware, software, or
185  * both.
186  */
188 };
189 
190 /**
191  * Struct describing a bitstream buffer.
192  */
194  /**
195  * The size, in bytes, of the bitstream data.
196  */
197  uint32_t size;
198  /**
199  * The base address of the bitstream data.
200  */
201  void* buffer;
202  /**
203  * Whether the buffer represents a key frame.
204  */
206 };
207 /**
208  * @}
209  */
210 
211 #endif /* PPAPI_C_PP_CODECS_H_ */
212 
PP_VideoProfile
Definition: pp_codecs.h:28
PP_HardwareAcceleration
Definition: pp_codecs.h:48
uint32_t texture_id
Definition: pp_codecs.h:119
uint32_t max_framerate_denominator
Definition: pp_codecs.h:155
struct PP_Size max_resolution
Definition: pp_codecs.h:147
PP_VideoProfile profile
Definition: pp_codecs.h:143
struct PP_Size max_resolution
Definition: pp_codecs.h:174
struct PP_Rect visible_rect
Definition: pp_codecs.h:101
uint32_t texture_target
Definition: pp_codecs.h:92
struct PP_Size texture_size
Definition: pp_codecs.h:132
struct PP_Size texture_size
Definition: pp_codecs.h:96
uint32_t max_framerate_numerator
Definition: pp_codecs.h:151
uint32_t texture_target
Definition: pp_codecs.h:128
uint32_t decode_id
Definition: pp_codecs.h:78
uint32_t texture_id
Definition: pp_codecs.h:83
PP_Bool
Definition: pp_bool.h:30
uint32_t decode_id
Definition: pp_codecs.h:114
PP_HardwareAcceleration acceleration
Definition: pp_codecs.h:187