CameraParameters.h revision f6d9696bf1db133d16dd8981380e1bfbd2e0bc70
1f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)/* 2f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * Copyright (C) 2008 The Android Open Source Project 3f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * 4f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * Licensed under the Apache License, Version 2.0 (the "License"); 5f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * you may not use this file except in compliance with the License. 6f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * You may obtain a copy of the License at 7a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch * 8a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) * http://www.apache.org/licenses/LICENSE-2.0 9010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) * 10a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) * Unless required by applicable law or agreed to in writing, software 11a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) * distributed under the License is distributed on an "AS IS" BASIS, 12a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * See the License for the specific language governing permissions and 14cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) * limitations under the License. 155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) */ 16a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 17a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch#ifndef ANDROID_HARDWARE_CAMERA_PARAMETERS_H 18f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#define ANDROID_HARDWARE_CAMERA_PARAMETERS_H 19f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 20f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include <utils/KeyedVector.h> 215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include <utils/String8.h> 225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)namespace android { 245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)struct Size { 265f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) int width; 27cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) int height; 28cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 29cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) Size() { 30cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) width = 0; 31116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch height = 0; 321320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci } 33116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch 345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) Size(int w, int h) { 355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) width = w; 365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) height = h; 375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}; 395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 40c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdochclass CameraParameters 41c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch{ 42c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdochpublic: 43a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) CameraParameters(); 44a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) CameraParameters(const String8 ¶ms) { unflatten(params); } 45c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch ~CameraParameters(); 465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) String8 flatten() const; 485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) void unflatten(const String8 ¶ms); 495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) void set(const char *key, const char *value); 515c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu void set(const char *key, int value); 525c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu void setFloat(const char *key, float value); 535c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu const char *get(const char *key) const; 545c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu int getInt(const char *key) const; 555c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu float getFloat(const char *key) const; 565c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu 575c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu void remove(const char *key); 585c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu 595c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu void setPreviewSize(int width, int height); 605c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu void getPreviewSize(int *width, int *height) const; 615d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) void getSupportedPreviewSizes(Vector<Size> &sizes) const; 625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 635d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Set the dimensions in pixels to the given width and height 645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // for video frames. The given width and height must be one 655d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // of the supported dimensions returned from 665d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // getSupportedVideoSizes(). Must not be called if 675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // getSupportedVideoSizes() returns an empty Vector of Size. 685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) void setVideoSize(int width, int height); 695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Retrieve the current dimensions (width and height) 705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // in pixels for video frames, which must be one of the 715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // supported dimensions returned from getSupportedVideoSizes(). 72a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // Must not be called if getSupportedVideoSizes() returns an 735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // empty Vector of Size. 745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) void getVideoSize(int *width, int *height) const; 755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Retrieve a Vector of supported dimensions (width and height) 765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // in pixels for video frames. If sizes returned from the method 775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // is empty, the camera does not support calls to setVideoSize() 785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // or getVideoSize(). In adddition, it also indicates that 795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // the camera only has a single output, and does not have 805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // separate output for video frames and preview frame. 815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) void getSupportedVideoSizes(Vector<Size> &sizes) const; 825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Retrieve the preferred preview size (width and height) in pixels 835c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // for video recording. The given width and height must be one of 845c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // supported preview sizes returned from getSupportedPreviewSizes(). 855c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Must not be called if getSupportedVideoSizes() returns an empty 865c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Vector of Size. If getSupportedVideoSizes() returns an empty 875c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Vector of Size, the width and height returned from this method 88e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch // is invalid, and is "-1x-1". 89e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch void getPreferredPreviewSizeForVideo(int *width, int *height) const; 905d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 915d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) void setPreviewFrameRate(int fps); 92f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) int getPreviewFrameRate() const; 93a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) void getPreviewFpsRange(int *min_fps, int *max_fps) const; 941320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci void setPreviewFormat(const char *format); 95c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch const char *getPreviewFormat() const; 96c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch void setPictureSize(int width, int height); 97a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) void getPictureSize(int *width, int *height) const; 98c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch void getSupportedPictureSizes(Vector<Size> &sizes) const; 991320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci void setPictureFormat(const char *format); 100a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) const char *getPictureFormat() const; 101a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch 102cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) void dump() const; 103116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch status_t dump(int fd, const Vector<String16>& args) const; 104a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch 105c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // Parameter keys to communicate between camera application and driver. 106cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) // The access (read/write, read only, or write only) is viewed from the 107c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // perspective of applications, not driver. 108c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch 1090529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // Preview frame size in pixels (width x height). 1105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Example value: "480x320". Read/Write. 111c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch static const char KEY_PREVIEW_SIZE[]; 112c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // Supported preview frame sizes in pixels. 1130529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // Example value: "800x600,480x320". Read only. 1146e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) static const char KEY_SUPPORTED_PREVIEW_SIZES[]; 1156e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) // The current minimum and maximum preview fps. This controls the rate of 116a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) // preview frames received (CAMERA_MSG_PREVIEW_FRAME). The minimum and 117f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) // maximum fps must be one of the elements from 118c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // KEY_SUPPORTED_PREVIEW_FPS_RANGE parameter. 119cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) // Example value: "10500,26623" 120c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch static const char KEY_PREVIEW_FPS_RANGE[]; 121c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // The supported preview fps (frame-per-second) ranges. Each range contains 122cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) // a minimum fps and maximum fps. If minimum fps equals to maximum fps, the 123a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) // camera outputs frames in fixed frame rate. If not, the camera outputs 124a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) // frames in auto frame rate. The actual frame rate fluctuates between the 125a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // minimum and the maximum. The list has at least one element. The list is 126a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // sorted from small to large (first by maximum fps and then minimum fps). 127a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // Example value: "(10500,26623),(15000,26623),(30000,30000)" 128a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch static const char KEY_SUPPORTED_PREVIEW_FPS_RANGE[]; 1295f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) // The image format for preview frames. See CAMERA_MSG_PREVIEW_FRAME in 1305f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) // frameworks/av/include/camera/Camera.h. The default is 1315f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) // PIXEL_FORMAT_YUV420SP. Example value: "yuv420sp" or PIXEL_FORMAT_XXX 1325f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) // constants. Read/write. 133a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) static const char KEY_PREVIEW_FORMAT[]; 134a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // Supported image formats for preview frames. 135a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // Example value: "yuv420sp,yuv422i-yuyv". Read only. 136a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) static const char KEY_SUPPORTED_PREVIEW_FORMATS[]; 137a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // Number of preview frames per second. This is the target frame rate. The 138a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // actual frame rate depends on the driver. 139a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // Example value: "15". Read/write. 140a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) static const char KEY_PREVIEW_FRAME_RATE[]; 141a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // Supported number of preview frames per second. 142a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // Example value: "24,15,10". Read. 143a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) static const char KEY_SUPPORTED_PREVIEW_FRAME_RATES[]; 144a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // The dimensions for captured pictures in pixels (width x height). 145a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // Example value: "1024x768". Read/write. 146a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) static const char KEY_PICTURE_SIZE[]; 147a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // Supported dimensions for captured pictures in pixels. 148a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // Example value: "2048x1536,1024x768". Read only. 149a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) static const char KEY_SUPPORTED_PICTURE_SIZES[]; 150a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // The image format for captured pictures. See CAMERA_MSG_COMPRESSED_IMAGE 151a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // in frameworks/base/include/camera/Camera.h. 152cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) // Example value: "jpeg" or PIXEL_FORMAT_XXX constants. Read/write. 153cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) static const char KEY_PICTURE_FORMAT[]; 154cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) // Supported image formats for captured pictures. 1551320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // Example value: "jpeg,rgb565". Read only. 156cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) static const char KEY_SUPPORTED_PICTURE_FORMATS[]; 157cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) // The width (in pixels) of EXIF thumbnail in Jpeg picture. 158cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) // Example value: "512". Read/write. 159cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) static const char KEY_JPEG_THUMBNAIL_WIDTH[]; 160a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // The height (in pixels) of EXIF thumbnail in Jpeg picture. 161a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // Example value: "384". Read/write. 1625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) static const char KEY_JPEG_THUMBNAIL_HEIGHT[]; 1631320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // Supported EXIF thumbnail sizes (width x height). 0x0 means not thumbnail 1645c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // in EXIF. 1655c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Example value: "512x384,320x240,0x0". Read only. 1661320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci static const char KEY_SUPPORTED_JPEG_THUMBNAIL_SIZES[]; 167116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // The quality of the EXIF thumbnail in Jpeg picture. The range is 1 to 100, 1685c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // with 100 being the best. 1695c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Example value: "90". Read/write. 1705c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char KEY_JPEG_THUMBNAIL_QUALITY[]; 1715c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Jpeg quality of captured picture. The range is 1 to 100, with 100 being 1725c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // the best. 1735c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Example value: "90". Read/write. 1745c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char KEY_JPEG_QUALITY[]; 1755c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // The rotation angle in degrees relative to the orientation of the camera. 1765c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // This affects the pictures returned from CAMERA_MSG_COMPRESSED_IMAGE. The 1775c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // camera driver may set orientation in the EXIF header without rotating the 1785c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // picture. Or the driver may rotate the picture and the EXIF thumbnail. If 1795c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // the Jpeg picture is rotated, the orientation in the EXIF header will be 1805c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // missing or 1 (row #0 is top and column #0 is left side). 1815c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // 1825c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Note that the JPEG pictures of front-facing cameras are not mirrored 1835c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // as in preview display. 184116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // 1855c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // For example, suppose the natural orientation of the device is portrait. 1865c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // The device is rotated 270 degrees clockwise, so the device orientation is 1875c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // 270. Suppose a back-facing camera sensor is mounted in landscape and the 1885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // top side of the camera sensor is aligned with the right edge of the 1895d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // display in natural orientation. So the camera orientation is 90. The 1905d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // rotation should be set to 0 (270 + 90). 1915d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // 1925d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Example value: "0" or "90" or "180" or "270". Write only. 193a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) static const char KEY_ROTATION[]; 1945d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // GPS latitude coordinate. GPSLatitude and GPSLatitudeRef will be stored in 1955d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // JPEG EXIF header. 1965d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Example value: "25.032146" or "-33.462809". Write only. 1975d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) static const char KEY_GPS_LATITUDE[]; 1985d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // GPS longitude coordinate. GPSLongitude and GPSLongitudeRef will be stored 1995d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // in JPEG EXIF header. 2005d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Example value: "121.564448" or "-70.660286". Write only. 2015d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) static const char KEY_GPS_LONGITUDE[]; 2025d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // GPS altitude. GPSAltitude and GPSAltitudeRef will be stored in JPEG EXIF 2035d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // header. 2045d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Example value: "21.0" or "-5". Write only. 205a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) static const char KEY_GPS_ALTITUDE[]; 206a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) // GPS timestamp (UTC in seconds since January 1, 1970). This should be 207116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // stored in JPEG EXIF header. 208116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Example value: "1251192757". Write only. 209116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch static const char KEY_GPS_TIMESTAMP[]; 210116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // GPS Processing Method 211116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Example value: "GPS" or "NETWORK". Write only. 212116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch static const char KEY_GPS_PROCESSING_METHOD[]; 213116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Current white balance setting. 214116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Example value: "auto" or WHITE_BALANCE_XXX constants. Read/write. 215116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch static const char KEY_WHITE_BALANCE[]; 216116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Supported white balance settings. 217116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Example value: "auto,incandescent,daylight". Read only. 218116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch static const char KEY_SUPPORTED_WHITE_BALANCE[]; 219116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Current color effect setting. 220116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Example value: "none" or EFFECT_XXX constants. Read/write. 221116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch static const char KEY_EFFECT[]; 222116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Supported color effect settings. 223116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Example value: "none,mono,sepia". Read only. 224116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch static const char KEY_SUPPORTED_EFFECTS[]; 2255f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) // Current antibanding setting. 2265f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) // Example value: "auto" or ANTIBANDING_XXX constants. Read/write. 2275f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) static const char KEY_ANTIBANDING[]; 2285f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) // Supported antibanding settings. 2291320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // Example value: "auto,50hz,60hz,off". Read only. 2305f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) static const char KEY_SUPPORTED_ANTIBANDING[]; 2315f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) // Current scene mode. 232116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Example value: "auto" or SCENE_MODE_XXX constants. Read/write. 233116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch static const char KEY_SCENE_MODE[]; 2345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Supported scene mode settings. 2355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Example value: "auto,night,fireworks". Read only. 236a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) static const char KEY_SUPPORTED_SCENE_MODES[]; 2375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Current flash mode. 2385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Example value: "auto" or FLASH_MODE_XXX constants. Read/write. 2395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) static const char KEY_FLASH_MODE[]; 2405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Supported flash modes. 2415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Example value: "auto,on,off". Read only. 2425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) static const char KEY_SUPPORTED_FLASH_MODES[]; 2435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Current focus mode. This will not be empty. Applications should call 2445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // CameraHardwareInterface.autoFocus to start the focus if focus mode is 2455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // FOCUS_MODE_AUTO or FOCUS_MODE_MACRO. 2465c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Example value: "auto" or FOCUS_MODE_XXX constants. Read/write. 2475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) static const char KEY_FOCUS_MODE[]; 2485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Supported focus modes. 2495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Example value: "auto,macro,fixed". Read only. 2505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) static const char KEY_SUPPORTED_FOCUS_MODES[]; 251effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch // The maximum number of focus areas supported. This is the maximum length 2525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // of KEY_FOCUS_AREAS. 253116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Example value: "0" or "2". Read only. 2545c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char KEY_MAX_NUM_FOCUS_AREAS[]; 2555c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Current focus areas. 2565c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // 2575c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Before accessing this parameter, apps should check 2585c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // KEY_MAX_NUM_FOCUS_AREAS first to know the maximum number of focus areas 2595c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // first. If the value is 0, focus area is not supported. 2605c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // 2615c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Each focus area is a five-element int array. The first four elements are 2625c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // the rectangle of the area (left, top, right, bottom). The direction is 2635c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // relative to the sensor orientation, that is, what the sensor sees. The 2645c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // direction is not affected by the rotation or mirroring of 2655c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates range from -1000 to 1000. 2665c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // (-1000,-1000) is the upper left point. (1000, 1000) is the lower right 2675c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // point. The width and height of focus areas cannot be 0 or negative. 2685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // 2695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // The fifth element is the weight. Values for weight must range from 1 to 270a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // 1000. The weight should be interpreted as a per-pixel weight - all 271a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // pixels in the area have the specified weight. This means a small area 272116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // with the same weight as a larger area will have less influence on the 2735c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // focusing than the larger area. Focus areas can partially overlap and the 2745c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // driver will add the weights in the overlap region. 2755c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // 2765c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // A special case of single focus area (0,0,0,0,0) means driver to decide 2775c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // the focus area. For example, the driver may use more signals to decide 2785c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // focus areas and change them dynamically. Apps can set (0,0,0,0,0) if they 2795c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // want the driver to decide focus areas. 2805c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // 2815c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Focus areas are relative to the current field of view (KEY_ZOOM). No 2825c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // matter what the zoom level is, (-1000,-1000) represents the top of the 2835c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // currently visible camera frame. The focus area cannot be set to be 2845c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // outside the current field of view, even when using zoom. 2855c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // 286a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // Focus area only has effect if the current focus mode is FOCUS_MODE_AUTO, 287a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // FOCUS_MODE_MACRO, FOCUS_MODE_CONTINUOUS_VIDEO, or 288a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // FOCUS_MODE_CONTINUOUS_PICTURE. 289a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // Example value: "(-10,-10,0,0,300),(0,0,10,10,700)". Read/write. 2901320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci static const char KEY_FOCUS_AREAS[]; 2911320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // Focal length in millimeter. 292116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Example value: "4.31". Read only. 2935c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char KEY_FOCAL_LENGTH[]; 2945c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Horizontal angle of view in degrees. 2955c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Example value: "54.8". Read only. 2965c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char KEY_HORIZONTAL_VIEW_ANGLE[]; 2975c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Vertical angle of view in degrees. 2981320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // Example value: "42.5". Read only. 2995c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char KEY_VERTICAL_VIEW_ANGLE[]; 3005c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Exposure compensation index. 0 means exposure is not adjusted. 3011320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // Example value: "0" or "5". Read/write. 3021320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci static const char KEY_EXPOSURE_COMPENSATION[]; 3031320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // The maximum exposure compensation index (>=0). 3045c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Example value: "6". Read only. 3055c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char KEY_MAX_EXPOSURE_COMPENSATION[]; 3065c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // The minimum exposure compensation index (<=0). 3071320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // Example value: "-6". Read only. 3081320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci static const char KEY_MIN_EXPOSURE_COMPENSATION[]; 3091320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // The exposure compensation step. Exposure compensation index multiply by 3105c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // step eqals to EV. Ex: if exposure compensation index is 6 and step is 3115c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // 0.3333, EV is -2. 3125c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Example value: "0.333333333" or "0.5". Read only. 3135c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char KEY_EXPOSURE_COMPENSATION_STEP[]; 3145c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // The state of the auto-exposure lock. "true" means that 3151320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // auto-exposure is locked to its current value and will not 3165c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // change. "false" means the auto-exposure routine is free to 3175c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // change exposure values. If auto-exposure is already locked, 318a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) // setting this to true again has no effect (the driver will not 319a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) // recalculate exposure values). Changing exposure compensation 320e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch // settings will still affect the exposure settings while 321116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // auto-exposure is locked. Stopping preview or taking a still 322a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // image will not change the lock. In conjunction with 323a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // exposure compensation, this allows for capturing multi-exposure 324a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // brackets with known relative exposure values. Locking 325a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // auto-exposure after open but before the first call to 326a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // startPreview may result in severely over- or under-exposed 327a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // images. The driver will not change the AE lock after 328a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // auto-focus completes. 3295c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char KEY_AUTO_EXPOSURE_LOCK[]; 3305c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Whether locking the auto-exposure is supported. "true" means it is, and 3315c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // "false" or this key not existing means it is not supported. 3325c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char KEY_AUTO_EXPOSURE_LOCK_SUPPORTED[]; 3335c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // The state of the auto-white balance lock. "true" means that 3345c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // auto-white balance is locked to its current value and will not 3355c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // change. "false" means the auto-white balance routine is free to 3365c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // change white balance values. If auto-white balance is already 3375c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // locked, setting this to true again has no effect (the driver 3385c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // will not recalculate white balance values). Stopping preview or 3395c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // taking a still image will not change the lock. In conjunction 3405c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // with exposure compensation, this allows for capturing 3415c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // multi-exposure brackets with fixed white balance. Locking 3425c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // auto-white balance after open but before the first call to 3435c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // startPreview may result in severely incorrect color. The 3445c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // driver will not change the AWB lock after auto-focus 3455c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // completes. 346e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch static const char KEY_AUTO_WHITEBALANCE_LOCK[]; 347e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch // Whether locking the auto-white balance is supported. "true" 348f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // means it is, and "false" or this key not existing means it is 349f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // not supported. 350116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch static const char KEY_AUTO_WHITEBALANCE_LOCK_SUPPORTED[]; 351f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) 352f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // The maximum number of metering areas supported. This is the maximum 353f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // length of KEY_METERING_AREAS. 354f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // Example value: "0" or "2". Read only. 355f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) static const char KEY_MAX_NUM_METERING_AREAS[]; 356f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // Current metering areas. Camera driver uses these areas to decide 357f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // exposure. 358f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // 359f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // Before accessing this parameter, apps should check 360f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // KEY_MAX_NUM_METERING_AREAS first to know the maximum number of metering 361f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // areas first. If the value is 0, metering area is not supported. 362f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // 363f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // Each metering area is a rectangle with specified weight. The direction is 364f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // relative to the sensor orientation, that is, what the sensor sees. The 365f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // direction is not affected by the rotation or mirroring of 366f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates of the rectangle range 367f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // from -1000 to 1000. (-1000, -1000) is the upper left point. (1000, 1000) 368f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // is the lower right point. The width and height of metering areas cannot 369f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // be 0 or negative. 370f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // 371f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // The fifth element is the weight. Values for weight must range from 1 to 372f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // 1000. The weight should be interpreted as a per-pixel weight - all 373f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // pixels in the area have the specified weight. This means a small area 374f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // with the same weight as a larger area will have less influence on the 375f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // metering than the larger area. Metering areas can partially overlap and 376f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // the driver will add the weights in the overlap region. 377c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // 378c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // A special case of all-zero single metering area means driver to decide 3790529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // the metering area. For example, the driver may use more signals to decide 3800529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // metering areas and change them dynamically. Apps can set all-zero if they 3810529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // want the driver to decide metering areas. 382cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) // 383cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) // Metering areas are relative to the current field of view (KEY_ZOOM). 384c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // No matter what the zoom level is, (-1000,-1000) represents the top of the 385c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // currently visible camera frame. The metering area cannot be set to be 386c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // outside the current field of view, even when using zoom. 387c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // 3880529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // No matter what metering areas are, the final exposure are compensated 3890529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // by KEY_EXPOSURE_COMPENSATION. 3900529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // Example value: "(-10,-10,0,0,300),(0,0,10,10,700)". Read/write. 3910529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch static const char KEY_METERING_AREAS[]; 392116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Current zoom value. 393116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Example value: "0" or "6". Read/write. 3945f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) static const char KEY_ZOOM[]; 395116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Maximum zoom value. 396116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Example value: "6". Read only. 397116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch static const char KEY_MAX_ZOOM[]; 398116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // The zoom ratios of all zoom values. The zoom ratio is in 1/100 399116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // increments. Ex: a zoom of 3.2x is returned as 320. The number of list 4005d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // elements is KEY_MAX_ZOOM + 1. The first element is always 100. The last 4015d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // element is the zoom ratio of zoom value KEY_MAX_ZOOM. 402a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // Example value: "100,150,200,250,300,350,400". Read only. 403a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch static const char KEY_ZOOM_RATIOS[]; 404a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // Whether zoom is supported. Zoom is supported if the value is "true". Zoom 405a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // is not supported if the value is not "true" or the key does not exist. 406a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // Example value: "true". Read only. 407a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch static const char KEY_ZOOM_SUPPORTED[]; 408a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // Whether if smooth zoom is supported. Smooth zoom is supported if the 409a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch // value is "true". It is not supported if the value is not "true" or the 410116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // key does not exist. 411116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // See CAMERA_CMD_START_SMOOTH_ZOOM, CAMERA_CMD_STOP_SMOOTH_ZOOM, and 412116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // CAMERA_MSG_ZOOM in frameworks/base/include/camera/Camera.h. 413116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Example value: "true". Read only. 414116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch static const char KEY_SMOOTH_ZOOM_SUPPORTED[]; 415116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch 416116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // The distances (in meters) from the camera to where an object appears to 417116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // be in focus. The object is sharpest at the optimal focus distance. The 4185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // depth of field is the far focus distance minus near focus distance. 419a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // 4205f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) // Focus distances may change after starting auto focus, canceling auto 4215f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) // focus, or starting the preview. Applications can read this anytime to get 4225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // the latest focus distances. If the focus mode is FOCUS_MODE_CONTINUOUS, 423c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // focus distances may change from time to time. 4240529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // 4255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // This is intended to estimate the distance between the camera and the 4265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // subject. After autofocus, the subject distance may be within near and far 4275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // focus distance. However, the precision depends on the camera hardware, 428a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // autofocus algorithm, the focus area, and the scene. The error can be 429c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // large and it should be only used as a reference. 430c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // 4315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Far focus distance > optimal focus distance > near focus distance. If 432c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // the far focus distance is infinity, the value should be "Infinity" (case 4335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // sensitive). The format is three float values separated by commas. The 4345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // first is near focus distance. The second is optimal focus distance. The 435c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // third is far focus distance. 436c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // Example value: "0.95,1.9,Infinity" or "0.049,0.05,0.051". Read only. 4375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) static const char KEY_FOCUS_DISTANCES[]; 438a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 439a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // The current dimensions in pixels (width x height) for video frames. 4405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // The width and height must be one of the supported sizes retrieved 4415c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // via KEY_SUPPORTED_VIDEO_SIZES. 4425c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Example value: "1280x720". Read/write. 4435c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char KEY_VIDEO_SIZE[]; 4445c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // A list of the supported dimensions in pixels (width x height) 4455c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // for video frames. See CAMERA_MSG_VIDEO_FRAME for details in 4465c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // frameworks/base/include/camera/Camera.h. 4475c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Example: "176x144,1280x720". Read only. 4485c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char KEY_SUPPORTED_VIDEO_SIZES[]; 4495c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu 4505c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // The maximum number of detected faces supported by hardware face 4515c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // detection. If the value is 0, hardware face detection is not supported. 4525c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Example: "5". Read only 4535c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char KEY_MAX_NUM_DETECTED_FACES_HW[]; 4545c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu 455f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // The maximum number of detected faces supported by software face 456f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // detection. If the value is 0, software face detection is not supported. 457f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // Example: "5". Read only 4585c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char KEY_MAX_NUM_DETECTED_FACES_SW[]; 4590529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch 4600529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // Preferred preview frame size in pixels for video recording. 4610529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // The width and height must be one of the supported sizes retrieved 4620529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // via KEY_SUPPORTED_PREVIEW_SIZES. This key can be used only when 4630529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // getSupportedVideoSizes() does not return an empty Vector of Size. 4640529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // Camcorder applications are recommended to set the preview size 4650529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // to a value that is not larger than the preferred preview size. 4660529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // In other words, the product of the width and height of the 4670529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // preview size should not be larger than that of the preferred 4680529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // preview size. In addition, we recommend to choos a preview size 4690529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // that has the same aspect ratio as the resolution of video to be 4700529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // recorded. 4710529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // Example value: "800x600". Read only. 4720529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch static const char KEY_PREFERRED_PREVIEW_SIZE_FOR_VIDEO[]; 4730529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch 4740529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // The image format for video frames. See CAMERA_MSG_VIDEO_FRAME in 4750529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // frameworks/base/include/camera/Camera.h. 4760529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // Example value: "yuv420sp" or PIXEL_FORMAT_XXX constants. Read only. 4770529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch static const char KEY_VIDEO_FRAME_FORMAT[]; 4780529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch 4790529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // Sets the hint of the recording mode. If this is true, MediaRecorder.start 4800529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // may be faster or has less glitches. This should be called before starting 4810529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // the preview for the best result. But it is allowed to change the hint 4820529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // while the preview is active. The default value is false. 4830529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // 4840529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // The apps can still call Camera.takePicture when the hint is true. The 4850529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // apps can call MediaRecorder.start when the hint is false. But the 4860529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // performance may be worse. 4870529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // Example value: "true" or "false". Read/write. 4880529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch static const char KEY_RECORDING_HINT[]; 4890529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch 4900529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // Returns true if video snapshot is supported. That is, applications 4910529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // can call Camera.takePicture during recording. Applications do not need to 4920529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // call Camera.startPreview after taking a picture. The preview will be 4930529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // still active. Other than that, taking a picture during recording is 4945c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // identical to taking a picture normally. All settings and methods related 4955c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // to takePicture work identically. Ex: KEY_PICTURE_SIZE, 4965c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // KEY_SUPPORTED_PICTURE_SIZES, KEY_JPEG_QUALITY, KEY_ROTATION, and etc. 4975c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // The picture will have an EXIF header. FLASH_MODE_AUTO and FLASH_MODE_ON 4985c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // also still work, but the video will record the flash. 4995c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // 5005c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Applications can set shutter callback as null to avoid the shutter 5015c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // sound. It is also recommended to set raw picture and post view callbacks 502f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // to null to avoid the interrupt of preview display. 503f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // 504010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) // Field-of-view of the recorded video may be different from that of the 505010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) // captured pictures. 5060529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // Example value: "true" or "false". Read only. 5070529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch static const char KEY_VIDEO_SNAPSHOT_SUPPORTED[]; 5080529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch 5090529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // The state of the video stabilization. If set to true, both the 5100529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // preview stream and the recorded video stream are stabilized by 5115c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // the camera. Only valid to set if KEY_VIDEO_STABILIZATION_SUPPORTED is 5125c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // set to true. 5135c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // 5145c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // The value of this key can be changed any time the camera is 5155c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // open. If preview or recording is active, it is acceptable for 5165c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // there to be a slight video glitch when video stabilization is 5175c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // toggled on and off. 5185c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // 5195c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // This only stabilizes video streams (between-frames stabilization), and 5205c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // has no effect on still image capture. 5215c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char KEY_VIDEO_STABILIZATION[]; 522116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch 5235c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Returns true if video stabilization is supported. That is, applications 5245c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // can set KEY_VIDEO_STABILIZATION to true and have a stabilized preview 5255c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // stream and record stabilized videos. 5265c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char KEY_VIDEO_STABILIZATION_SUPPORTED[]; 5275c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu 5285c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Value for KEY_ZOOM_SUPPORTED or KEY_SMOOTH_ZOOM_SUPPORTED. 5295c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char TRUE[]; 5305c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char FALSE[]; 5315c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu 5325c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Value for KEY_FOCUS_DISTANCES. 5335c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char FOCUS_DISTANCE_INFINITY[]; 5345c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu 5355c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Values for white balance settings. 536116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch static const char WHITE_BALANCE_AUTO[]; 5375c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char WHITE_BALANCE_INCANDESCENT[]; 5385c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char WHITE_BALANCE_FLUORESCENT[]; 5395c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char WHITE_BALANCE_WARM_FLUORESCENT[]; 5405c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char WHITE_BALANCE_DAYLIGHT[]; 5415c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char WHITE_BALANCE_CLOUDY_DAYLIGHT[]; 5425c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char WHITE_BALANCE_TWILIGHT[]; 5435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) static const char WHITE_BALANCE_SHADE[]; 5440529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch 5450529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // Values for effect settings. 5460529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch static const char EFFECT_NONE[]; 5470529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch static const char EFFECT_MONO[]; 5480529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch static const char EFFECT_NEGATIVE[]; 5491320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci static const char EFFECT_SOLARIZE[]; 5501320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci static const char EFFECT_SEPIA[]; 5510529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch static const char EFFECT_POSTERIZE[]; 5520529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch static const char EFFECT_WHITEBOARD[]; 5530529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch static const char EFFECT_BLACKBOARD[]; 5540529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch static const char EFFECT_AQUA[]; 5550529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch 5560529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch // Values for antibanding settings. 5570529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch static const char ANTIBANDING_AUTO[]; 5580529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch static const char ANTIBANDING_50HZ[]; 5590529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch static const char ANTIBANDING_60HZ[]; 560f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) static const char ANTIBANDING_OFF[]; 561f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 5625c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Values for flash mode settings. 5635c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Flash will not be fired. 5645c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char FLASH_MODE_OFF[]; 5655f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) // Flash will be fired automatically when required. The flash may be fired 5665f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) // during preview, auto-focus, or snapshot depending on the driver. 5671320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci static const char FLASH_MODE_AUTO[]; 5681320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // Flash will always be fired during snapshot. The flash may also be 569116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // fired during preview or auto-focus depending on the driver. 5705c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char FLASH_MODE_ON[]; 5715c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Flash will be fired in red-eye reduction mode. 5725c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char FLASH_MODE_RED_EYE[]; 5735c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Constant emission of light during preview, auto-focus and snapshot. 5745c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // This can also be used for video recording. 5755f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) static const char FLASH_MODE_TORCH[]; 5765f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) 5775f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) // Values for scene mode settings. 5785f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) static const char SCENE_MODE_AUTO[]; 5795f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) static const char SCENE_MODE_ACTION[]; 5805c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char SCENE_MODE_PORTRAIT[]; 5815c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char SCENE_MODE_LANDSCAPE[]; 5825f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) static const char SCENE_MODE_NIGHT[]; 5835c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char SCENE_MODE_NIGHT_PORTRAIT[]; 5845c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char SCENE_MODE_THEATRE[]; 5855c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char SCENE_MODE_BEACH[]; 5865c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char SCENE_MODE_SNOW[]; 5875c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char SCENE_MODE_SUNSET[]; 5885c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char SCENE_MODE_STEADYPHOTO[]; 589116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch static const char SCENE_MODE_FIREWORKS[]; 5901320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci static const char SCENE_MODE_SPORTS[]; 5911320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci static const char SCENE_MODE_PARTY[]; 592116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch static const char SCENE_MODE_CANDLELIGHT[]; 5935c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Applications are looking for a barcode. Camera driver will be optimized 5945c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // for barcode reading. 5955c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char SCENE_MODE_BARCODE[]; 5965c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu 5975c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Pixel color formats for KEY_PREVIEW_FORMAT, KEY_PICTURE_FORMAT, 5985c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // and KEY_VIDEO_FRAME_FORMAT 5995c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char PIXEL_FORMAT_YUV422SP[]; 6005c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char PIXEL_FORMAT_YUV420SP[]; // NV21 6015c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char PIXEL_FORMAT_YUV422I[]; // YUY2 6025c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char PIXEL_FORMAT_YUV420P[]; // YV12 6035c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char PIXEL_FORMAT_RGB565[]; 6045c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char PIXEL_FORMAT_RGBA8888[]; 6055c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char PIXEL_FORMAT_JPEG[]; 6065c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Raw bayer format used for images, which is 10 bit precision samples 6075c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // stored in 16 bit words. The filter pattern is RGGB. 6085c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char PIXEL_FORMAT_BAYER_RGGB[]; 6095c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Pixel format is not known to the framework 6105c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char PIXEL_FORMAT_ANDROID_OPAQUE[]; 6111320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci 6121320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // Values for focus mode settings. 6131320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // Auto-focus mode. Applications should call 6145c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // CameraHardwareInterface.autoFocus to start the focus in this mode. 6155c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char FOCUS_MODE_AUTO[]; 6165c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Focus is set at infinity. Applications should not call 6175c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // CameraHardwareInterface.autoFocus in this mode. 6185c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char FOCUS_MODE_INFINITY[]; 6195c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Macro (close-up) focus mode. Applications should call 6205c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // CameraHardwareInterface.autoFocus to start the focus in this mode. 6215c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char FOCUS_MODE_MACRO[]; 6225c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Focus is fixed. The camera is always in this mode if the focus is not 6235c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // adjustable. If the camera has auto-focus, this mode can fix the 6245c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // focus, which is usually at hyperfocal distance. Applications should 6255c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // not call CameraHardwareInterface.autoFocus in this mode. 6265c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char FOCUS_MODE_FIXED[]; 6271320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // Extended depth of field (EDOF). Focusing is done digitally and 6281320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // continuously. Applications should not call 6291320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // CameraHardwareInterface.autoFocus in this mode. 6305c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu static const char FOCUS_MODE_EDOF[]; 6315c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Continuous auto focus mode intended for video recording. The camera 6325c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // continuously tries to focus. This is the best choice for video 6335c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // recording because the focus changes smoothly . Applications still can 6345c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // call CameraHardwareInterface.takePicture in this mode but the subject may 6355c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // not be in focus. Auto focus starts when the parameter is set. 6365c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // 6375c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Applications can call CameraHardwareInterface.autoFocus in this mode. The 6385c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // focus callback will immediately return with a boolean that indicates 6395c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // whether the focus is sharp or not. The focus position is locked after 6405c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // autoFocus call. If applications want to resume the continuous focus, 641f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // cancelAutoFocus must be called. Restarting the preview will not resume 642f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // the continuous autofocus. To stop continuous focus, applications should 6431320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // change the focus mode to other modes. 6441320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci static const char FOCUS_MODE_CONTINUOUS_VIDEO[]; 6451320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci // Continuous auto focus mode intended for taking pictures. The camera 646f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // continuously tries to focus. The speed of focus change is more aggressive 647f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // than FOCUS_MODE_CONTINUOUS_VIDEO. Auto focus starts when the parameter is 648f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // set. 649f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // 650f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // Applications can call CameraHardwareInterface.autoFocus in this mode. If 651f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // the autofocus is in the middle of scanning, the focus callback will 652f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // return when it completes. If the autofocus is not scanning, focus 653f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // callback will immediately return with a boolean that indicates whether 654f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // the focus is sharp or not. The apps can then decide if they want to take 655f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // a picture immediately or to change the focus mode to auto, and run a full 656f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // autofocus cycle. The focus position is locked after autoFocus call. If 657010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) // applications want to resume the continuous focus, cancelAutoFocus must be 658010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) // called. Restarting the preview will not resume the continuous autofocus. 659010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) // To stop continuous focus, applications should change the focus mode to 660010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) // other modes. 6611320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci static const char FOCUS_MODE_CONTINUOUS_PICTURE[]; 6621320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci 6631320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucciprivate: 664010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) DefaultKeyedVector<String8,String8> mMap; 665010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)}; 666010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) 667010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)}; // namespace android 668010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) 669010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)#endif 670010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)