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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
/*
* Copyright (C) 2019 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.camera.device@3.6;
import @3.2::BufferCache;
import @3.4::HalStream;
/**
* OfflineRequest:
*
* Information about a capture request being switched to offline mode via the
* ICameraDeviceSession#switchToOffline method.
*
*/
struct OfflineRequest {
/**
* Must match a inflight CaptureRequest sent by camera service
*/
uint32_t frameNumber;
/**
* Stream IDs for outputs that will be returned via ICameraDeviceCallback.
* The stream ID must be within one of offline stream listed in
* CameraOfflineSessionInfo.
* Camera service will validate these pending buffers are matching camera
* service's record to make sure no buffers are leaked during the
* switchToOffline call.
*/
vec<int32_t> pendingStreams;
};
/**
* OfflineStream:
*
* Information about a stream being switched to offline mode via the
* ICameraDeviceSession#switchToOffline method.
*
*/
struct OfflineStream {
/**
* IDs of a stream to be transferred to offline session.
*
* For devices that do not support HAL buffer management, this must be
* one of stream ID listed in streamsToKeep argument of the
* switchToOffline call.
* For devices that support HAL buffer management, this could be any stream
* that was configured right before calling switchToOffline.
*/
int32_t id;
/**
* Number of outstanding buffers that will be returned via offline session
*/
uint32_t numOutstandingBuffers;
/**
* Buffer ID of buffers currently cached between camera service and this
* stream, which may or may not be owned by the camera HAL right now.
* See StreamBuffer#bufferId for more details.
*/
vec<uint64_t> circulatingBufferIds;
};
/**
* CameraOfflineSessionInfo:
*
* Information about pending outputs that's being transferred to an offline
* session from an active session using the
* ICameraDeviceSession#switchToOffline method.
*
*/
struct CameraOfflineSessionInfo {
/**
* Information on what streams will be preserved in offline session.
* Streams not listed here will be removed by camera service after
* switchToOffline call returns.
*/
vec<OfflineStream> offlineStreams;
/**
* Information for requests that will be handled by offline session
* Camera service will validate this matches what camera service has on
* record.
*/
vec<OfflineRequest> offlineRequests;
};
/**
* HalStream:
*
* The camera HAL's response to each requested stream configuration.
*
* This version extends the @3.4 HalStream with the physicalCameraId
* field
*/
struct HalStream {
/**
* The definition of HalStream from the prior version.
*/
@3.4::HalStream v3_4;
/**
* Whether this stream can be switch to offline mode.
*
* For devices that does not support the OFFLINE_PROCESSING capability, this
* fields will always be false.
*
* For backward compatible camera devices that support the
* OFFLINE_PROCESSING capability: any input stream and any output stream
* that can be output of the input stream must set this field to true. Also
* any stream of YUV420_888 format or JPEG format, with CPU_READ usage flag,
* must set this field to true.
*
* For depth only camera devices that support the OFFLINE_PROCESSING
* capability: any DEPTH16 output stream must set this field to true.
*
* All other streams are up to camera HAL to advertise support or not,
* though it is not recommended to list support for streams with
* hardware composer or video encoder usage flags as these streams tend
* to be targeted continuously and can lead to long latency when trying to
* switch to offline.
*
*/
bool supportOffline;
};
/**
* HalStreamConfiguration:
*
* Identical to @3.4::HalStreamConfiguration, except that it contains @3.6::HalStream entries.
*
*/
struct HalStreamConfiguration {
vec<HalStream> streams;
};
|