Pepper_31_C_interfaces
pp_video_dev.h
Go to the documentation of this file.
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_dev.idl modified Tue Apr 30 14:58:38 2013. */
7 
8 #ifndef PPAPI_C_DEV_PP_VIDEO_DEV_H_
9 #define PPAPI_C_DEV_PP_VIDEO_DEV_H_
10 
11 #include "ppapi/c/pp_macros.h"
12 #include "ppapi/c/pp_resource.h"
13 #include "ppapi/c/pp_size.h"
14 #include "ppapi/c/pp_stdint.h"
15 
16 /**
17  * @file
18  * NOTE: these must be kept in sync with the versions in media/!
19  */
20 
21 
22 /**
23  * @addtogroup Enums
24  * @{
25  */
26 /**
27  * Video format.
28  *
29  * Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
30  * for example), and keep the values for a particular format grouped together
31  * for clarity.
32  * Note: Keep these in sync with media::VideoCodecProfile.
33  */
34 typedef enum {
51 /**
52  * @}
53  */
54 
55 /**
56  * @addtogroup Structs
57  * @{
58  */
59 /**
60  * The data structure for video bitstream buffer.
61  */
63  /**
64  * Client-specified identifier for the bitstream buffer. Valid values are
65  * non-negative.
66  */
67  int32_t id;
68  /**
69  * Buffer to hold the bitstream data. Should be allocated using the
70  * PPB_Buffer interface for consistent interprocess behaviour.
71  */
73  /**
74  * Size of the bitstream contained in buffer (in bytes).
75  */
76  uint32_t size;
77 };
79 
80 /**
81  * Struct for specifying texture-backed picture data.
82  */
84  /**
85  * Client-specified id for the picture buffer. By using this value client can
86  * keep track of the buffers it has assigned to the video decoder and how they
87  * are passed back to it. Valid values are non-negative.
88  */
89  int32_t id;
90  /**
91  * Dimensions of the buffer.
92  */
93  struct PP_Size size;
94  /**
95  * Texture ID in the given context where picture is stored.
96  */
97  uint32_t texture_id;
98 };
100 
101 /**
102  * Structure to describe a decoded output frame.
103  */
105  /**
106  * ID of the picture buffer where the picture is stored.
107  */
109  /**
110  * ID of the bitstream from which this data was decoded.
111  */
113 };
115 /**
116  * @}
117  */
118 
119 /**
120  * @addtogroup Enums
121  * @{
122  */
123 /**
124  * Decoder error codes reported to the plugin. A reasonable naive
125  * error handling policy is for the plugin to Destroy() the decoder on error.
126  */
127 typedef enum {
128  /**
129  * An operation was attempted during an incompatible decoder state.
130  */
132  /**
133  * Invalid argument was passed to an API method.
134  */
136  /**
137  * Encoded input is unreadable.
138  */
140  /**
141  * A failure occurred at the browser layer or lower. Examples of such
142  * failures include GPU hardware failures, GPU driver failures, GPU library
143  * failures, browser programming errors, and so on.
144  */
148 /**
149  * @}
150  */
151 
152 #endif /* PPAPI_C_DEV_PP_VIDEO_DEV_H_ */
153 
struct PP_Size size
Definition: pp_video_dev.h:93
PP_VideoDecoder_Profile
Definition: pp_video_dev.h:34
int32_t PP_Resource
Definition: pp_resource.h:40
PP_VideoDecodeError_Dev
Definition: pp_video_dev.h:127
int32_t bitstream_buffer_id
Definition: pp_video_dev.h:112
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_VideoBitstreamBuffer_Dev, 12)
int32_t picture_buffer_id
Definition: pp_video_dev.h:108
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_VideoDecoder_Profile, 4)