Remove Observer methods in RTCVideoEncoderFactory.
[chromium-blink-merge.git] / ppapi / c / dev / pp_video_dev.h
blob75ee21a219dd46d201268663b79dc39668662d93
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 */
6 /* From dev/pp_video_dev.idl modified Tue Apr 30 14:58:38 2013. */
8 #ifndef PPAPI_C_DEV_PP_VIDEO_DEV_H_
9 #define PPAPI_C_DEV_PP_VIDEO_DEV_H_
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"
16 /**
17 * @file
18 * NOTE: these must be kept in sync with the versions in media/!
22 /**
23 * @addtogroup Enums
24 * @{
26 /**
27 * Video format.
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.
34 typedef enum {
35 PP_VIDEODECODER_PROFILE_UNKNOWN = -1,
36 PP_VIDEODECODER_H264PROFILE_NONE = 0,
37 PP_VIDEODECODER_H264PROFILE_BASELINE = 1,
38 PP_VIDEODECODER_H264PROFILE_MAIN = 2,
39 PP_VIDEODECODER_H264PROFILE_EXTENDED = 3,
40 PP_VIDEODECODER_H264PROFILE_HIGH = 4,
41 PP_VIDEODECODER_H264PROFILE_HIGH10PROFILE = 5,
42 PP_VIDEODECODER_H264PROFILE_HIGH422PROFILE = 6,
43 PP_VIDEODECODER_H264PROFILE_HIGH444PREDICTIVEPROFILE = 7,
44 PP_VIDEODECODER_H264PROFILE_SCALABLEBASELINE = 8,
45 PP_VIDEODECODER_H264PROFILE_SCALABLEHIGH = 9,
46 PP_VIDEODECODER_H264PROFILE_STEREOHIGH = 10,
47 PP_VIDEODECODER_H264PROFILE_MULTIVIEWHIGH = 11,
48 PP_VIDEODECODER_VP8PROFILE_ANY = 12
49 } PP_VideoDecoder_Profile;
50 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_VideoDecoder_Profile, 4);
51 /**
52 * @}
55 /**
56 * @addtogroup Structs
57 * @{
59 /**
60 * The data structure for video bitstream buffer.
62 struct PP_VideoBitstreamBuffer_Dev {
63 /**
64 * Client-specified identifier for the bitstream buffer. Valid values are
65 * non-negative.
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.
72 PP_Resource data;
73 /**
74 * Size of the bitstream contained in buffer (in bytes).
76 uint32_t size;
78 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_VideoBitstreamBuffer_Dev, 12);
80 /**
81 * Struct for specifying texture-backed picture data.
83 struct PP_PictureBuffer_Dev {
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.
89 int32_t id;
90 /**
91 * Dimensions of the buffer.
93 struct PP_Size size;
94 /**
95 * Texture ID in the given context where picture is stored.
97 uint32_t texture_id;
99 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_PictureBuffer_Dev, 16);
102 * Structure to describe a decoded output frame.
104 struct PP_Picture_Dev {
106 * ID of the picture buffer where the picture is stored.
108 int32_t picture_buffer_id;
110 * ID of the bitstream from which this data was decoded.
112 int32_t bitstream_buffer_id;
114 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Picture_Dev, 8);
116 * @}
120 * @addtogroup Enums
121 * @{
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.
127 typedef enum {
129 * An operation was attempted during an incompatible decoder state.
131 PP_VIDEODECODERERROR_ILLEGAL_STATE = 1,
133 * Invalid argument was passed to an API method.
135 PP_VIDEODECODERERROR_INVALID_ARGUMENT = 2,
137 * Encoded input is unreadable.
139 PP_VIDEODECODERERROR_UNREADABLE_INPUT = 3,
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.
145 PP_VIDEODECODERERROR_PLATFORM_FAILURE = 4
146 } PP_VideoDecodeError_Dev;
147 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_VideoDecodeError_Dev, 4);
149 * @}
152 #endif /* PPAPI_C_DEV_PP_VIDEO_DEV_H_ */