Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / ppapi / api / pp_codecs.idl
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 /**
7  * Video profiles.
8  */
9 enum PP_VideoProfile {
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
24 };
25
26 /**
27  * Struct describing a decoded video picture. The decoded picture data is stored
28  * in the GL texture corresponding to |texture_id|. The plugin can determine
29  * which Decode call generated the picture using |decode_id|.
30  */
31 struct PP_VideoPicture {
32   /**
33    * |decode_id| parameter of the Decode call which generated this picture.
34    * See the PPB_VideoDecoder function Decode() for more details.
35    */
36   uint32_t decode_id;
37
38   /**
39    * Texture ID in the plugin's GL context. The plugin can use this to render
40    * the decoded picture.
41    */
42   uint32_t texture_id;
43
44   /**
45    * The GL texture target for the decoded picture. Possible values are:
46    *   GL_TEXTURE_2D
47    *   GL_TEXTURE_RECTANGLE_ARB
48    *   GL_TEXTURE_EXTERNAL_OES
49    *
50    * The pixel format of the texture is GL_RGBA.
51    */
52   uint32_t texture_target;
53
54   /**
55    * Dimensions of the texture holding the decoded picture.
56    */
57   PP_Size texture_size;
58 };