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.
6 /* From pp_codecs.idl modified Wed Feb 4 05:24:21 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"
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
46 * Hardware acceleration options.
49 /** Create a hardware accelerated resource only. */
50 PP_HARDWAREACCELERATION_ONLY
= 0,
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
;
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
{
75 * |decode_id| parameter of the Decode call which generated this picture.
76 * See the PPB_VideoDecoder function Decode() for more details.
80 * Texture ID in the plugin's GL context. The plugin can use this to render
81 * the decoded picture.
85 * The GL texture target for the decoded picture. Possible values are:
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
;
94 * Dimensions of the texture holding the decoded picture.
96 struct PP_Size texture_size
;
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.
116 * Texture ID in the plugin's GL context. The plugin can use this to render
117 * the decoded picture.
121 * The GL texture target for the decoded picture. Possible values are:
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
{
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 * A value indicating if the profile is available in hardware, software, or
160 PP_HardwareAcceleration acceleration
;
164 * Struct describing a bitstream buffer.
166 struct PP_BitstreamBuffer
{
168 * The size, in bytes, of the bitstream data.
172 * The base address of the bitstream data.
176 * Whether the buffer represents a key frame.
184 #endif /* PPAPI_C_PP_CODECS_H_ */