Home | History | Annotate | Download | only in dev
      1 /* Copyright (c) 2012 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 dev/pp_video_capture_dev.idl modified Mon Nov 14 10:36:01 2011. */
      7 
      8 #ifndef PPAPI_C_DEV_PP_VIDEO_CAPTURE_DEV_H_
      9 #define PPAPI_C_DEV_PP_VIDEO_CAPTURE_DEV_H_
     10 
     11 #include "ppapi/c/pp_macros.h"
     12 #include "ppapi/c/pp_stdint.h"
     13 
     14 /**
     15  * @file
     16  * Structs for dealing with video capture.
     17  */
     18 
     19 
     20 /**
     21  * @addtogroup Structs
     22  * @{
     23  */
     24 /**
     25  * PP_VideoCaptureDeviceInfo_Dev is a structure that represent a video capture
     26  * configuration, such as resolution and frame rate.
     27  */
     28 struct PP_VideoCaptureDeviceInfo_Dev {
     29   uint32_t width;
     30   uint32_t height;
     31   uint32_t frames_per_second;
     32 };
     33 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_VideoCaptureDeviceInfo_Dev, 12);
     34 /**
     35  * @}
     36  */
     37 
     38 /**
     39  * @addtogroup Enums
     40  * @{
     41  */
     42 /**
     43  * PP_VideoCaptureStatus_Dev is an enumeration that defines the various possible
     44  * states of a VideoCapture.
     45  */
     46 typedef enum {
     47   /**
     48    * Initial state, capture is stopped.
     49    */
     50   PP_VIDEO_CAPTURE_STATUS_STOPPED = 0,
     51   /**
     52    * StartCapture has been called, but capture hasn't started yet.
     53    */
     54   PP_VIDEO_CAPTURE_STATUS_STARTING = 1,
     55   /**
     56    * Capture has been started.
     57    */
     58   PP_VIDEO_CAPTURE_STATUS_STARTED = 2,
     59   /**
     60    * Capture has been started, but is paused because no buffer is available.
     61    */
     62   PP_VIDEO_CAPTURE_STATUS_PAUSED = 3,
     63   /**
     64    * StopCapture has been called, but capture hasn't stopped yet.
     65    */
     66   PP_VIDEO_CAPTURE_STATUS_STOPPING = 4
     67 } PP_VideoCaptureStatus_Dev;
     68 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_VideoCaptureStatus_Dev, 4);
     69 /**
     70  * @}
     71  */
     72 
     73 #endif  /* PPAPI_C_DEV_PP_VIDEO_CAPTURE_DEV_H_ */
     74 
     75