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.
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
29 enum PP_AudioProfile
{
30 PP_AUDIOPROFILE_OPUS
= 0,
31 PP_AUDIOPROFILE_MAX
= PP_AUDIOPROFILE_OPUS
35 * Hardware acceleration options.
37 enum PP_HardwareAcceleration
{
38 /** Create a hardware accelerated resource only. */
39 PP_HARDWAREACCELERATION_ONLY
= 0,
42 * Create a hardware accelerated resource if possible. Otherwise, fall back
43 * to the software implementation.
45 PP_HARDWAREACCELERATION_WITHFALLBACK
= 1,
47 /** Create the software implementation only. */
48 PP_HARDWAREACCELERATION_NONE
= 2,
50 PP_HARDWAREACCELERATION_LAST
= PP_HARDWAREACCELERATION_NONE
54 * Struct describing a decoded video picture. The decoded picture data is stored
55 * in the GL texture corresponding to |texture_id|. The plugin can determine
56 * which Decode call generated the picture using |decode_id|.
58 struct PP_VideoPicture
{
60 * |decode_id| parameter of the Decode call which generated this picture.
61 * See the PPB_VideoDecoder function Decode() for more details.
66 * Texture ID in the plugin's GL context. The plugin can use this to render
67 * the decoded picture.
72 * The GL texture target for the decoded picture. Possible values are:
74 * GL_TEXTURE_RECTANGLE_ARB
75 * GL_TEXTURE_EXTERNAL_OES
77 * The pixel format of the texture is GL_RGBA.
79 uint32_t texture_target
;
82 * Dimensions of the texture holding the decoded picture.
87 * The visible subrectangle of the picture. The plugin should display only
88 * this part of the picture.
94 * Struct describing a decoded video picture. The decoded picture data is stored
95 * in the GL texture corresponding to |texture_id|. The plugin can determine
96 * which Decode call generated the picture using |decode_id|.
98 struct PP_VideoPicture_0_1
{
100 * |decode_id| parameter of the Decode call which generated this picture.
101 * See the PPB_VideoDecoder function Decode() for more details.
106 * Texture ID in the plugin's GL context. The plugin can use this to render
107 * the decoded picture.
112 * The GL texture target for the decoded picture. Possible values are:
114 * GL_TEXTURE_RECTANGLE_ARB
115 * GL_TEXTURE_EXTERNAL_OES
117 * The pixel format of the texture is GL_RGBA.
119 uint32_t texture_target
;
122 * Dimensions of the texture holding the decoded picture.
124 PP_Size texture_size
;
128 * Supported video profile information. See the PPB_VideoEncoder function
129 * GetSupportedProfiles() for more details.
131 struct PP_VideoProfileDescription
{
135 PP_VideoProfile profile
;
138 * Dimensions of the maximum resolution of video frames, in pixels.
140 PP_Size max_resolution
;
143 * The numerator of the maximum frame rate.
145 uint32_t max_framerate_numerator
;
148 * The denominator of the maximum frame rate.
150 uint32_t max_framerate_denominator
;
153 * Whether the profile is hardware accelerated.
155 PP_Bool hardware_accelerated
;
159 * Supported video profile information. See the PPB_VideoEncoder function
160 * GetSupportedProfiles() for more details.
162 struct PP_VideoProfileDescription_0_1
{
166 PP_VideoProfile profile
;
169 * Dimensions of the maximum resolution of video frames, in pixels.
171 PP_Size max_resolution
;
174 * The numerator of the maximum frame rate.
176 uint32_t max_framerate_numerator
;
179 * The denominator of the maximum frame rate.
181 uint32_t max_framerate_denominator
;
184 * A value indicating if the profile is available in hardware, software, or
187 PP_HardwareAcceleration acceleration
;
191 * Supported audio profile information. See the PPB_AudioEncoder function
192 * GetSupportedProfiles() for more details.
194 struct PP_AudioProfileDescription
{
198 PP_AudioProfile profile
;
201 * Maximum number of channels that can be encoded.
203 uint32_t max_channels
;
208 uint32_t sample_size
;
211 * Sampling rate that can be encoded
213 uint32_t sample_rate
;
216 * Whether the profile is hardware accelerated.
218 PP_Bool hardware_accelerated
;
222 * Struct describing a bitstream buffer.
224 struct PP_BitstreamBuffer
{
226 * The size, in bytes, of the bitstream data.
231 * The base address of the bitstream data.
236 * Whether the buffer represents a key frame.
242 * Struct describing an audio bitstream buffer.
244 struct PP_AudioBitstreamBuffer
{
246 * The size, in bytes, of the bitstream data.
251 * The base address of the bitstream data.