Home | History | Annotate | Download | only in c
      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 /* From pp_codecs.idl modified Fri Aug 22 13:39:56 2014. */
      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,
     37   PP_VIDEOPROFILE_VP8_ANY = 11,
     38   PP_VIDEOPROFILE_VP9_ANY = 12,
     39   PP_VIDEOPROFILE_MAX = PP_VIDEOPROFILE_VP9_ANY
     40 } PP_VideoProfile;
     41 
     42 /**
     43  * Hardware acceleration options.
     44  */
     45 typedef enum {
     46   /** Create a hardware accelerated resource only. */
     47   PP_HARDWAREACCELERATION_ONLY = 0,
     48   /**
     49    * Create a hardware accelerated resource if possible. Otherwise, fall back
     50    * to the software implementation.
     51    */
     52   PP_HARDWAREACCELERATION_WITHFALLBACK = 1,
     53   /** Create the software implementation only. */
     54   PP_HARDWAREACCELERATION_NONE = 2,
     55   PP_HARDWAREACCELERATION_LAST = PP_HARDWAREACCELERATION_NONE
     56 } PP_HardwareAcceleration;
     57 /**
     58  * @}
     59  */
     60 
     61 /**
     62  * @addtogroup Structs
     63  * @{
     64  */
     65 /**
     66  * Struct describing a decoded video picture. The decoded picture data is stored
     67  * in the GL texture corresponding to |texture_id|. The plugin can determine
     68  * which Decode call generated the picture using |decode_id|.
     69  */
     70 struct PP_VideoPicture {
     71   /**
     72    * |decode_id| parameter of the Decode call which generated this picture.
     73    * See the PPB_VideoDecoder function Decode() for more details.
     74    */
     75   uint32_t decode_id;
     76   /**
     77    * Texture ID in the plugin's GL context. The plugin can use this to render
     78    * the decoded picture.
     79    */
     80   uint32_t texture_id;
     81   /**
     82    * The GL texture target for the decoded picture. Possible values are:
     83    *   GL_TEXTURE_2D
     84    *   GL_TEXTURE_RECTANGLE_ARB
     85    *   GL_TEXTURE_EXTERNAL_OES
     86    *
     87    * The pixel format of the texture is GL_RGBA.
     88    */
     89   uint32_t texture_target;
     90   /**
     91    * Dimensions of the texture holding the decoded picture.
     92    */
     93   struct PP_Size texture_size;
     94 };
     95 /**
     96  * @}
     97  */
     98 
     99 #endif  /* PPAPI_C_PP_CODECS_H_ */
    100 
    101