Pepper_37_C_interfaces
Main Page
Modules
Classes
Files
File List
File Members
dev
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 Wed Dec 14 18:08:00 2011. */
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
{
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_PROFILE_MAX
=
PP_VIDEODECODER_H264PROFILE_MULTIVIEWHIGH
49
}
PP_VideoDecoder_Profile
;
50
PP_COMPILE_ASSERT_SIZE_IN_BYTES
(
PP_VideoDecoder_Profile
, 4);
51
/**
52
* @}
53
*/
54
55
/**
56
* @addtogroup Structs
57
* @{
58
*/
59
/**
60
* The data structure for video bitstream buffer.
61
*/
62
struct
PP_VideoBitstreamBuffer_Dev
{
63
/**
64
* Client-specified identifier for the bitstream buffer.
65
*/
66
int32_t
id
;
67
/**
68
* Buffer to hold the bitstream data. Should be allocated using the
69
* PPB_Buffer interface for consistent interprocess behaviour.
70
*/
71
PP_Resource
data
;
72
/**
73
* Size of the bitstream contained in buffer (in bytes).
74
*/
75
int32_t
size
;
76
};
77
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES
(
PP_VideoBitstreamBuffer_Dev
, 12);
78
79
/**
80
* Struct for specifying texture-backed picture data.
81
*/
82
struct
PP_PictureBuffer_Dev
{
83
/**
84
* Client-specified id for the picture buffer. By using this value client can
85
* keep track of the buffers it has assigned to the video decoder and how they
86
* are passed back to it.
87
*/
88
int32_t
id
;
89
/**
90
* Dimensions of the buffer.
91
*/
92
struct
PP_Size
size
;
93
/**
94
* Texture ID in the given context where picture is stored.
95
*/
96
uint32_t
texture_id
;
97
};
98
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES
(
PP_PictureBuffer_Dev
, 16);
99
100
/**
101
* Structure to describe a decoded output frame.
102
*/
103
struct
PP_Picture_Dev
{
104
/**
105
* ID of the picture buffer where the picture is stored.
106
*/
107
int32_t
picture_buffer_id
;
108
/**
109
* ID of the bitstream from which this data was decoded.
110
*/
111
int32_t
bitstream_buffer_id
;
112
};
113
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES
(
PP_Picture_Dev
, 8);
114
/**
115
* @}
116
*/
117
118
/**
119
* @addtogroup Enums
120
* @{
121
*/
122
/**
123
* Decoder error codes reported to the plugin. A reasonable naive
124
* error handling policy is for the plugin to Destroy() the decoder on error.
125
* Note: Keep these in sync with media::VideoDecodeAccelerator::Error.
126
*/
127
typedef
enum
{
128
/**
129
* An operation was attempted during an incompatible decoder state.
130
*/
131
PP_VIDEODECODERERROR_ILLEGAL_STATE
= 1,
132
/**
133
* Invalid argument was passed to an API method.
134
*/
135
PP_VIDEODECODERERROR_INVALID_ARGUMENT
= 2,
136
/**
137
* Encoded input is unreadable.
138
*/
139
PP_VIDEODECODERERROR_UNREADABLE_INPUT
= 3,
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
*/
145
PP_VIDEODECODERERROR_PLATFORM_FAILURE
= 4
146
}
PP_VideoDecodeError_Dev
;
147
PP_COMPILE_ASSERT_SIZE_IN_BYTES
(
PP_VideoDecodeError_Dev
, 4);
148
/**
149
* @}
150
*/
151
152
#endif
/* PPAPI_C_DEV_PP_VIDEO_DEV_H_ */
153
PP_VIDEODECODER_H264PROFILE_SCALABLEBASELINE
Definition:
pp_video_dev.h:44
PP_PictureBuffer_Dev::size
struct PP_Size size
Definition:
pp_video_dev.h:92
PP_VIDEODECODER_H264PROFILE_HIGH
Definition:
pp_video_dev.h:40
PP_VIDEODECODERERROR_PLATFORM_FAILURE
Definition:
pp_video_dev.h:145
PP_VIDEODECODERERROR_INVALID_ARGUMENT
Definition:
pp_video_dev.h:135
PP_VIDEODECODER_H264PROFILE_HIGH444PREDICTIVEPROFILE
Definition:
pp_video_dev.h:43
PP_VIDEODECODER_H264PROFILE_EXTENDED
Definition:
pp_video_dev.h:39
PP_PictureBuffer_Dev
Definition:
pp_video_dev.h:82
PP_VideoBitstreamBuffer_Dev::size
int32_t size
Definition:
pp_video_dev.h:75
PP_VideoDecoder_Profile
PP_VideoDecoder_Profile
Definition:
pp_video_dev.h:34
PP_VIDEODECODER_H264PROFILE_STEREOHIGH
Definition:
pp_video_dev.h:46
PP_VIDEODECODER_H264PROFILE_MAIN
Definition:
pp_video_dev.h:38
PP_VIDEODECODER_H264PROFILE_HIGH422PROFILE
Definition:
pp_video_dev.h:42
PP_Resource
int32_t PP_Resource
Definition:
pp_resource.h:40
PP_VIDEODECODERERROR_UNREADABLE_INPUT
Definition:
pp_video_dev.h:139
PP_VideoBitstreamBuffer_Dev
Definition:
pp_video_dev.h:62
PP_VideoDecodeError_Dev
PP_VideoDecodeError_Dev
Definition:
pp_video_dev.h:127
PP_VIDEODECODER_PROFILE_UNKNOWN
Definition:
pp_video_dev.h:35
PP_PictureBuffer_Dev::texture_id
uint32_t texture_id
Definition:
pp_video_dev.h:96
PP_Picture_Dev::bitstream_buffer_id
int32_t bitstream_buffer_id
Definition:
pp_video_dev.h:111
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_VideoBitstreamBuffer_Dev, 12)
PP_Picture_Dev::picture_buffer_id
int32_t picture_buffer_id
Definition:
pp_video_dev.h:107
PP_VideoBitstreamBuffer_Dev::id
int32_t id
Definition:
pp_video_dev.h:66
PP_COMPILE_ASSERT_SIZE_IN_BYTES
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_VideoDecoder_Profile, 4)
PP_PictureBuffer_Dev::id
int32_t id
Definition:
pp_video_dev.h:88
PP_VIDEODECODER_H264PROFILE_HIGH10PROFILE
Definition:
pp_video_dev.h:41
PP_VIDEODECODER_PROFILE_MAX
Definition:
pp_video_dev.h:48
PP_Picture_Dev
Definition:
pp_video_dev.h:103
PP_VideoBitstreamBuffer_Dev::data
PP_Resource data
Definition:
pp_video_dev.h:71
PP_VIDEODECODER_H264PROFILE_NONE
Definition:
pp_video_dev.h:36
PP_VIDEODECODER_H264PROFILE_BASELINE
Definition:
pp_video_dev.h:37
PP_VIDEODECODER_H264PROFILE_SCALABLEHIGH
Definition:
pp_video_dev.h:45
PP_VIDEODECODERERROR_ILLEGAL_STATE
Definition:
pp_video_dev.h:131
PP_VIDEODECODER_H264PROFILE_MULTIVIEWHIGH
Definition:
pp_video_dev.h:47
PP_Size
Definition:
pp_size.h:27
Generated on Wed May 4 2016 11:29:43 for Pepper_37_C_interfaces by
1.8.6