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_SPEEX
= 1,
32 PP_AUDIOPROFILE_MAX
= PP_AUDIOPROFILE_SPEEX
36 * Hardware acceleration options.
38 enum PP_HardwareAcceleration
{
39 /** Create a hardware accelerated resource only. */
40 PP_HARDWAREACCELERATION_ONLY
= 0,
43 * Create a hardware accelerated resource if possible. Otherwise, fall back
44 * to the software implementation.
46 PP_HARDWAREACCELERATION_WITHFALLBACK
= 1,
48 /** Create the software implementation only. */
49 PP_HARDWAREACCELERATION_NONE
= 2,
51 PP_HARDWAREACCELERATION_LAST
= PP_HARDWAREACCELERATION_NONE
55 * Struct describing a decoded video picture. The decoded picture data is stored
56 * in the GL texture corresponding to |texture_id|. The plugin can determine
57 * which Decode call generated the picture using |decode_id|.
59 struct PP_VideoPicture
{
61 * |decode_id| parameter of the Decode call which generated this picture.
62 * See the PPB_VideoDecoder function Decode() for more details.
67 * Texture ID in the plugin's GL context. The plugin can use this to render
68 * the decoded picture.
73 * The GL texture target for the decoded picture. Possible values are:
75 * GL_TEXTURE_RECTANGLE_ARB
76 * GL_TEXTURE_EXTERNAL_OES
78 * The pixel format of the texture is GL_RGBA.
80 uint32_t texture_target
;
83 * Dimensions of the texture holding the decoded picture.
88 * The visible subrectangle of the picture. The plugin should display only
89 * this part of the picture.
95 * Struct describing a decoded video picture. The decoded picture data is stored
96 * in the GL texture corresponding to |texture_id|. The plugin can determine
97 * which Decode call generated the picture using |decode_id|.
99 struct PP_VideoPicture_0_1
{
101 * |decode_id| parameter of the Decode call which generated this picture.
102 * See the PPB_VideoDecoder function Decode() for more details.
107 * Texture ID in the plugin's GL context. The plugin can use this to render
108 * the decoded picture.
113 * The GL texture target for the decoded picture. Possible values are:
115 * GL_TEXTURE_RECTANGLE_ARB
116 * GL_TEXTURE_EXTERNAL_OES
118 * The pixel format of the texture is GL_RGBA.
120 uint32_t texture_target
;
123 * Dimensions of the texture holding the decoded picture.
125 PP_Size texture_size
;
129 * Supported video profile information. See the PPB_VideoEncoder function
130 * GetSupportedProfiles() for more details.
132 struct PP_VideoProfileDescription
{
136 PP_VideoProfile profile
;
139 * Dimensions of the maximum resolution of video frames, in pixels.
141 PP_Size max_resolution
;
144 * The numerator of the maximum frame rate.
146 uint32_t max_framerate_numerator
;
149 * The denominator of the maximum frame rate.
151 uint32_t max_framerate_denominator
;
154 * Whether the profile is hardware accelerated.
156 PP_Bool hardware_accelerated
;
160 * Supported video profile information. See the PPB_VideoEncoder function
161 * GetSupportedProfiles() for more details.
163 struct PP_VideoProfileDescription_0_1
{
167 PP_VideoProfile profile
;
170 * Dimensions of the maximum resolution of video frames, in pixels.
172 PP_Size max_resolution
;
175 * The numerator of the maximum frame rate.
177 uint32_t max_framerate_numerator
;
180 * The denominator of the maximum frame rate.
182 uint32_t max_framerate_denominator
;
185 * A value indicating if the profile is available in hardware, software, or
188 PP_HardwareAcceleration acceleration
;
192 * Supported audio profile information. See the PPB_AudioEncoder function
193 * GetSupportedProfiles() for more details.
195 struct PP_AudioProfileDescription
{
199 PP_AudioProfile profile
;
202 * Maximum number of channels that can be encoded.
204 uint32_t max_channels
;
209 uint32_t sample_size
;
212 * Sampling rate that can be encoded
214 uint32_t sample_rate
;
217 * Whether the profile is hardware accelerated.
219 PP_Bool hardware_accelerated
;
223 * Struct describing a bitstream buffer.
225 struct PP_BitstreamBuffer
{
227 * The size, in bytes, of the bitstream data.
232 * The base address of the bitstream data.
237 * Whether the buffer represents a key frame.
243 * Struct describing an audio bitstream buffer.
245 struct PP_AudioBitstreamBuffer
{
247 * The size, in bytes, of the bitstream data.
252 * The base address of the bitstream data.