1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.graphics.bufferqueue@2.0;
/**
* Possible return values from a function call.
*/
enum Status : int32_t {
/**
* The call succeeds.
*/
OK = 0,
/**
* The function fails allocate memory.
*/
NO_MEMORY = -12,
/**
* The buffer queue has been abandoned, no consumer is connected, or no
* producer is connected at the time of the call.
*/
NO_INIT = -19,
/**
* Some of the provided input arguments are invalid.
*/
BAD_VALUE = -22,
/**
* An unexpected death of some object prevents the operation from
* continuing.
*
* @note This status value is different from a transaction failure, which
* should be detected by isOk().
*/
DEAD_OBJECT = -32,
/**
* The internal state of the buffer queue does not permit the operation.
*/
INVALID_OPERATION = -38,
/**
* The call fails to finish within the specified time limit.
*/
TIMED_OUT = -110,
/**
* The buffer queue is operating in a non-blocking mode, but the call cannot
* be completed without blocking.
*/
WOULD_BLOCK = 0xfffffffb,
/**
* The call fails because of a reason not listed above.
*/
UNKNOWN_ERROR = 0xffffffff,
};
/**
* Special values for a slot index.
*/
enum SlotIndex : int32_t {
/**
* Invalid/unspecified slot index. This may be returned from a function that
* returns a slot index if the call is unsuccessful.
*/
INVALID = -1,
UNSPECIFIED = -1,
};
/**
* An "empty" fence can be an empty handle (containing no fds and no ints) or a
* fence with one fd that is equal to -1 and no ints.
*
* A valid fence is an empty fence or a native handle with exactly one fd and no
* ints.
*/
typedef handle Fence;
/**
* How buffers shall be produced. One of these values must be provided in a call
* to IGraphicBufferProducer::connect() and
* IGraphicBufferProducer::disconnect().
*/
enum ConnectionType : int32_t {
/**
* This value can be used only as an input to
* IGraphicBufferProducer::disconnect().
*/
CURRENTLY_CONNECTED = -1,
/**
* Buffers shall be queued by EGL via `eglSwapBuffers()` after being filled
* using OpenGL ES.
*/
EGL = 1,
/**
* Buffers shall be queued after being filled using the CPU.
*/
CPU = 2,
/**
* Buffers shall be queued by Stagefright after being filled by a video
* decoder. The video decoder can either be a software or hardware decoder.
*/
MEDIA = 3,
/**
* Buffers shall be queued by the camera HAL.
*/
CAMERA = 4,
};
|