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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
/*
* Copyright (C) 2016 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.automotive.evs@1.0;
/**
* Structure describing the basic properties of an EVS camera
*
* The HAL is responsible for filling out this structure for each
* EVS camera in the system.
*/
struct CameraDesc {
/* Unique identifier for camera devices. This may be a path to detected
* camera device; for example, "/dev/video0".
*/
string cameraId;
/* Opaque value from driver. Vendor may use this field to store additional
* information; for example, sensor and bridge chip id.
*/
uint32_t vendorFlags;
};
/**
* Structure describing the basic properties of an EVS display
*
* The HAL is responsible for filling out this structure to describe
* the EVS display. As an implementation detail, this may be a physical
* display or a virtual display that is overlaid or mixed with another
* presentation device.
*/
struct DisplayDesc {
/* Unique identifier for the display */
string displayId;
/* Opaque value from driver */
uint32_t vendorFlags;
};
/**
* Structure representing an image buffer through our APIs
*
* In addition to the handle to the graphics memory, we need to retain
* the properties of the buffer for easy reference and reconstruction of
* an ANativeWindowBuffer object on the remote side of API calls.
* (Not least because OpenGL expect an ANativeWindowBuffer* for us as a
* texture via eglCreateImageKHR().
* See also related types from android.hardware.graphics.common
* TODO: b/34722508 Review details of interaction of this structure with gralloc and OpenGL.
* Specifically consider if format and/or usage should become enumerated types.
*/
struct BufferDesc {
/* A frame width in the units of pixels */
uint32_t width;
/* A frame height in the units of pixels */
uint32_t height;
/* A frame stride in the units of pixels, to match gralloc */
uint32_t stride;
/* The size of a pixel in the units of bytes */
uint32_t pixelSize;
/* The image format of the frame; may contain values from
* android_pixel_format_t
*/
uint32_t format;
/* May contain values from Gralloc.h */
uint32_t usage;
/* Opaque value from driver */
uint32_t bufferId;
/* Gralloc memory buffer handle */
handle memHandle;
};
/**
* States for control of the EVS display
*
* The DisplayInfo structure describes the basic properties of an EVS display. Any EVS
* implementation is required to have one. The HAL is responsible for filling out this
* structure to describe the EVS display. As an implementation detail, this may be a
* physical display or a virtual display that is overlaid or mixed with another
* presentation device.
*/
enum DisplayState : uint32_t {
/* Display has not been requested by any application yet */
NOT_OPEN = 0,
/* Display is inhibited */
NOT_VISIBLE,
/* Will become visible with next frame */
VISIBLE_ON_NEXT_FRAME,
/* Display is currently active */
VISIBLE,
/* Driver is in an undefined state. Interface should be closed. */
DEAD,
/* Must be the last */
NUM_STATES
};
/** Error codes used in EVS HAL interface. */
enum EvsResult : uint32_t {
OK = 0,
INVALID_ARG,
STREAM_ALREADY_RUNNING,
BUFFER_NOT_AVAILABLE,
OWNERSHIP_LOST,
UNDERLYING_SERVICE_ERROR,
};
|