xref: /aosp_15_r20/external/mesa3d/include/android_stub/system/camera.h (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1*61046927SAndroid Build Coastguard Worker /*
2*61046927SAndroid Build Coastguard Worker  * Copyright (C) 2011 The Android Open Source Project
3*61046927SAndroid Build Coastguard Worker  *
4*61046927SAndroid Build Coastguard Worker  * Licensed under the Apache License, Version 2.0 (the "License");
5*61046927SAndroid Build Coastguard Worker  * you may not use this file except in compliance with the License.
6*61046927SAndroid Build Coastguard Worker  * You may obtain a copy of the License at
7*61046927SAndroid Build Coastguard Worker  *
8*61046927SAndroid Build Coastguard Worker  *      http://www.apache.org/licenses/LICENSE-2.0
9*61046927SAndroid Build Coastguard Worker  *
10*61046927SAndroid Build Coastguard Worker  * Unless required by applicable law or agreed to in writing, software
11*61046927SAndroid Build Coastguard Worker  * distributed under the License is distributed on an "AS IS" BASIS,
12*61046927SAndroid Build Coastguard Worker  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*61046927SAndroid Build Coastguard Worker  * See the License for the specific language governing permissions and
14*61046927SAndroid Build Coastguard Worker  * limitations under the License.
15*61046927SAndroid Build Coastguard Worker  */
16*61046927SAndroid Build Coastguard Worker 
17*61046927SAndroid Build Coastguard Worker #ifndef SYSTEM_CORE_INCLUDE_ANDROID_CAMERA_H
18*61046927SAndroid Build Coastguard Worker #define SYSTEM_CORE_INCLUDE_ANDROID_CAMERA_H
19*61046927SAndroid Build Coastguard Worker 
20*61046927SAndroid Build Coastguard Worker #include <stdint.h>
21*61046927SAndroid Build Coastguard Worker #include <sys/cdefs.h>
22*61046927SAndroid Build Coastguard Worker #include <sys/types.h>
23*61046927SAndroid Build Coastguard Worker #include <cutils/native_handle.h>
24*61046927SAndroid Build Coastguard Worker #include <hardware/hardware.h>
25*61046927SAndroid Build Coastguard Worker #include <hardware/gralloc.h>
26*61046927SAndroid Build Coastguard Worker 
27*61046927SAndroid Build Coastguard Worker __BEGIN_DECLS
28*61046927SAndroid Build Coastguard Worker 
29*61046927SAndroid Build Coastguard Worker /**
30*61046927SAndroid Build Coastguard Worker  * A set of bit masks for specifying how the received preview frames are
31*61046927SAndroid Build Coastguard Worker  * handled before the previewCallback() call.
32*61046927SAndroid Build Coastguard Worker  *
33*61046927SAndroid Build Coastguard Worker  * The least significant 3 bits of an "int" value are used for this purpose:
34*61046927SAndroid Build Coastguard Worker  *
35*61046927SAndroid Build Coastguard Worker  * ..... 0 0 0
36*61046927SAndroid Build Coastguard Worker  *       ^ ^ ^
37*61046927SAndroid Build Coastguard Worker  *       | | |---------> determine whether the callback is enabled or not
38*61046927SAndroid Build Coastguard Worker  *       | |-----------> determine whether the callback is one-shot or not
39*61046927SAndroid Build Coastguard Worker  *       |-------------> determine whether the frame is copied out or not
40*61046927SAndroid Build Coastguard Worker  *
41*61046927SAndroid Build Coastguard Worker  * WARNING: When a frame is sent directly without copying, it is the frame
42*61046927SAndroid Build Coastguard Worker  * receiver's responsiblity to make sure that the frame data won't get
43*61046927SAndroid Build Coastguard Worker  * corrupted by subsequent preview frames filled by the camera. This flag is
44*61046927SAndroid Build Coastguard Worker  * recommended only when copying out data brings significant performance price
45*61046927SAndroid Build Coastguard Worker  * and the handling/processing of the received frame data is always faster than
46*61046927SAndroid Build Coastguard Worker  * the preview frame rate so that data corruption won't occur.
47*61046927SAndroid Build Coastguard Worker  *
48*61046927SAndroid Build Coastguard Worker  * For instance,
49*61046927SAndroid Build Coastguard Worker  * 1. 0x00 disables the callback. In this case, copy out and one shot bits
50*61046927SAndroid Build Coastguard Worker  *    are ignored.
51*61046927SAndroid Build Coastguard Worker  * 2. 0x01 enables a callback without copying out the received frames. A
52*61046927SAndroid Build Coastguard Worker  *    typical use case is the Camcorder application to avoid making costly
53*61046927SAndroid Build Coastguard Worker  *    frame copies.
54*61046927SAndroid Build Coastguard Worker  * 3. 0x05 is enabling a callback with frame copied out repeatedly. A typical
55*61046927SAndroid Build Coastguard Worker  *    use case is the Camera application.
56*61046927SAndroid Build Coastguard Worker  * 4. 0x07 is enabling a callback with frame copied out only once. A typical
57*61046927SAndroid Build Coastguard Worker  *    use case is the Barcode scanner application.
58*61046927SAndroid Build Coastguard Worker  */
59*61046927SAndroid Build Coastguard Worker 
60*61046927SAndroid Build Coastguard Worker enum {
61*61046927SAndroid Build Coastguard Worker     CAMERA_FRAME_CALLBACK_FLAG_ENABLE_MASK = 0x01,
62*61046927SAndroid Build Coastguard Worker     CAMERA_FRAME_CALLBACK_FLAG_ONE_SHOT_MASK = 0x02,
63*61046927SAndroid Build Coastguard Worker     CAMERA_FRAME_CALLBACK_FLAG_COPY_OUT_MASK = 0x04,
64*61046927SAndroid Build Coastguard Worker     /** Typical use cases */
65*61046927SAndroid Build Coastguard Worker     CAMERA_FRAME_CALLBACK_FLAG_NOOP = 0x00,
66*61046927SAndroid Build Coastguard Worker     CAMERA_FRAME_CALLBACK_FLAG_CAMCORDER = 0x01,
67*61046927SAndroid Build Coastguard Worker     CAMERA_FRAME_CALLBACK_FLAG_CAMERA = 0x05,
68*61046927SAndroid Build Coastguard Worker     CAMERA_FRAME_CALLBACK_FLAG_BARCODE_SCANNER = 0x07
69*61046927SAndroid Build Coastguard Worker };
70*61046927SAndroid Build Coastguard Worker 
71*61046927SAndroid Build Coastguard Worker /** msgType in notifyCallback and dataCallback functions */
72*61046927SAndroid Build Coastguard Worker enum {
73*61046927SAndroid Build Coastguard Worker     CAMERA_MSG_ERROR = 0x0001,            // notifyCallback
74*61046927SAndroid Build Coastguard Worker     CAMERA_MSG_SHUTTER = 0x0002,          // notifyCallback
75*61046927SAndroid Build Coastguard Worker     CAMERA_MSG_FOCUS = 0x0004,            // notifyCallback
76*61046927SAndroid Build Coastguard Worker     CAMERA_MSG_ZOOM = 0x0008,             // notifyCallback
77*61046927SAndroid Build Coastguard Worker     CAMERA_MSG_PREVIEW_FRAME = 0x0010,    // dataCallback
78*61046927SAndroid Build Coastguard Worker     CAMERA_MSG_VIDEO_FRAME = 0x0020,      // data_timestamp_callback
79*61046927SAndroid Build Coastguard Worker     CAMERA_MSG_POSTVIEW_FRAME = 0x0040,   // dataCallback
80*61046927SAndroid Build Coastguard Worker     CAMERA_MSG_RAW_IMAGE = 0x0080,        // dataCallback
81*61046927SAndroid Build Coastguard Worker     CAMERA_MSG_COMPRESSED_IMAGE = 0x0100, // dataCallback
82*61046927SAndroid Build Coastguard Worker     CAMERA_MSG_RAW_IMAGE_NOTIFY = 0x0200, // dataCallback
83*61046927SAndroid Build Coastguard Worker     // Preview frame metadata. This can be combined with
84*61046927SAndroid Build Coastguard Worker     // CAMERA_MSG_PREVIEW_FRAME in dataCallback. For example, the apps can
85*61046927SAndroid Build Coastguard Worker     // request FRAME and METADATA. Or the apps can request only FRAME or only
86*61046927SAndroid Build Coastguard Worker     // METADATA.
87*61046927SAndroid Build Coastguard Worker     CAMERA_MSG_PREVIEW_METADATA = 0x0400, // dataCallback
88*61046927SAndroid Build Coastguard Worker     // Notify on autofocus start and stop. This is useful in continuous
89*61046927SAndroid Build Coastguard Worker     // autofocus - FOCUS_MODE_CONTINUOUS_VIDEO and FOCUS_MODE_CONTINUOUS_PICTURE.
90*61046927SAndroid Build Coastguard Worker     CAMERA_MSG_FOCUS_MOVE = 0x0800,       // notifyCallback
91*61046927SAndroid Build Coastguard Worker     CAMERA_MSG_ALL_MSGS = 0xFFFF
92*61046927SAndroid Build Coastguard Worker };
93*61046927SAndroid Build Coastguard Worker 
94*61046927SAndroid Build Coastguard Worker /** cmdType in sendCommand functions */
95*61046927SAndroid Build Coastguard Worker enum {
96*61046927SAndroid Build Coastguard Worker     CAMERA_CMD_START_SMOOTH_ZOOM = 1,
97*61046927SAndroid Build Coastguard Worker     CAMERA_CMD_STOP_SMOOTH_ZOOM = 2,
98*61046927SAndroid Build Coastguard Worker 
99*61046927SAndroid Build Coastguard Worker     /**
100*61046927SAndroid Build Coastguard Worker      * Set the clockwise rotation of preview display (setPreviewDisplay) in
101*61046927SAndroid Build Coastguard Worker      * degrees. This affects the preview frames and the picture displayed after
102*61046927SAndroid Build Coastguard Worker      * snapshot. This method is useful for portrait mode applications. Note
103*61046927SAndroid Build Coastguard Worker      * that preview display of front-facing cameras is flipped horizontally
104*61046927SAndroid Build Coastguard Worker      * before the rotation, that is, the image is reflected along the central
105*61046927SAndroid Build Coastguard Worker      * vertical axis of the camera sensor. So the users can see themselves as
106*61046927SAndroid Build Coastguard Worker      * looking into a mirror.
107*61046927SAndroid Build Coastguard Worker      *
108*61046927SAndroid Build Coastguard Worker      * This does not affect the order of byte array of
109*61046927SAndroid Build Coastguard Worker      * CAMERA_MSG_PREVIEW_FRAME, CAMERA_MSG_VIDEO_FRAME,
110*61046927SAndroid Build Coastguard Worker      * CAMERA_MSG_POSTVIEW_FRAME, CAMERA_MSG_RAW_IMAGE, or
111*61046927SAndroid Build Coastguard Worker      * CAMERA_MSG_COMPRESSED_IMAGE. This is allowed to be set during preview
112*61046927SAndroid Build Coastguard Worker      * since API level 14.
113*61046927SAndroid Build Coastguard Worker      */
114*61046927SAndroid Build Coastguard Worker     CAMERA_CMD_SET_DISPLAY_ORIENTATION = 3,
115*61046927SAndroid Build Coastguard Worker 
116*61046927SAndroid Build Coastguard Worker     /**
117*61046927SAndroid Build Coastguard Worker      * cmdType to disable/enable shutter sound. In sendCommand passing arg1 =
118*61046927SAndroid Build Coastguard Worker      * 0 will disable, while passing arg1 = 1 will enable the shutter sound.
119*61046927SAndroid Build Coastguard Worker      */
120*61046927SAndroid Build Coastguard Worker     CAMERA_CMD_ENABLE_SHUTTER_SOUND = 4,
121*61046927SAndroid Build Coastguard Worker 
122*61046927SAndroid Build Coastguard Worker     /* cmdType to play recording sound */
123*61046927SAndroid Build Coastguard Worker     CAMERA_CMD_PLAY_RECORDING_SOUND = 5,
124*61046927SAndroid Build Coastguard Worker 
125*61046927SAndroid Build Coastguard Worker     /**
126*61046927SAndroid Build Coastguard Worker      * Start the face detection. This should be called after preview is started.
127*61046927SAndroid Build Coastguard Worker      * The camera will notify the listener of CAMERA_MSG_FACE and the detected
128*61046927SAndroid Build Coastguard Worker      * faces in the preview frame. The detected faces may be the same as the
129*61046927SAndroid Build Coastguard Worker      * previous ones. Apps should call CAMERA_CMD_STOP_FACE_DETECTION to stop
130*61046927SAndroid Build Coastguard Worker      * the face detection. This method is supported if CameraParameters
131*61046927SAndroid Build Coastguard Worker      * KEY_MAX_NUM_HW_DETECTED_FACES or KEY_MAX_NUM_SW_DETECTED_FACES is
132*61046927SAndroid Build Coastguard Worker      * bigger than 0. Hardware and software face detection should not be running
133*61046927SAndroid Build Coastguard Worker      * at the same time. If the face detection has started, apps should not send
134*61046927SAndroid Build Coastguard Worker      * this again.
135*61046927SAndroid Build Coastguard Worker      *
136*61046927SAndroid Build Coastguard Worker      * In hardware face detection mode, CameraParameters KEY_WHITE_BALANCE,
137*61046927SAndroid Build Coastguard Worker      * KEY_FOCUS_AREAS and KEY_METERING_AREAS have no effect.
138*61046927SAndroid Build Coastguard Worker      *
139*61046927SAndroid Build Coastguard Worker      * arg1 is the face detection type. It can be CAMERA_FACE_DETECTION_HW or
140*61046927SAndroid Build Coastguard Worker      * CAMERA_FACE_DETECTION_SW. If the type of face detection requested is not
141*61046927SAndroid Build Coastguard Worker      * supported, the HAL must return BAD_VALUE.
142*61046927SAndroid Build Coastguard Worker      */
143*61046927SAndroid Build Coastguard Worker     CAMERA_CMD_START_FACE_DETECTION = 6,
144*61046927SAndroid Build Coastguard Worker 
145*61046927SAndroid Build Coastguard Worker     /**
146*61046927SAndroid Build Coastguard Worker      * Stop the face detection.
147*61046927SAndroid Build Coastguard Worker      */
148*61046927SAndroid Build Coastguard Worker     CAMERA_CMD_STOP_FACE_DETECTION = 7,
149*61046927SAndroid Build Coastguard Worker 
150*61046927SAndroid Build Coastguard Worker     /**
151*61046927SAndroid Build Coastguard Worker      * Enable/disable focus move callback (CAMERA_MSG_FOCUS_MOVE). Passing
152*61046927SAndroid Build Coastguard Worker      * arg1 = 0 will disable, while passing arg1 = 1 will enable the callback.
153*61046927SAndroid Build Coastguard Worker      */
154*61046927SAndroid Build Coastguard Worker     CAMERA_CMD_ENABLE_FOCUS_MOVE_MSG = 8,
155*61046927SAndroid Build Coastguard Worker 
156*61046927SAndroid Build Coastguard Worker     /**
157*61046927SAndroid Build Coastguard Worker      * Ping camera service to see if camera hardware is released.
158*61046927SAndroid Build Coastguard Worker      *
159*61046927SAndroid Build Coastguard Worker      * When any camera method returns error, the client can use ping command
160*61046927SAndroid Build Coastguard Worker      * to see if the camera has been taken away by other clients. If the result
161*61046927SAndroid Build Coastguard Worker      * is OK, it means the camera hardware is not released. If the result
162*61046927SAndroid Build Coastguard Worker      * is not OK, the camera has been released and the existing client
163*61046927SAndroid Build Coastguard Worker      * can silently finish itself or show a dialog.
164*61046927SAndroid Build Coastguard Worker      */
165*61046927SAndroid Build Coastguard Worker     CAMERA_CMD_PING = 9,
166*61046927SAndroid Build Coastguard Worker 
167*61046927SAndroid Build Coastguard Worker     /**
168*61046927SAndroid Build Coastguard Worker      * Configure the number of video buffers used for recording. The intended
169*61046927SAndroid Build Coastguard Worker      * video buffer count for recording is passed as arg1, which must be
170*61046927SAndroid Build Coastguard Worker      * greater than 0. This command must be sent before recording is started.
171*61046927SAndroid Build Coastguard Worker      * This command returns INVALID_OPERATION error if it is sent after video
172*61046927SAndroid Build Coastguard Worker      * recording is started, or the command is not supported at all. This
173*61046927SAndroid Build Coastguard Worker      * command also returns a BAD_VALUE error if the intended video buffer
174*61046927SAndroid Build Coastguard Worker      * count is non-positive or too big to be realized.
175*61046927SAndroid Build Coastguard Worker      */
176*61046927SAndroid Build Coastguard Worker     CAMERA_CMD_SET_VIDEO_BUFFER_COUNT = 10,
177*61046927SAndroid Build Coastguard Worker 
178*61046927SAndroid Build Coastguard Worker     /**
179*61046927SAndroid Build Coastguard Worker      * Configure an explicit format to use for video recording metadata mode.
180*61046927SAndroid Build Coastguard Worker      * This can be used to switch the format from the
181*61046927SAndroid Build Coastguard Worker      * default IMPLEMENTATION_DEFINED gralloc format to some other
182*61046927SAndroid Build Coastguard Worker      * device-supported format, and the default dataspace from the BT_709 color
183*61046927SAndroid Build Coastguard Worker      * space to some other device-supported dataspace. arg1 is the HAL pixel
184*61046927SAndroid Build Coastguard Worker      * format, and arg2 is the HAL dataSpace. This command returns
185*61046927SAndroid Build Coastguard Worker      * INVALID_OPERATION error if it is sent after video recording is started,
186*61046927SAndroid Build Coastguard Worker      * or the command is not supported at all.
187*61046927SAndroid Build Coastguard Worker      *
188*61046927SAndroid Build Coastguard Worker      * If the gralloc format is set to a format other than
189*61046927SAndroid Build Coastguard Worker      * IMPLEMENTATION_DEFINED, then HALv3 devices will use gralloc usage flags
190*61046927SAndroid Build Coastguard Worker      * of SW_READ_OFTEN.
191*61046927SAndroid Build Coastguard Worker      */
192*61046927SAndroid Build Coastguard Worker     CAMERA_CMD_SET_VIDEO_FORMAT = 11
193*61046927SAndroid Build Coastguard Worker };
194*61046927SAndroid Build Coastguard Worker 
195*61046927SAndroid Build Coastguard Worker /** camera fatal errors */
196*61046927SAndroid Build Coastguard Worker enum {
197*61046927SAndroid Build Coastguard Worker     CAMERA_ERROR_UNKNOWN = 1,
198*61046927SAndroid Build Coastguard Worker     /**
199*61046927SAndroid Build Coastguard Worker      * Camera was released because another client has connected to the camera.
200*61046927SAndroid Build Coastguard Worker      * The original client should call Camera::disconnect immediately after
201*61046927SAndroid Build Coastguard Worker      * getting this notification. Otherwise, the camera will be released by
202*61046927SAndroid Build Coastguard Worker      * camera service in a short time. The client should not call any method
203*61046927SAndroid Build Coastguard Worker      * (except disconnect and sending CAMERA_CMD_PING) after getting this.
204*61046927SAndroid Build Coastguard Worker      */
205*61046927SAndroid Build Coastguard Worker     CAMERA_ERROR_RELEASED = 2,
206*61046927SAndroid Build Coastguard Worker 
207*61046927SAndroid Build Coastguard Worker     /**
208*61046927SAndroid Build Coastguard Worker      * Camera was released because device policy change or the client application
209*61046927SAndroid Build Coastguard Worker      * is going to background. The client should call Camera::disconnect
210*61046927SAndroid Build Coastguard Worker      * immediately after getting this notification. Otherwise, the camera will be
211*61046927SAndroid Build Coastguard Worker      * released by camera service in a short time. The client should not call any
212*61046927SAndroid Build Coastguard Worker      * method (except disconnect and sending CAMERA_CMD_PING) after getting this.
213*61046927SAndroid Build Coastguard Worker      */
214*61046927SAndroid Build Coastguard Worker     CAMERA_ERROR_DISABLED = 3,
215*61046927SAndroid Build Coastguard Worker     CAMERA_ERROR_SERVER_DIED = 100
216*61046927SAndroid Build Coastguard Worker };
217*61046927SAndroid Build Coastguard Worker 
218*61046927SAndroid Build Coastguard Worker enum {
219*61046927SAndroid Build Coastguard Worker     /** The facing of the camera is opposite to that of the screen. */
220*61046927SAndroid Build Coastguard Worker     CAMERA_FACING_BACK = 0,
221*61046927SAndroid Build Coastguard Worker     /** The facing of the camera is the same as that of the screen. */
222*61046927SAndroid Build Coastguard Worker     CAMERA_FACING_FRONT = 1,
223*61046927SAndroid Build Coastguard Worker     /**
224*61046927SAndroid Build Coastguard Worker      * The facing of the camera is not fixed relative to the screen.
225*61046927SAndroid Build Coastguard Worker      * The cameras with this facing are external cameras, e.g. USB cameras.
226*61046927SAndroid Build Coastguard Worker      */
227*61046927SAndroid Build Coastguard Worker     CAMERA_FACING_EXTERNAL = 2
228*61046927SAndroid Build Coastguard Worker };
229*61046927SAndroid Build Coastguard Worker 
230*61046927SAndroid Build Coastguard Worker enum {
231*61046927SAndroid Build Coastguard Worker     /** Hardware face detection. It does not use much CPU. */
232*61046927SAndroid Build Coastguard Worker     CAMERA_FACE_DETECTION_HW = 0,
233*61046927SAndroid Build Coastguard Worker     /**
234*61046927SAndroid Build Coastguard Worker      * Software face detection. It uses some CPU. Applications must use
235*61046927SAndroid Build Coastguard Worker      * Camera.setPreviewTexture for preview in this mode.
236*61046927SAndroid Build Coastguard Worker      */
237*61046927SAndroid Build Coastguard Worker     CAMERA_FACE_DETECTION_SW = 1
238*61046927SAndroid Build Coastguard Worker };
239*61046927SAndroid Build Coastguard Worker 
240*61046927SAndroid Build Coastguard Worker /**
241*61046927SAndroid Build Coastguard Worker  * The information of a face from camera face detection.
242*61046927SAndroid Build Coastguard Worker  */
243*61046927SAndroid Build Coastguard Worker typedef struct camera_face {
244*61046927SAndroid Build Coastguard Worker     /**
245*61046927SAndroid Build Coastguard Worker      * Bounds of the face [left, top, right, bottom]. (-1000, -1000) represents
246*61046927SAndroid Build Coastguard Worker      * the top-left of the camera field of view, and (1000, 1000) represents the
247*61046927SAndroid Build Coastguard Worker      * bottom-right of the field of view. The width and height cannot be 0 or
248*61046927SAndroid Build Coastguard Worker      * negative. This is supported by both hardware and software face detection.
249*61046927SAndroid Build Coastguard Worker      *
250*61046927SAndroid Build Coastguard Worker      * The direction is relative to the sensor orientation, that is, what the
251*61046927SAndroid Build Coastguard Worker      * sensor sees. The direction is not affected by the rotation or mirroring
252*61046927SAndroid Build Coastguard Worker      * of CAMERA_CMD_SET_DISPLAY_ORIENTATION.
253*61046927SAndroid Build Coastguard Worker      */
254*61046927SAndroid Build Coastguard Worker     int32_t rect[4];
255*61046927SAndroid Build Coastguard Worker 
256*61046927SAndroid Build Coastguard Worker     /**
257*61046927SAndroid Build Coastguard Worker      * The confidence level of the face. The range is 1 to 100. 100 is the
258*61046927SAndroid Build Coastguard Worker      * highest confidence. This is supported by both hardware and software
259*61046927SAndroid Build Coastguard Worker      * face detection.
260*61046927SAndroid Build Coastguard Worker      */
261*61046927SAndroid Build Coastguard Worker     int32_t score;
262*61046927SAndroid Build Coastguard Worker 
263*61046927SAndroid Build Coastguard Worker     /**
264*61046927SAndroid Build Coastguard Worker      * An unique id per face while the face is visible to the tracker. If
265*61046927SAndroid Build Coastguard Worker      * the face leaves the field-of-view and comes back, it will get a new
266*61046927SAndroid Build Coastguard Worker      * id. If the value is 0, id is not supported.
267*61046927SAndroid Build Coastguard Worker      */
268*61046927SAndroid Build Coastguard Worker     int32_t id;
269*61046927SAndroid Build Coastguard Worker 
270*61046927SAndroid Build Coastguard Worker     /**
271*61046927SAndroid Build Coastguard Worker      * The coordinates of the center of the left eye. The range is -1000 to
272*61046927SAndroid Build Coastguard Worker      * 1000. -2000, -2000 if this is not supported.
273*61046927SAndroid Build Coastguard Worker      */
274*61046927SAndroid Build Coastguard Worker     int32_t left_eye[2];
275*61046927SAndroid Build Coastguard Worker 
276*61046927SAndroid Build Coastguard Worker     /**
277*61046927SAndroid Build Coastguard Worker      * The coordinates of the center of the right eye. The range is -1000 to
278*61046927SAndroid Build Coastguard Worker      * 1000. -2000, -2000 if this is not supported.
279*61046927SAndroid Build Coastguard Worker      */
280*61046927SAndroid Build Coastguard Worker     int32_t right_eye[2];
281*61046927SAndroid Build Coastguard Worker 
282*61046927SAndroid Build Coastguard Worker     /**
283*61046927SAndroid Build Coastguard Worker      * The coordinates of the center of the mouth. The range is -1000 to 1000.
284*61046927SAndroid Build Coastguard Worker      * -2000, -2000 if this is not supported.
285*61046927SAndroid Build Coastguard Worker      */
286*61046927SAndroid Build Coastguard Worker     int32_t mouth[2];
287*61046927SAndroid Build Coastguard Worker 
288*61046927SAndroid Build Coastguard Worker } camera_face_t;
289*61046927SAndroid Build Coastguard Worker 
290*61046927SAndroid Build Coastguard Worker /**
291*61046927SAndroid Build Coastguard Worker  * The metadata of the frame data.
292*61046927SAndroid Build Coastguard Worker  */
293*61046927SAndroid Build Coastguard Worker typedef struct camera_frame_metadata {
294*61046927SAndroid Build Coastguard Worker     /**
295*61046927SAndroid Build Coastguard Worker      * The number of detected faces in the frame.
296*61046927SAndroid Build Coastguard Worker      */
297*61046927SAndroid Build Coastguard Worker     int32_t number_of_faces;
298*61046927SAndroid Build Coastguard Worker 
299*61046927SAndroid Build Coastguard Worker     /**
300*61046927SAndroid Build Coastguard Worker      * An array of the detected faces. The length is number_of_faces.
301*61046927SAndroid Build Coastguard Worker      */
302*61046927SAndroid Build Coastguard Worker     camera_face_t *faces;
303*61046927SAndroid Build Coastguard Worker } camera_frame_metadata_t;
304*61046927SAndroid Build Coastguard Worker 
305*61046927SAndroid Build Coastguard Worker __END_DECLS
306*61046927SAndroid Build Coastguard Worker 
307*61046927SAndroid Build Coastguard Worker #endif /* SYSTEM_CORE_INCLUDE_ANDROID_CAMERA_H */
308