19066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/*
29066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Copyright (C) 2008 The Android Open Source Project
39066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project *
49066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License");
59066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * you may not use this file except in compliance with the License.
69066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * You may obtain a copy of the License at
79066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project *
89066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project *      http://www.apache.org/licenses/LICENSE-2.0
99066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project *
109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Unless required by applicable law or agreed to in writing, software
119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * distributed under the License is distributed on an "AS IS" BASIS,
129066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * See the License for the specific language governing permissions and
149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * limitations under the License.
159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */
169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project#ifndef ANDROID_HARDWARE_CAMERA_PARAMETERS_H
189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project#define ANDROID_HARDWARE_CAMERA_PARAMETERS_H
199066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
209066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project#include <utils/KeyedVector.h>
219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project#include <utils/String8.h>
229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectnamespace android {
249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectclass CameraParameters
269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project{
279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectpublic:
289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    CameraParameters();
299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    CameraParameters(const String8 &params) { unflatten(params); }
309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    ~CameraParameters();
319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    String8 flatten() const;
339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void unflatten(const String8 &params);
349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void set(const char *key, const char *value);
369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void set(const char *key, int value);
377eae31cab43a36b6feccf523f212968619abe599Wu-cheng Li    void setFloat(const char *key, float value);
389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    const char *get(const char *key) const;
399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    int getInt(const char *key) const;
407eae31cab43a36b6feccf523f212968619abe599Wu-cheng Li    float getFloat(const char *key) const;
419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
4278624e41da166712aaa5ae47e4d3467337ac810aWu-cheng Li    void remove(const char *key);
4378624e41da166712aaa5ae47e4d3467337ac810aWu-cheng Li
449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void setPreviewSize(int width, int height);
459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void getPreviewSize(int *width, int *height) const;
469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void setPreviewFrameRate(int fps);
479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    int getPreviewFrameRate() const;
489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void setPreviewFormat(const char *format);
499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    const char *getPreviewFormat() const;
509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void setPictureSize(int width, int height);
519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void getPictureSize(int *width, int *height) const;
529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void setPictureFormat(const char *format);
539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    const char *getPictureFormat() const;
549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void dump() const;
569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    status_t dump(int fd, const Vector<String16>& args) const;
579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
588de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Parameter keys to communicate between camera application and driver.
598de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // The access (read/write, read only, or write only) is viewed from the
608de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // perspective of applications, not driver.
618de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li
628de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Preview frame size in pixels (width x height).
638de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "480x320". Read/Write.
648de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_PREVIEW_SIZE[];
658de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Supported preview frame sizes in pixels.
668de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "800x600,480x320". Read only.
678de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_SUPPORTED_PREVIEW_SIZES[];
688de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // The image format for preview frames.
698de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "yuv420sp" or PIXEL_FORMAT_XXX constants. Read/write.
708de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_PREVIEW_FORMAT[];
718de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Supported image formats for preview frames.
728de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "yuv420sp,yuv422i-yuyv". Read only.
738de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_SUPPORTED_PREVIEW_FORMATS[];
748de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Number of preview frames per second.
758de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "15". Read/write.
768de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_PREVIEW_FRAME_RATE[];
778de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Supported number of preview frames per second.
788de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "24,15,10". Read.
798de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_SUPPORTED_PREVIEW_FRAME_RATES[];
808de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // The dimensions for captured pictures in pixels (width x height).
818de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "1024x768". Read/write.
828de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_PICTURE_SIZE[];
838de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Supported dimensions for captured pictures in pixels.
848de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "2048x1536,1024x768". Read only.
858de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_SUPPORTED_PICTURE_SIZES[];
868de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // The image format for captured pictures.
878de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "jpeg" or PIXEL_FORMAT_XXX constants. Read/write.
888de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_PICTURE_FORMAT[];
898de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Supported image formats for captured pictures.
908de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "jpeg,rgb565". Read only.
918de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_SUPPORTED_PICTURE_FORMATS[];
928de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // The width (in pixels) of EXIF thumbnail in Jpeg picture.
938de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "512". Read/write.
948de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_JPEG_THUMBNAIL_WIDTH[];
958de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // The height (in pixels) of EXIF thumbnail in Jpeg picture.
968de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "384". Read/write.
978de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_JPEG_THUMBNAIL_HEIGHT[];
98acf77033bbd4682566bcd3c535f4f1e94d23f962Wu-cheng Li    // Supported EXIF thumbnail sizes (width x height). 0x0 means not thumbnail
99acf77033bbd4682566bcd3c535f4f1e94d23f962Wu-cheng Li    // in EXIF.
100acf77033bbd4682566bcd3c535f4f1e94d23f962Wu-cheng Li    // Example value: "512x384,320x240,0x0". Read only.
101acf77033bbd4682566bcd3c535f4f1e94d23f962Wu-cheng Li    static const char KEY_SUPPORTED_JPEG_THUMBNAIL_SIZES[];
1028de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // The quality of the EXIF thumbnail in Jpeg picture. The range is 1 to 100,
1038de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // with 100 being the best.
1048de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "90". Read/write.
1058de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_JPEG_THUMBNAIL_QUALITY[];
1068de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Jpeg quality of captured picture. The range is 1 to 100, with 100 being
1078de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // the best.
1088de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "90". Read/write.
1098de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_JPEG_QUALITY[];
1108de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // The orientation of the device in degrees. For example, suppose the
1118de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // natural position of the device is landscape. If the user takes a picture
1128de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // in landscape mode in 2048x1536 resolution, the rotation will be set to
1138de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // "0". If the user rotates the phone 90 degrees clockwise, the rotation
1148de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // should be set to "90".
1158de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // The camera driver can set orientation in the EXIF header without rotating
1168de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // the picture. Or the driver can rotate the picture and the EXIF thumbnail.
1178de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // If the Jpeg picture is rotated, the orientation in the EXIF header should
1188de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // be missing or 1 (row #0 is top and column #0 is left side). The driver
1198de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // should not set default value for this parameter.
1208de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "0" or "90" or "180" or "270". Write only.
1218de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_ROTATION[];
1228de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // GPS latitude coordinate. This will be stored in JPEG EXIF header.
1238de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "25.032146". Write only.
1248de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_GPS_LATITUDE[];
1258de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // GPS longitude coordinate. This will be stored in JPEG EXIF header.
1268de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "121.564448". Write only.
1278de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_GPS_LONGITUDE[];
1288de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // GPS altitude. This will be stored in JPEG EXIF header.
1298de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "21.0". Write only.
1308de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_GPS_ALTITUDE[];
1318de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // GPS timestamp (UTC in seconds since January 1, 1970). This should be
1328de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // stored in JPEG EXIF header.
1338de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "1251192757". Write only.
1348de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_GPS_TIMESTAMP[];
135055c986ab841f8f758398841730f1e90313b132aRay Chen    // GPS Processing Method
136055c986ab841f8f758398841730f1e90313b132aRay Chen    // Example value: "GPS" or "NETWORK". Write only.
137055c986ab841f8f758398841730f1e90313b132aRay Chen    static const char KEY_GPS_PROCESSING_METHOD[];
1388de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Current white balance setting.
1398de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "auto" or WHITE_BALANCE_XXX constants. Read/write.
1408de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_WHITE_BALANCE[];
1418de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Supported white balance settings.
1428de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "auto,incandescent,daylight". Read only.
1438de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_SUPPORTED_WHITE_BALANCE[];
1448de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Current color effect setting.
1458de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "none" or EFFECT_XXX constants. Read/write.
1468de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_EFFECT[];
1478de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Supported color effect settings.
1488de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "none,mono,sepia". Read only.
1498de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_SUPPORTED_EFFECTS[];
1508de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Current antibanding setting.
1518de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "auto" or ANTIBANDING_XXX constants. Read/write.
1528de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_ANTIBANDING[];
1538de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Supported antibanding settings.
1548de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "auto,50hz,60hz,off". Read only.
1558de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_SUPPORTED_ANTIBANDING[];
1568de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Current scene mode.
1578de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "auto" or SCENE_MODE_XXX constants. Read/write.
1588de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_SCENE_MODE[];
1598de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Supported scene mode settings.
1608de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "auto,night,fireworks". Read only.
1618de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_SUPPORTED_SCENE_MODES[];
1628de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Current flash mode.
1638de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "auto" or FLASH_MODE_XXX constants. Read/write.
1648de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_FLASH_MODE[];
1658de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Supported flash modes.
1668de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "auto,on,off". Read only.
1678de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_SUPPORTED_FLASH_MODES[];
1688de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Current focus mode. If the camera does not support auto-focus, the value
1698de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // should be FOCUS_MODE_FIXED. If the focus mode is not FOCUS_MODE_FIXED or
1708de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // or FOCUS_MODE_INFINITY, applications should call
1718de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // CameraHardwareInterface.autoFocus to start the focus.
1728de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "auto" or FOCUS_MODE_XXX constants. Read/write.
1738de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_FOCUS_MODE[];
1748de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Supported focus modes.
1758de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Example value: "auto,macro,fixed". Read only.
1768de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char KEY_SUPPORTED_FOCUS_MODES[];
1776c8d2760736a0753dad96b4bb8f98c7d075e6d54Wu-cheng Li    // Focal length in millimeter.
1786c8d2760736a0753dad96b4bb8f98c7d075e6d54Wu-cheng Li    // Example value: "4.31". Read only.
1796c8d2760736a0753dad96b4bb8f98c7d075e6d54Wu-cheng Li    static const char KEY_FOCAL_LENGTH[];
1806c8d2760736a0753dad96b4bb8f98c7d075e6d54Wu-cheng Li    // Horizontal angle of view in degrees.
1816c8d2760736a0753dad96b4bb8f98c7d075e6d54Wu-cheng Li    // Example value: "54.8". Read only.
1826c8d2760736a0753dad96b4bb8f98c7d075e6d54Wu-cheng Li    static const char KEY_HORIZONTAL_VIEW_ANGLE[];
1836c8d2760736a0753dad96b4bb8f98c7d075e6d54Wu-cheng Li    // Vertical angle of view in degrees.
1846c8d2760736a0753dad96b4bb8f98c7d075e6d54Wu-cheng Li    // Example value: "42.5". Read only.
1856c8d2760736a0753dad96b4bb8f98c7d075e6d54Wu-cheng Li    static const char KEY_VERTICAL_VIEW_ANGLE[];
18624b326a8978bf78e3e560723dde221792784325bWu-cheng Li    // Exposure compensation index. 0 means exposure is not adjusted.
18724b326a8978bf78e3e560723dde221792784325bWu-cheng Li    // Example value: "0" or "5". Read/write.
188ff723b6c43d5a8fd0ae0e0732f5d47012d74e01dWu-cheng Li    static const char KEY_EXPOSURE_COMPENSATION[];
18924b326a8978bf78e3e560723dde221792784325bWu-cheng Li    // The maximum exposure compensation index (>=0).
19024b326a8978bf78e3e560723dde221792784325bWu-cheng Li    // Example value: "6". Read only.
19124b326a8978bf78e3e560723dde221792784325bWu-cheng Li    static const char KEY_MAX_EXPOSURE_COMPENSATION[];
19224b326a8978bf78e3e560723dde221792784325bWu-cheng Li    // The minimum exposure compensation index (<=0).
19324b326a8978bf78e3e560723dde221792784325bWu-cheng Li    // Example value: "-6". Read only.
19424b326a8978bf78e3e560723dde221792784325bWu-cheng Li    static const char KEY_MIN_EXPOSURE_COMPENSATION[];
19524b326a8978bf78e3e560723dde221792784325bWu-cheng Li    // The exposure compensation step. Exposure compensation index multiply by
19624b326a8978bf78e3e560723dde221792784325bWu-cheng Li    // step eqals to EV. Ex: if exposure compensation index is 6 and step is
19724b326a8978bf78e3e560723dde221792784325bWu-cheng Li    // 0.3333, EV is -2.
19824b326a8978bf78e3e560723dde221792784325bWu-cheng Li    // Example value: "0.333333333" or "0.5". Read only.
19924b326a8978bf78e3e560723dde221792784325bWu-cheng Li    static const char KEY_EXPOSURE_COMPENSATION_STEP[];
2008cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // Current zoom value.
2018cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // Example value: "0" or "6". Read/write.
2028cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    static const char KEY_ZOOM[];
2038cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // Maximum zoom value.
2048cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // Example value: "6". Read only.
2058cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    static const char KEY_MAX_ZOOM[];
2068cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // The zoom ratios of all zoom values. The zoom ratio is in 1/100
2078cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // increments. Ex: a zoom of 3.2x is returned as 320. The number of list
2088cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // elements is KEY_MAX_ZOOM + 1. The first element is always 100. The last
2098cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // element is the zoom ratio of zoom value KEY_MAX_ZOOM.
2108cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // Example value: "100,150,200,250,300,350,400". Read only.
2118cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    static const char KEY_ZOOM_RATIOS[];
2128cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // Whether zoom is supported. Zoom is supported if the value is "true". Zoom
2138cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // is not supported if the value is not "true" or the key does not exist.
2148cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // Example value: "true". Read only.
2158cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    static const char KEY_ZOOM_SUPPORTED[];
2168cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // Whether if smooth zoom is supported. Smooth zoom is supported if the
2178cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // value is "true". It is not supported if the value is not "true" or the
2188cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // key does not exist.
2198cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // See CAMERA_CMD_START_SMOOTH_ZOOM, CAMERA_CMD_STOP_SMOOTH_ZOOM, and
2208cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // CAMERA_MSG_ZOOM in frameworks/base/include/camera/Camera.h.
2218cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    // Example value: "true". Read only.
2228cbb8f5e1f939b03515cb4d5942c3fcb226efb9eWu-cheng Li    static const char KEY_SMOOTH_ZOOM_SUPPORTED[];
22324b326a8978bf78e3e560723dde221792784325bWu-cheng Li
224d9ef5d7f13be0e5e0f9cf0ea768742fd91636c8dWu-cheng Li    // Value for KEY_ZOOM_SUPPORTED or KEY_SMOOTH_ZOOM_SUPPORTED.
225d9ef5d7f13be0e5e0f9cf0ea768742fd91636c8dWu-cheng Li    static const char TRUE[];
226d9ef5d7f13be0e5e0f9cf0ea768742fd91636c8dWu-cheng Li
22724b326a8978bf78e3e560723dde221792784325bWu-cheng Li    // Values for white balance settings.
2288de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char WHITE_BALANCE_AUTO[];
2298de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char WHITE_BALANCE_INCANDESCENT[];
2308de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char WHITE_BALANCE_FLUORESCENT[];
2318de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char WHITE_BALANCE_WARM_FLUORESCENT[];
2328de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char WHITE_BALANCE_DAYLIGHT[];
2338de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char WHITE_BALANCE_CLOUDY_DAYLIGHT[];
2348de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char WHITE_BALANCE_TWILIGHT[];
2358de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char WHITE_BALANCE_SHADE[];
2368de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li
2378de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Values for effect settings.
2388de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char EFFECT_NONE[];
2398de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char EFFECT_MONO[];
2408de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char EFFECT_NEGATIVE[];
2418de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char EFFECT_SOLARIZE[];
2428de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char EFFECT_SEPIA[];
2438de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char EFFECT_POSTERIZE[];
2448de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char EFFECT_WHITEBOARD[];
2458de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char EFFECT_BLACKBOARD[];
2468de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char EFFECT_AQUA[];
2478de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li
2488de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Values for antibanding settings.
2498de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char ANTIBANDING_AUTO[];
2508de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char ANTIBANDING_50HZ[];
2518de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char ANTIBANDING_60HZ[];
2528de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char ANTIBANDING_OFF[];
2538de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li
2548de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Values for flash mode settings.
2558de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Flash will not be fired.
2568de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char FLASH_MODE_OFF[];
257fe1a86df8b1c23e3290f96dce69984bf979a462bWu-cheng Li    // Flash will be fired automatically when required. The flash may be fired
258fe1a86df8b1c23e3290f96dce69984bf979a462bWu-cheng Li    // during preview, auto-focus, or snapshot depending on the driver.
2598de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char FLASH_MODE_AUTO[];
260fe1a86df8b1c23e3290f96dce69984bf979a462bWu-cheng Li    // Flash will always be fired during snapshot. The flash may also be
261fe1a86df8b1c23e3290f96dce69984bf979a462bWu-cheng Li    // fired during preview or auto-focus depending on the driver.
2628de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char FLASH_MODE_ON[];
2638de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Flash will be fired in red-eye reduction mode.
2648de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char FLASH_MODE_RED_EYE[];
265fe1a86df8b1c23e3290f96dce69984bf979a462bWu-cheng Li    // Constant emission of light during preview, auto-focus and snapshot.
266fe1a86df8b1c23e3290f96dce69984bf979a462bWu-cheng Li    // This can also be used for video recording.
267fe1a86df8b1c23e3290f96dce69984bf979a462bWu-cheng Li    static const char FLASH_MODE_TORCH[];
2688de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li
2698de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Values for scene mode settings.
2708de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char SCENE_MODE_AUTO[];
2718de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char SCENE_MODE_ACTION[];
2728de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char SCENE_MODE_PORTRAIT[];
2738de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char SCENE_MODE_LANDSCAPE[];
2748de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char SCENE_MODE_NIGHT[];
2758de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char SCENE_MODE_NIGHT_PORTRAIT[];
2768de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char SCENE_MODE_THEATRE[];
2778de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char SCENE_MODE_BEACH[];
2788de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char SCENE_MODE_SNOW[];
2798de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char SCENE_MODE_SUNSET[];
2808de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char SCENE_MODE_STEADYPHOTO[];
2818de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char SCENE_MODE_FIREWORKS[];
2828de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char SCENE_MODE_SPORTS[];
2838de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char SCENE_MODE_PARTY[];
2848de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char SCENE_MODE_CANDLELIGHT[];
285c58b42327df5fbc826e2fcc2674ab6db0edfcd92Wu-cheng Li    // Applications are looking for a barcode. Camera driver will be optimized
286c58b42327df5fbc826e2fcc2674ab6db0edfcd92Wu-cheng Li    // for barcode reading.
287c58b42327df5fbc826e2fcc2674ab6db0edfcd92Wu-cheng Li    static const char SCENE_MODE_BARCODE[];
2888de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li
2898de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Formats for setPreviewFormat and setPictureFormat.
2908de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char PIXEL_FORMAT_YUV422SP[];
2918de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char PIXEL_FORMAT_YUV420SP[]; // NV21
2928de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char PIXEL_FORMAT_YUV422I[]; // YUY2
2938de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char PIXEL_FORMAT_RGB565[];
2948de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char PIXEL_FORMAT_JPEG[];
2958de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li
2968de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Values for focus mode settings.
2978de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Auto-focus mode.
2988de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char FOCUS_MODE_AUTO[];
2998de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Focus is set at infinity. Applications should not call
3008de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // CameraHardwareInterface.autoFocus in this mode.
3018de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char FOCUS_MODE_INFINITY[];
3028de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char FOCUS_MODE_MACRO[];
3038de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // Focus is fixed. The camera is always in this mode if the focus is not
3048de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // adjustable. If the camera has auto-focus, this mode can fix the
3058de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // focus, which is usually at hyperfocal distance. Applications should
3068de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    // not call CameraHardwareInterface.autoFocus in this mode.
3078de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li    static const char FOCUS_MODE_FIXED[];
308c58b42327df5fbc826e2fcc2674ab6db0edfcd92Wu-cheng Li    // Extended depth of field (EDOF). Focusing is done digitally and
309c58b42327df5fbc826e2fcc2674ab6db0edfcd92Wu-cheng Li    // continuously. Applications should not call
310c58b42327df5fbc826e2fcc2674ab6db0edfcd92Wu-cheng Li    // CameraHardwareInterface.autoFocus in this mode.
311c58b42327df5fbc826e2fcc2674ab6db0edfcd92Wu-cheng Li    static const char FOCUS_MODE_EDOF[];
3128de57d8fa346522404c2064a78e8f24a5aa3bf23Wu-cheng Li
3139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectprivate:
3149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    DefaultKeyedVector<String8,String8>    mMap;
3159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project};
3169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
3179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project}; // namespace android
3189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
3199066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project#endif
320