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 Nov 5 13:38:52 2014. */
8 #ifndef PPAPI_C_PP_CODECS_H_
9 #define PPAPI_C_PP_CODECS_H_
11 #include "ppapi/c/pp_macros.h"
12 #include "ppapi/c/pp_point.h"
13 #include "ppapi/c/pp_rect.h"
14 #include "ppapi/c/pp_size.h"
15 #include "ppapi/c/pp_stdint.h"
28 PP_VIDEOPROFILE_H264BASELINE
= 0,
29 PP_VIDEOPROFILE_H264MAIN
= 1,
30 PP_VIDEOPROFILE_H264EXTENDED
= 2,
31 PP_VIDEOPROFILE_H264HIGH
= 3,
32 PP_VIDEOPROFILE_H264HIGH10PROFILE
= 4,
33 PP_VIDEOPROFILE_H264HIGH422PROFILE
= 5,
34 PP_VIDEOPROFILE_H264HIGH444PREDICTIVEPROFILE
= 6,
35 PP_VIDEOPROFILE_H264SCALABLEBASELINE
= 7,
36 PP_VIDEOPROFILE_H264SCALABLEHIGH
= 8,
37 PP_VIDEOPROFILE_H264STEREOHIGH
= 9,
38 PP_VIDEOPROFILE_H264MULTIVIEWHIGH
= 10,
39 PP_VIDEOPROFILE_VP8_ANY
= 11,
40 PP_VIDEOPROFILE_VP9_ANY
= 12,
41 PP_VIDEOPROFILE_MAX
= PP_VIDEOPROFILE_VP9_ANY
45 * Hardware acceleration options.
48 /** Create a hardware accelerated resource only. */
49 PP_HARDWAREACCELERATION_ONLY
= 0,
51 * Create a hardware accelerated resource if possible. Otherwise, fall back
52 * to the software implementation.
54 PP_HARDWAREACCELERATION_WITHFALLBACK
= 1,
55 /** Create the software implementation only. */
56 PP_HARDWAREACCELERATION_NONE
= 2,
57 PP_HARDWAREACCELERATION_LAST
= PP_HARDWAREACCELERATION_NONE
58 } PP_HardwareAcceleration
;
68 * Struct describing a decoded video picture. The decoded picture data is stored
69 * in the GL texture corresponding to |texture_id|. The plugin can determine
70 * which Decode call generated the picture using |decode_id|.
72 struct PP_VideoPicture
{
74 * |decode_id| parameter of the Decode call which generated this picture.
75 * See the PPB_VideoDecoder function Decode() for more details.
79 * Texture ID in the plugin's GL context. The plugin can use this to render
80 * the decoded picture.
84 * The GL texture target for the decoded picture. Possible values are:
86 * GL_TEXTURE_RECTANGLE_ARB
87 * GL_TEXTURE_EXTERNAL_OES
89 * The pixel format of the texture is GL_RGBA.
91 uint32_t texture_target
;
93 * Dimensions of the texture holding the decoded picture.
95 struct PP_Size texture_size
;
97 * The visible subrectangle of the picture. The plugin should display only
98 * this part of the picture.
100 struct PP_Rect visible_rect
;
104 * Struct describing a decoded video picture. The decoded picture data is stored
105 * in the GL texture corresponding to |texture_id|. The plugin can determine
106 * which Decode call generated the picture using |decode_id|.
108 struct PP_VideoPicture_0_1
{
110 * |decode_id| parameter of the Decode call which generated this picture.
111 * See the PPB_VideoDecoder function Decode() for more details.
115 * Texture ID in the plugin's GL context. The plugin can use this to render
116 * the decoded picture.
120 * The GL texture target for the decoded picture. Possible values are:
122 * GL_TEXTURE_RECTANGLE_ARB
123 * GL_TEXTURE_EXTERNAL_OES
125 * The pixel format of the texture is GL_RGBA.
127 uint32_t texture_target
;
129 * Dimensions of the texture holding the decoded picture.
131 struct PP_Size texture_size
;
137 #endif /* PPAPI_C_PP_CODECS_H_ */