Torne (Richard Coles) | 010d83a | 2014-05-14 12:12:37 +0100 | [diff] [blame] | 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 | |
Ben Murdoch | 116680a | 2014-07-20 18:25:52 -0700 | [diff] [blame] | 6 | /* From pp_codecs.idl modified Mon Jun 30 14:36:36 2014. */ |
Torne (Richard Coles) | 010d83a | 2014-05-14 12:12:37 +0100 | [diff] [blame] | 7 | |
| 8 | #ifndef PPAPI_C_PP_CODECS_H_ |
| 9 | #define PPAPI_C_PP_CODECS_H_ |
| 10 | |
| 11 | #include "ppapi/c/pp_macros.h" |
| 12 | #include "ppapi/c/pp_size.h" |
| 13 | #include "ppapi/c/pp_stdint.h" |
| 14 | |
| 15 | /** |
| 16 | * @file |
| 17 | * Video profiles. |
| 18 | */ |
| 19 | |
| 20 | |
| 21 | /** |
| 22 | * @addtogroup Enums |
| 23 | * @{ |
| 24 | */ |
| 25 | typedef enum { |
| 26 | PP_VIDEOPROFILE_H264BASELINE = 0, |
| 27 | PP_VIDEOPROFILE_H264MAIN = 1, |
| 28 | PP_VIDEOPROFILE_H264EXTENDED = 2, |
| 29 | PP_VIDEOPROFILE_H264HIGH = 3, |
| 30 | PP_VIDEOPROFILE_H264HIGH10PROFILE = 4, |
| 31 | PP_VIDEOPROFILE_H264HIGH422PROFILE = 5, |
| 32 | PP_VIDEOPROFILE_H264HIGH444PREDICTIVEPROFILE = 6, |
| 33 | PP_VIDEOPROFILE_H264SCALABLEBASELINE = 7, |
| 34 | PP_VIDEOPROFILE_H264SCALABLEHIGH = 8, |
| 35 | PP_VIDEOPROFILE_H264STEREOHIGH = 9, |
| 36 | PP_VIDEOPROFILE_H264MULTIVIEWHIGH = 10, |
Torne (Richard Coles) | 6e8cce6 | 2014-08-19 13:00:08 +0100 | [diff] [blame] | 37 | PP_VIDEOPROFILE_VP8_ANY = 11, |
| 38 | PP_VIDEOPROFILE_VP9_ANY = 12, |
| 39 | PP_VIDEOPROFILE_MAX = PP_VIDEOPROFILE_VP9_ANY |
Torne (Richard Coles) | 010d83a | 2014-05-14 12:12:37 +0100 | [diff] [blame] | 40 | } PP_VideoProfile; |
| 41 | /** |
| 42 | * @} |
| 43 | */ |
| 44 | |
| 45 | /** |
| 46 | * @addtogroup Structs |
| 47 | * @{ |
| 48 | */ |
| 49 | /** |
| 50 | * Struct describing a decoded video picture. The decoded picture data is stored |
| 51 | * in the GL texture corresponding to |texture_id|. The plugin can determine |
| 52 | * which Decode call generated the picture using |decode_id|. |
| 53 | */ |
| 54 | struct PP_VideoPicture { |
| 55 | /** |
| 56 | * |decode_id| parameter of the Decode call which generated this picture. |
| 57 | * See the PPB_VideoDecoder function Decode() for more details. |
| 58 | */ |
| 59 | uint32_t decode_id; |
| 60 | /** |
| 61 | * Texture ID in the plugin's GL context. The plugin can use this to render |
| 62 | * the decoded picture. |
| 63 | */ |
| 64 | uint32_t texture_id; |
| 65 | /** |
| 66 | * The GL texture target for the decoded picture. Possible values are: |
Ben Murdoch | 116680a | 2014-07-20 18:25:52 -0700 | [diff] [blame] | 67 | * GL_TEXTURE_2D |
| 68 | * GL_TEXTURE_RECTANGLE_ARB |
| 69 | * GL_TEXTURE_EXTERNAL_OES |
Torne (Richard Coles) | 010d83a | 2014-05-14 12:12:37 +0100 | [diff] [blame] | 70 | * |
Torne (Richard Coles) | f8ee788 | 2014-06-20 14:52:04 +0100 | [diff] [blame] | 71 | * The pixel format of the texture is GL_RGBA. |
Torne (Richard Coles) | 010d83a | 2014-05-14 12:12:37 +0100 | [diff] [blame] | 72 | */ |
| 73 | uint32_t texture_target; |
| 74 | /** |
| 75 | * Dimensions of the texture holding the decoded picture. |
| 76 | */ |
| 77 | struct PP_Size texture_size; |
| 78 | }; |
| 79 | /** |
| 80 | * @} |
| 81 | */ |
| 82 | |
| 83 | #endif /* PPAPI_C_PP_CODECS_H_ */ |
| 84 | |