camera.h revision 3ac91d178bfbc38fbeb4743f9fbe5619e8e744d0
166ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev/* 266ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * Copyright (C) 2011 The Android Open Source Project 366ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * 466ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * Licensed under the Apache License, Version 2.0 (the "License"); 566ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * you may not use this file except in compliance with the License. 666ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * You may obtain a copy of the License at 766ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * 866ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * http://www.apache.org/licenses/LICENSE-2.0 966ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * 1066ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * Unless required by applicable law or agreed to in writing, software 1166ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * distributed under the License is distributed on an "AS IS" BASIS, 1266ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1366ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * See the License for the specific language governing permissions and 1466ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * limitations under the License. 1566ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev */ 1666ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev 1766ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev#ifndef SYSTEM_CORE_INCLUDE_ANDROID_CAMERA_H 1866ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev#define SYSTEM_CORE_INCLUDE_ANDROID_CAMERA_H 1966ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev 2066ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev#include <stdint.h> 2166ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev#include <sys/cdefs.h> 2266ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev#include <sys/types.h> 2366ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev#include <cutils/native_handle.h> 2466ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev#include <hardware/hardware.h> 2566ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev#include <hardware/gralloc.h> 2666ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev 2766ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev__BEGIN_DECLS 2866ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev 2966ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev/** 3066ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * A set of bit masks for specifying how the received preview frames are 3166ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * handled before the previewCallback() call. 3266ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * 3366ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * The least significant 3 bits of an "int" value are used for this purpose: 3466ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * 3566ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * ..... 0 0 0 3666ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * ^ ^ ^ 3766ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * | | |---------> determine whether the callback is enabled or not 3866ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * | |-----------> determine whether the callback is one-shot or not 3966ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * |-------------> determine whether the frame is copied out or not 4066ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * 4166ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * WARNING: When a frame is sent directly without copying, it is the frame 4266ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * receiver's responsiblity to make sure that the frame data won't get 4366ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * corrupted by subsequent preview frames filled by the camera. This flag is 4466ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * recommended only when copying out data brings significant performance price 4566ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * and the handling/processing of the received frame data is always faster than 4666ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * the preview frame rate so that data corruption won't occur. 4766ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * 4866ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * For instance, 4966ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * 1. 0x00 disables the callback. In this case, copy out and one shot bits 5066ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * are ignored. 5166ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * 2. 0x01 enables a callback without copying out the received frames. A 5266ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * typical use case is the Camcorder application to avoid making costly 5366ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * frame copies. 5466ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * 3. 0x05 is enabling a callback with frame copied out repeatedly. A typical 5566ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * use case is the Camera application. 5666ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * 4. 0x07 is enabling a callback with frame copied out only once. A typical 5766ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * use case is the Barcode scanner application. 5866ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev */ 5966ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev 6066ea3574b6383e4107c74a192cadda1427320375Iliyan Malchevenum { 6166ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev CAMERA_FRAME_CALLBACK_FLAG_ENABLE_MASK = 0x01, 6266ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev CAMERA_FRAME_CALLBACK_FLAG_ONE_SHOT_MASK = 0x02, 6366ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev CAMERA_FRAME_CALLBACK_FLAG_COPY_OUT_MASK = 0x04, 6466ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev /** Typical use cases */ 6566ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev CAMERA_FRAME_CALLBACK_FLAG_NOOP = 0x00, 6666ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev CAMERA_FRAME_CALLBACK_FLAG_CAMCORDER = 0x01, 6766ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev CAMERA_FRAME_CALLBACK_FLAG_CAMERA = 0x05, 6866ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev CAMERA_FRAME_CALLBACK_FLAG_BARCODE_SCANNER = 0x07 6966ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev}; 7066ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev 7166ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev/** msgType in notifyCallback and dataCallback functions */ 7266ea3574b6383e4107c74a192cadda1427320375Iliyan Malchevenum { 739d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li CAMERA_MSG_ERROR = 0x0001, // notifyCallback 749d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li CAMERA_MSG_SHUTTER = 0x0002, // notifyCallback 759d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li CAMERA_MSG_FOCUS = 0x0004, // notifyCallback 769d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li CAMERA_MSG_ZOOM = 0x0008, // notifyCallback 779d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li CAMERA_MSG_PREVIEW_FRAME = 0x0010, // dataCallback 789d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li CAMERA_MSG_VIDEO_FRAME = 0x0020, // data_timestamp_callback 799d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li CAMERA_MSG_POSTVIEW_FRAME = 0x0040, // dataCallback 809d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li CAMERA_MSG_RAW_IMAGE = 0x0080, // dataCallback 819d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li CAMERA_MSG_COMPRESSED_IMAGE = 0x0100, // dataCallback 829d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li CAMERA_MSG_RAW_IMAGE_NOTIFY = 0x0200, // dataCallback 839d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li // Face metadata. This can be combined with CAMERA_MSG_PREVIEW_FRAME in 849d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li // dataCallback. For example, the apps can request PREVIEW_FRAME and FACE. 859d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li // Or the apps can request only PREVIEW_FRAME or only FACE. 869d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li CAMERA_MSG_METADATA_FACE = 0x0400, // dataCallback 8766ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev CAMERA_MSG_ALL_MSGS = 0xFFFF 8866ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev}; 8966ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev 9066ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev/** cmdType in sendCommand functions */ 9166ea3574b6383e4107c74a192cadda1427320375Iliyan Malchevenum { 9266ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev CAMERA_CMD_START_SMOOTH_ZOOM = 1, 9366ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev CAMERA_CMD_STOP_SMOOTH_ZOOM = 2, 94de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li 95de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li /** 96de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * Set the clockwise rotation of preview display (setPreviewDisplay) in 9766ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * degrees. This affects the preview frames and the picture displayed after 9866ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * snapshot. This method is useful for portrait mode applications. Note 9966ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * that preview display of front-facing cameras is flipped horizontally 10066ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * before the rotation, that is, the image is reflected along the central 10166ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * vertical axis of the camera sensor. So the users can see themselves as 10266ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * looking into a mirror. 10366ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * 10466ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * This does not affect the order of byte array of 10566ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * CAMERA_MSG_PREVIEW_FRAME, CAMERA_MSG_VIDEO_FRAME, 10666ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * CAMERA_MSG_POSTVIEW_FRAME, CAMERA_MSG_RAW_IMAGE, or 10766ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * CAMERA_MSG_COMPRESSED_IMAGE. This is not allowed to be set during 10866ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * preview 10966ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev */ 11066ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev CAMERA_CMD_SET_DISPLAY_ORIENTATION = 3, 11166ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev 112de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li /** 113de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * cmdType to disable/enable shutter sound. In sendCommand passing arg1 = 11466ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev * 0 will disable, while passing arg1 = 1 will enable the shutter sound. 11566ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev */ 11666ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev CAMERA_CMD_ENABLE_SHUTTER_SOUND = 4, 11766ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev 11866ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev /* cmdType to play recording sound */ 11966ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev CAMERA_CMD_PLAY_RECORDING_SOUND = 5, 120de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li 121de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li /** 122de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * Start the face detection. This should be called after preview is started. 123de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * The camera will notify the listener of CAMERA_MSG_FACE and the detected 124de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * faces in the preview frame. The detected faces may be the same as the 125de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * previous ones. Apps should call CAMERA_CMD_STOP_FACE_DETECTION to stop 126de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * the face detection. This method is supported if CameraParameters 127de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * KEY_MAX_NUM_HW_DETECTED_FACES or KEY_MAX_NUM_SW_DETECTED_FACES is 128de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * bigger than 0. Hardware and software face detection should not be running 129de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * at the same time. If the face detection has started, apps should not send 130de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * this again. 131de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * 132de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * In hardware face detection mode, CameraParameters KEY_WHITE_BALANCE, 133de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * KEY_FOCUS_AREAS and KEY_METERING_AREAS have no effect. 134de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * 135de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * arg1 is the face detection type. It can be CAMERA_FACE_DETECTION_HW or 136de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * CAMERA_FACE_DETECTION_SW. 137de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li */ 138de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li CAMERA_CMD_START_FACE_DETECTION = 6, 139de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li 140de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li /** 141de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * Stop the face detection. 142de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li */ 143de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li CAMERA_CMD_STOP_FACE_DETECTION = 7, 14466ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev}; 14566ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev 14666ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev/** camera fatal errors */ 14766ea3574b6383e4107c74a192cadda1427320375Iliyan Malchevenum { 14866ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev CAMERA_ERROR_UNKNOWN = 1, 14966ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev CAMERA_ERROR_SERVER_DIED = 100 15066ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev}; 15166ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev 15266ea3574b6383e4107c74a192cadda1427320375Iliyan Malchevenum { 153de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li /** The facing of the camera is opposite to that of the screen. */ 154de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li CAMERA_FACING_BACK = 0, 155de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li /** The facing of the camera is the same as that of the screen. */ 156de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li CAMERA_FACING_FRONT = 1 157de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li}; 158de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li 159de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Lienum { 160de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li /** Hardware face detection. It does not use much CPU. */ 161de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li CAMERA_FACE_DETECTION_HW = 0, 162de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li /** 163de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * Software face detection. It uses some CPU. Applications must use 164de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li * Camera.setPreviewTexture for preview in this mode. 165de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li */ 166de19ea26025927fe95ec96818a13dd58bec91cf6Wu-cheng Li CAMERA_FACE_DETECTION_SW = 1 16766ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev}; 16866ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev 1699d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li/** 1709d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * The information of a face from camera face detection. 1719d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li */ 1729d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Litypedef struct camera_face { 1739d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li /** 1749d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * Bounds of the face [left, top, right, bottom]. (-1000, -1000) represents 1759d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * the top-left of the camera field of view, and (1000, 1000) represents the 1769d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * bottom-right of the field of view. The width and height cannot be 0 or 1779d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * negative. This is supported by both hardware and software face detection. 1789d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * 1799d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * The direction is relative to the sensor orientation, that is, what the 1809d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * sensor sees. The direction is not affected by the rotation or mirroring 1819d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * of CAMERA_CMD_SET_DISPLAY_ORIENTATION. 1829d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li */ 1833ac91d178bfbc38fbeb4743f9fbe5619e8e744d0Wu-cheng Li int32_t rect[4]; 1849d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li 1859d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li /** 1869d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * The confidence level of the face. The range is 1 to 100. 100 is the 1879d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * highest confidence. This is supported by both hardware and software 1889d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * face detection. 1899d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li */ 1903ac91d178bfbc38fbeb4743f9fbe5619e8e744d0Wu-cheng Li int32_t score; 1919d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li 1929d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li /** 1939d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * An unique id per face while the face is visible to the tracker. If 1949d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * the face leaves the field-of-view and comes back, it will get a new 1959d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * id. If the value is 0, id is not supported. 1969d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li */ 1973ac91d178bfbc38fbeb4743f9fbe5619e8e744d0Wu-cheng Li int32_t id; 1989d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li 1999d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li /** 2009d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * The coordinates of the center of the left eye. The range is -1000 to 2019d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * 1000. -2000, -2000 if this is not supported. 2029d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li */ 2033ac91d178bfbc38fbeb4743f9fbe5619e8e744d0Wu-cheng Li int32_t left_eye[2]; 2049d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li 2059d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li /** 2069d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * The coordinates of the center of the right eye. The range is -1000 to 2079d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * 1000. -2000, -2000 if this is not supported. 2089d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li */ 2093ac91d178bfbc38fbeb4743f9fbe5619e8e744d0Wu-cheng Li int32_t right_eye[2]; 2109d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li 2119d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li /** 2129d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * The coordinates of the center of the mouth. The range is -1000 to 1000. 2139d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * -2000, -2000 if this is not supported. 2149d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li */ 2153ac91d178bfbc38fbeb4743f9fbe5619e8e744d0Wu-cheng Li int32_t mouth[2]; 2169d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li 2179d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li} camera_face_t; 2189d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li 2199d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li/** 2209d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * The metadata of the frame data. 2219d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li */ 2229d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Litypedef struct camera_frame_metadata { 2239d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li /** 2249d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * The number of detected faces in the frame. 2259d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li */ 2263ac91d178bfbc38fbeb4743f9fbe5619e8e744d0Wu-cheng Li int32_t number_of_faces; 2279d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li 2289d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li /** 2299d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * An array of the detected faces. The length is number_of_faces. The list 2309d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li * is sorted by the score. The highest score is the first element. 2319d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li */ 2329d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li camera_face_t *faces; 2339d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li} camera_frame_metadata_t; 2349d5bfd35414f2be2f1ea8a2cabee8f407d3e38c0Wu-cheng Li 23566ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev__END_DECLS 23666ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev 23766ea3574b6383e4107c74a192cadda1427320375Iliyan Malchev#endif /* SYSTEM_CORE_INCLUDE_ANDROID_CAMERA_H */ 238