CameraParameters.h revision 2e63d52ea03e0a9d098759cf4689691809f44ceb
14f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com/*
2bdfb3914f3cacddc5db37aa14816b12dc9421c4edaniel@transgaming.com * Copyright (C) 2008 The Android Open Source Project
34f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com *
44f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com * Licensed under the Apache License, Version 2.0 (the "License");
54f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com * you may not use this file except in compliance with the License.
64f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com * You may obtain a copy of the License at
74f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com *
84f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com *      http://www.apache.org/licenses/LICENSE-2.0
94f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com *
104f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com * Unless required by applicable law or agreed to in writing, software
11bbf56f755e0dd78c7650c52531ce412fcaaafa2bdaniel@transgaming.com * distributed under the License is distributed on an "AS IS" BASIS,
120fa74639c53999632348d9a7aca7fa1b05339477enne@chromium.org * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13f6fb959eeacff28579f996e122962ceda8b2845cshannonwoods@chromium.org * See the License for the specific language governing permissions and
14e261b44af7631c31ddca8601490e7445af5a3341Jamie Madill * limitations under the License.
150b7eef7c469bf717f7e1b57c6273f00d88e8b1d9Geoff Lang */
160b7eef7c469bf717f7e1b57c6273f00d88e8b1d9Geoff Lang
170b7eef7c469bf717f7e1b57c6273f00d88e8b1d9Geoff Lang#ifndef ANDROID_HARDWARE_CAMERA_PARAMETERS_H
180b7eef7c469bf717f7e1b57c6273f00d88e8b1d9Geoff Lang#define ANDROID_HARDWARE_CAMERA_PARAMETERS_H
194f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com
204f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com#include <utils/KeyedVector.h>
214f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com#include <utils/String8.h>
22fbc3952478be8b297e57097a70afbf42a0caff06daniel@transgaming.com
23092bd4814d98a283ff3e6eab6896908d7c947ddcdaniel@transgaming.comnamespace android {
24e4a492be45f39dffaea53c3523064844ee56e41bGeoff Lang
256c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madillstruct Size {
266c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    int width;
276c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    int height;
286c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill
296c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    Size() {
306c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill        width = 0;
3175c42f45e51cbabecf21a5f0065ebec18f7306b6Cooper Partin        height = 0;
3275c42f45e51cbabecf21a5f0065ebec18f7306b6Cooper Partin    }
3375c42f45e51cbabecf21a5f0065ebec18f7306b6Cooper Partin
3475c42f45e51cbabecf21a5f0065ebec18f7306b6Cooper Partin    Size(int w, int h) {
3575c42f45e51cbabecf21a5f0065ebec18f7306b6Cooper Partin        width = w;
366c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill        height = h;
376c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    }
386c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill};
396c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill
406c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madillclass CameraParameters
416c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill{
426c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madillpublic:
436c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    CameraParameters();
446c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    CameraParameters(const String8 &params) { unflatten(params); }
456c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    ~CameraParameters();
466c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill
476c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    String8 flatten() const;
486c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void unflatten(const String8 &params);
496c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill
506c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void set(const char *key, const char *value);
516c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void set(const char *key, int value);
526c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void setFloat(const char *key, float value);
536c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    const char *get(const char *key) const;
546c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    int getInt(const char *key) const;
556c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    float getFloat(const char *key) const;
566c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill
576c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void remove(const char *key);
586c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill
596c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void setPreviewSize(int width, int height);
606c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void getPreviewSize(int *width, int *height) const;
616c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void getSupportedPreviewSizes(Vector<Size> &sizes) const;
626c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill
636c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // Set the dimensions in pixels to the given width and height
646c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // for video frames. The given width and height must be one
656c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // of the supported dimensions returned from
666c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // getSupportedVideoSizes(). Must not be called if
676c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // getSupportedVideoSizes() returns an empty Vector of Size.
686c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void setVideoSize(int width, int height);
696c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // Retrieve the current dimensions (width and height)
706c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // in pixels for video frames, which must be one of the
716c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // supported dimensions returned from getSupportedVideoSizes().
726c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // Must not be called if getSupportedVideoSizes() returns an
736c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // empty Vector of Size.
746c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void getVideoSize(int *width, int *height) const;
756c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // Retrieve a Vector of supported dimensions (width and height)
766c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // in pixels for video frames. If sizes returned from the method
776c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // is empty, the camera does not support calls to setVideoSize()
786c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // or getVideoSize(). In adddition, it also indicates that
796c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // the camera only has a single output, and does not have
806c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // separate output for video frames and preview frame.
816c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void getSupportedVideoSizes(Vector<Size> &sizes) const;
825d601382b51c29d1670b58c01360416bd929842dGeoff Lang    // Retrieve the preferred preview size (width and height) in pixels
836c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // for video recording. The given width and height must be one of
846c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // supported preview sizes returned from getSupportedPreviewSizes().
856c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // Must not be called if getSupportedVideoSizes() returns an empty
866c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // Vector of Size. If getSupportedVideoSizes() returns an empty
875d601382b51c29d1670b58c01360416bd929842dGeoff Lang    // Vector of Size, the width and height returned from this method
886c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // is invalid, and is "-1x-1".
896c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void getPreferredPreviewSizeForVideo(int *width, int *height) const;
906c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill
916c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void setPreviewFrameRate(int fps);
925d601382b51c29d1670b58c01360416bd929842dGeoff Lang    int getPreviewFrameRate() const;
936c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void getPreviewFpsRange(int *min_fps, int *max_fps) const;
946c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void setPreviewFormat(const char *format);
956c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    const char *getPreviewFormat() const;
966c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void setPictureSize(int width, int height);
975d601382b51c29d1670b58c01360416bd929842dGeoff Lang    void getPictureSize(int *width, int *height) const;
986c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void getSupportedPictureSizes(Vector<Size> &sizes) const;
996c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    void setPictureFormat(const char *format);
1006c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    const char *getPictureFormat() const;
1016c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill
1025d601382b51c29d1670b58c01360416bd929842dGeoff Lang    void dump() const;
1036c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    status_t dump(int fd, const Vector<String16>& args) const;
1046c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill
1056c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // Parameter keys to communicate between camera application and driver.
1066c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // The access (read/write, read only, or write only) is viewed from the
1075d601382b51c29d1670b58c01360416bd929842dGeoff Lang    // perspective of applications, not driver.
1086c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill
1096c7b4ada6bcb8ec0d929ff929b33f07c653d8e82Jamie Madill    // Preview frame size in pixels (width x height).
1108040f57dd7011872581cc769ff4df2b7ad6ca069Geoff Lang    // Example value: "480x320". Read/Write.
1119ecb9f9d504e71672a610183c34ae33ab276aef4daniel@transgaming.com    static const char KEY_PREVIEW_SIZE[];
11273a5db67b0720f769a219afb5b8ca64ae74e7758daniel@transgaming.com    // Supported preview frame sizes in pixels.
11373a5db67b0720f769a219afb5b8ca64ae74e7758daniel@transgaming.com    // Example value: "800x600,480x320". Read only.
114d2fd4f2afe46822fed817c1ac850afe9daadf21cdaniel@transgaming.com    static const char KEY_SUPPORTED_PREVIEW_SIZES[];
11520d36667199abc703cddff58ebdfd5eef726a51cdaniel@transgaming.com    // The current minimum and maximum preview fps. This controls the rate of
11673a5db67b0720f769a219afb5b8ca64ae74e7758daniel@transgaming.com    // preview frames received (CAMERA_MSG_PREVIEW_FRAME). The minimum and
1179ecb9f9d504e71672a610183c34ae33ab276aef4daniel@transgaming.com    // maximum fps must be one of the elements from
1189ecb9f9d504e71672a610183c34ae33ab276aef4daniel@transgaming.com    // KEY_SUPPORTED_PREVIEW_FPS_RANGE parameter.
1199ecb9f9d504e71672a610183c34ae33ab276aef4daniel@transgaming.com    // Example value: "10500,26623"
1209ecb9f9d504e71672a610183c34ae33ab276aef4daniel@transgaming.com    static const char KEY_PREVIEW_FPS_RANGE[];
1219ecb9f9d504e71672a610183c34ae33ab276aef4daniel@transgaming.com    // The supported preview fps (frame-per-second) ranges. Each range contains
1229ecb9f9d504e71672a610183c34ae33ab276aef4daniel@transgaming.com    // a minimum fps and maximum fps. If minimum fps equals to maximum fps, the
123d186dc7febccce89bda20a00f511977deff0f434daniel@transgaming.com    // camera outputs frames in fixed frame rate. If not, the camera outputs
1244f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // frames in auto frame rate. The actual frame rate fluctuates between the
1254f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // minimum and the maximum. The list has at least one element. The list is
1264f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // sorted from small to large (first by maximum fps and then minimum fps).
1274f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Example value: "(10500,26623),(15000,26623),(30000,30000)"
128d2fd4f2afe46822fed817c1ac850afe9daadf21cdaniel@transgaming.com    static const char KEY_SUPPORTED_PREVIEW_FPS_RANGE[];
1294f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // The image format for preview frames. See CAMERA_MSG_PREVIEW_FRAME in
1304f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // frameworks/av/include/camera/Camera.h. The default is
1314f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // PIXEL_FORMAT_YUV420SP. Example value: "yuv420sp" or PIXEL_FORMAT_XXX
1324f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // constants. Read/write.
133d2fd4f2afe46822fed817c1ac850afe9daadf21cdaniel@transgaming.com    static const char KEY_PREVIEW_FORMAT[];
1344f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Supported image formats for preview frames.
1354f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Example value: "yuv420sp,yuv422i-yuyv". Read only.
1364f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    static const char KEY_SUPPORTED_PREVIEW_FORMATS[];
1374f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Number of preview frames per second. This is the target frame rate. The
138d2fd4f2afe46822fed817c1ac850afe9daadf21cdaniel@transgaming.com    // actual frame rate depends on the driver.
139866f318d05e836e8d7e957059ab1a608e08aa856daniel@transgaming.com    // Example value: "15". Read/write.
140d2fd4f2afe46822fed817c1ac850afe9daadf21cdaniel@transgaming.com    static const char KEY_PREVIEW_FRAME_RATE[];
141866f318d05e836e8d7e957059ab1a608e08aa856daniel@transgaming.com    // Supported number of preview frames per second.
142866f318d05e836e8d7e957059ab1a608e08aa856daniel@transgaming.com    // Example value: "24,15,10". Read.
14320d36667199abc703cddff58ebdfd5eef726a51cdaniel@transgaming.com    static const char KEY_SUPPORTED_PREVIEW_FRAME_RATES[];
144fbc3952478be8b297e57097a70afbf42a0caff06daniel@transgaming.com    // The dimensions for captured pictures in pixels (width x height).
14520d36667199abc703cddff58ebdfd5eef726a51cdaniel@transgaming.com    // Example value: "1024x768". Read/write.
146fbc3952478be8b297e57097a70afbf42a0caff06daniel@transgaming.com    static const char KEY_PICTURE_SIZE[];
147fbc3952478be8b297e57097a70afbf42a0caff06daniel@transgaming.com    // Supported dimensions for captured pictures in pixels.
1481f135d86ab03ef260de7d653625f916644ddd747daniel@transgaming.com    // Example value: "2048x1536,1024x768". Read only.
1491f135d86ab03ef260de7d653625f916644ddd747daniel@transgaming.com    static const char KEY_SUPPORTED_PICTURE_SIZES[];
1501f135d86ab03ef260de7d653625f916644ddd747daniel@transgaming.com    // The image format for captured pictures. See CAMERA_MSG_COMPRESSED_IMAGE
1511f135d86ab03ef260de7d653625f916644ddd747daniel@transgaming.com    // in frameworks/base/include/camera/Camera.h.
1521f135d86ab03ef260de7d653625f916644ddd747daniel@transgaming.com    // Example value: "jpeg" or PIXEL_FORMAT_XXX constants. Read/write.
153fbc3952478be8b297e57097a70afbf42a0caff06daniel@transgaming.com    static const char KEY_PICTURE_FORMAT[];
154d2fd4f2afe46822fed817c1ac850afe9daadf21cdaniel@transgaming.com    // Supported image formats for captured pictures.
155fbc3952478be8b297e57097a70afbf42a0caff06daniel@transgaming.com    // Example value: "jpeg,rgb565". Read only.
156fbc3952478be8b297e57097a70afbf42a0caff06daniel@transgaming.com    static const char KEY_SUPPORTED_PICTURE_FORMATS[];
157fbc3952478be8b297e57097a70afbf42a0caff06daniel@transgaming.com    // The width (in pixels) of EXIF thumbnail in Jpeg picture.
158c483326b7164e1c96a714db86167647c41e8f65bJamie Madill    // Example value: "512". Read/write.
159fbc3952478be8b297e57097a70afbf42a0caff06daniel@transgaming.com    static const char KEY_JPEG_THUMBNAIL_WIDTH[];
160fbc3952478be8b297e57097a70afbf42a0caff06daniel@transgaming.com    // The height (in pixels) of EXIF thumbnail in Jpeg picture.
1618040f57dd7011872581cc769ff4df2b7ad6ca069Geoff Lang    // Example value: "384". Read/write.
162fbc3952478be8b297e57097a70afbf42a0caff06daniel@transgaming.com    static const char KEY_JPEG_THUMBNAIL_HEIGHT[];
163d2fd4f2afe46822fed817c1ac850afe9daadf21cdaniel@transgaming.com    // Supported EXIF thumbnail sizes (width x height). 0x0 means not thumbnail
164d2fd4f2afe46822fed817c1ac850afe9daadf21cdaniel@transgaming.com    // in EXIF.
165784371d02a86e44b51ec4944b0077ba771cfce43Geoff Lang    // Example value: "512x384,320x240,0x0". Read only.
166784371d02a86e44b51ec4944b0077ba771cfce43Geoff Lang    static const char KEY_SUPPORTED_JPEG_THUMBNAIL_SIZES[];
167784371d02a86e44b51ec4944b0077ba771cfce43Geoff Lang    // The quality of the EXIF thumbnail in Jpeg picture. The range is 1 to 100,
168784371d02a86e44b51ec4944b0077ba771cfce43Geoff Lang    // with 100 being the best.
169784371d02a86e44b51ec4944b0077ba771cfce43Geoff Lang    // Example value: "90". Read/write.
170784371d02a86e44b51ec4944b0077ba771cfce43Geoff Lang    static const char KEY_JPEG_THUMBNAIL_QUALITY[];
171784371d02a86e44b51ec4944b0077ba771cfce43Geoff Lang    // Jpeg quality of captured picture. The range is 1 to 100, with 100 being
172784371d02a86e44b51ec4944b0077ba771cfce43Geoff Lang    // the best.
173784371d02a86e44b51ec4944b0077ba771cfce43Geoff Lang    // Example value: "90". Read/write.
174784371d02a86e44b51ec4944b0077ba771cfce43Geoff Lang    static const char KEY_JPEG_QUALITY[];
17570062c98f7c62744f398dc0ba7a87c76e723cc48daniel@transgaming.com    // The rotation angle in degrees relative to the orientation of the camera.
1764f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // This affects the pictures returned from CAMERA_MSG_COMPRESSED_IMAGE. The
177f2423659230818b46346496f5212fc3d1f0b537fdaniel@transgaming.com    // camera driver may set orientation in the EXIF header without rotating the
178f2423659230818b46346496f5212fc3d1f0b537fdaniel@transgaming.com    // picture. Or the driver may rotate the picture and the EXIF thumbnail. If
17996c3893c5ef44b2af859dedcd4323d5269fd788adaniel@transgaming.com    // the Jpeg picture is rotated, the orientation in the EXIF header will be
1804f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // missing or 1 (row #0 is top and column #0 is left side).
181042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    //
182042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    // Note that the JPEG pictures of front-facing cameras are not mirrored
183042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    // as in preview display.
184042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    //
185042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    // For example, suppose the natural orientation of the device is portrait.
186ca7c008a891aef5fd0a7f279c4061f553651075fdaniel@transgaming.com    // The device is rotated 270 degrees clockwise, so the device orientation is
1874f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // 270. Suppose a back-facing camera sensor is mounted in landscape and the
1884f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // top side of the camera sensor is aligned with the right edge of the
18970062c98f7c62744f398dc0ba7a87c76e723cc48daniel@transgaming.com    // display in natural orientation. So the camera orientation is 90. The
19070d312a701f0011695c84d0705a4072ae1f5fb7edaniel@transgaming.com    // rotation should be set to 0 (270 + 90).
191a2d97f13f648c978e942ce55df7a940d9944ef2eGeoff Lang    //
1921f135d86ab03ef260de7d653625f916644ddd747daniel@transgaming.com    // Example value: "0" or "90" or "180" or "270". Write only.
193042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    static const char KEY_ROTATION[];
1941f135d86ab03ef260de7d653625f916644ddd747daniel@transgaming.com    // GPS latitude coordinate. GPSLatitude and GPSLatitudeRef will be stored in
195042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    // JPEG EXIF header.
196042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    // Example value: "25.032146" or "-33.462809". Write only.
197042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    static const char KEY_GPS_LATITUDE[];
198042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    // GPS longitude coordinate. GPSLongitude and GPSLongitudeRef will be stored
199042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    // in JPEG EXIF header.
2001f135d86ab03ef260de7d653625f916644ddd747daniel@transgaming.com    // Example value: "121.564448" or "-70.660286". Write only.
20170d312a701f0011695c84d0705a4072ae1f5fb7edaniel@transgaming.com    static const char KEY_GPS_LONGITUDE[];
20270d312a701f0011695c84d0705a4072ae1f5fb7edaniel@transgaming.com    // GPS altitude. GPSAltitude and GPSAltitudeRef will be stored in JPEG EXIF
2034f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // header.
2044f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Example value: "21.0" or "-5". Write only.
2054f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    static const char KEY_GPS_ALTITUDE[];
2064f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // GPS timestamp (UTC in seconds since January 1, 1970). This should be
207042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    // stored in JPEG EXIF header.
2084f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Example value: "1251192757". Write only.
2094f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    static const char KEY_GPS_TIMESTAMP[];
2104f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // GPS Processing Method
211d186dc7febccce89bda20a00f511977deff0f434daniel@transgaming.com    // Example value: "GPS" or "NETWORK". Write only.
2124f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    static const char KEY_GPS_PROCESSING_METHOD[];
2138040f57dd7011872581cc769ff4df2b7ad6ca069Geoff Lang    // Current white balance setting.
2144f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Example value: "auto" or WHITE_BALANCE_XXX constants. Read/write.
2154f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    static const char KEY_WHITE_BALANCE[];
21670062c98f7c62744f398dc0ba7a87c76e723cc48daniel@transgaming.com    // Supported white balance settings.
2174f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Example value: "auto,incandescent,daylight". Read only.
218f2423659230818b46346496f5212fc3d1f0b537fdaniel@transgaming.com    static const char KEY_SUPPORTED_WHITE_BALANCE[];
219024786d7ca409dbbe1877b7c60f99f50e1647e5ddaniel@transgaming.com    // Current color effect setting.
2204f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Example value: "none" or EFFECT_XXX constants. Read/write.
221042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    static const char KEY_EFFECT[];
222042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    // Supported color effect settings.
223042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    // Example value: "none,mono,sepia". Read only.
224042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    static const char KEY_SUPPORTED_EFFECTS[];
225042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    // Current antibanding setting.
226ca7c008a891aef5fd0a7f279c4061f553651075fdaniel@transgaming.com    // Example value: "auto" or ANTIBANDING_XXX constants. Read/write.
2274f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    static const char KEY_ANTIBANDING[];
2284f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Supported antibanding settings.
22970062c98f7c62744f398dc0ba7a87c76e723cc48daniel@transgaming.com    // Example value: "auto,50hz,60hz,off". Read only.
2304f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    static const char KEY_SUPPORTED_ANTIBANDING[];
2314f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Current scene mode.
232a2d97f13f648c978e942ce55df7a940d9944ef2eGeoff Lang    // Example value: "auto" or SCENE_MODE_XXX constants. Read/write.
2331f135d86ab03ef260de7d653625f916644ddd747daniel@transgaming.com    static const char KEY_SCENE_MODE[];
234042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    // Supported scene mode settings.
235042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    // Example value: "auto,night,fireworks". Read only.
236831fe2af72a47eb7b2806af522e32245f70eb435apatrick@chromium.org    static const char KEY_SUPPORTED_SCENE_MODES[];
237042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    // Current flash mode.
238042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    // Example value: "auto" or FLASH_MODE_XXX constants. Read/write.
2394f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    static const char KEY_FLASH_MODE[];
2404f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Supported flash modes.
241cdacc8e27117f22035bb56150899e1e52bb542d6daniel@transgaming.com    // Example value: "auto,on,off". Read only.
2424f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    static const char KEY_SUPPORTED_FLASH_MODES[];
2434f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Current focus mode. This will not be empty. Applications should call
2444f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // CameraHardwareInterface.autoFocus to start the focus if focus mode is
245042d1b4c8b5dc1bff96dc81b99f2844af21b62a7daniel@transgaming.com    // FOCUS_MODE_AUTO or FOCUS_MODE_MACRO.
2464f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Example value: "auto" or FOCUS_MODE_XXX constants. Read/write.
2474f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    static const char KEY_FOCUS_MODE[];
2484f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Supported focus modes.
249685dd27a259cfa0127b20a32f223d00a7c020ef1Jamie Madill    // Example value: "auto,macro,fixed". Read only.
2504f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    static const char KEY_SUPPORTED_FOCUS_MODES[];
2518040f57dd7011872581cc769ff4df2b7ad6ca069Geoff Lang    // The maximum number of focus areas supported. This is the maximum length
2524f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // of KEY_FOCUS_AREAS.
2534f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Example value: "0" or "2". Read only.
25470062c98f7c62744f398dc0ba7a87c76e723cc48daniel@transgaming.com    static const char KEY_MAX_NUM_FOCUS_AREAS[];
2554a9d65cba6c877c9006bc70e21e57f705d993b72daniel@transgaming.com    // Current focus areas.
256d14558a2178bea5615e09534d11c0d99c329e603daniel@transgaming.com    //
2574a9d65cba6c877c9006bc70e21e57f705d993b72daniel@transgaming.com    // Before accessing this parameter, apps should check
258d2fd4f2afe46822fed817c1ac850afe9daadf21cdaniel@transgaming.com    // KEY_MAX_NUM_FOCUS_AREAS first to know the maximum number of focus areas
259d2fd4f2afe46822fed817c1ac850afe9daadf21cdaniel@transgaming.com    // first. If the value is 0, focus area is not supported.
260d2fd4f2afe46822fed817c1ac850afe9daadf21cdaniel@transgaming.com    //
2614a9d65cba6c877c9006bc70e21e57f705d993b72daniel@transgaming.com    // Each focus area is a five-element int array. The first four elements are
262cdacc8e27117f22035bb56150899e1e52bb542d6daniel@transgaming.com    // the rectangle of the area (left, top, right, bottom). The direction is
2634a9d65cba6c877c9006bc70e21e57f705d993b72daniel@transgaming.com    // relative to the sensor orientation, that is, what the sensor sees. The
264cdacc8e27117f22035bb56150899e1e52bb542d6daniel@transgaming.com    // direction is not affected by the rotation or mirroring of
265cdacc8e27117f22035bb56150899e1e52bb542d6daniel@transgaming.com    // CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates range from -1000 to 1000.
266cdacc8e27117f22035bb56150899e1e52bb542d6daniel@transgaming.com    // (-1000,-1000) is the upper left point. (1000, 1000) is the lower right
2674a9d65cba6c877c9006bc70e21e57f705d993b72daniel@transgaming.com    // point. The width and height of focus areas cannot be 0 or negative.
26870062c98f7c62744f398dc0ba7a87c76e723cc48daniel@transgaming.com    //
2694f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // The fifth element is the weight. Values for weight must range from 1 to
270d14558a2178bea5615e09534d11c0d99c329e603daniel@transgaming.com    // 1000.  The weight should be interpreted as a per-pixel weight - all
2714f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // pixels in the area have the specified weight. This means a small area
272d2fd4f2afe46822fed817c1ac850afe9daadf21cdaniel@transgaming.com    // with the same weight as a larger area will have less influence on the
273d2fd4f2afe46822fed817c1ac850afe9daadf21cdaniel@transgaming.com    // focusing than the larger area. Focus areas can partially overlap and the
274d2fd4f2afe46822fed817c1ac850afe9daadf21cdaniel@transgaming.com    // driver will add the weights in the overlap region.
2754f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    //
2764f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // A special case of single focus area (0,0,0,0,0) means driver to decide
2774f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // the focus area. For example, the driver may use more signals to decide
278cdacc8e27117f22035bb56150899e1e52bb542d6daniel@transgaming.com    // focus areas and change them dynamically. Apps can set (0,0,0,0,0) if they
2794f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // want the driver to decide focus areas.
2804f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    //
2814f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // Focus areas are relative to the current field of view (KEY_ZOOM). No
2824f39fd99568ce175f04b5ed72062bfed0fa41803daniel@transgaming.com    // matter what the zoom level is, (-1000,-1000) represents the top of the
283    // currently visible camera frame. The focus area cannot be set to be
284    // outside the current field of view, even when using zoom.
285    //
286    // Focus area only has effect if the current focus mode is FOCUS_MODE_AUTO,
287    // FOCUS_MODE_MACRO, FOCUS_MODE_CONTINUOUS_VIDEO, or
288    // FOCUS_MODE_CONTINUOUS_PICTURE.
289    // Example value: "(-10,-10,0,0,300),(0,0,10,10,700)". Read/write.
290    static const char KEY_FOCUS_AREAS[];
291    // Focal length in millimeter.
292    // Example value: "4.31". Read only.
293    static const char KEY_FOCAL_LENGTH[];
294    // Horizontal angle of view in degrees.
295    // Example value: "54.8". Read only.
296    static const char KEY_HORIZONTAL_VIEW_ANGLE[];
297    // Vertical angle of view in degrees.
298    // Example value: "42.5". Read only.
299    static const char KEY_VERTICAL_VIEW_ANGLE[];
300    // Exposure compensation index. 0 means exposure is not adjusted.
301    // Example value: "-5" or "5". Read/write.
302    static const char KEY_EXPOSURE_COMPENSATION[];
303    // The maximum exposure compensation index (>=0).
304    // Example value: "6". Read only.
305    static const char KEY_MAX_EXPOSURE_COMPENSATION[];
306    // The minimum exposure compensation index (<=0).
307    // Example value: "-6". Read only.
308    static const char KEY_MIN_EXPOSURE_COMPENSATION[];
309    // The exposure compensation step. Exposure compensation index multiply by
310    // step eqals to EV. Ex: if exposure compensation index is -6 and step is
311    // 0.3333, EV is -2.
312    // Example value: "0.333333333" or "0.5". Read only.
313    static const char KEY_EXPOSURE_COMPENSATION_STEP[];
314    // The state of the auto-exposure lock. "true" means that
315    // auto-exposure is locked to its current value and will not
316    // change. "false" means the auto-exposure routine is free to
317    // change exposure values. If auto-exposure is already locked,
318    // setting this to true again has no effect (the driver will not
319    // recalculate exposure values). Changing exposure compensation
320    // settings will still affect the exposure settings while
321    // auto-exposure is locked. Stopping preview or taking a still
322    // image will not change the lock. In conjunction with
323    // exposure compensation, this allows for capturing multi-exposure
324    // brackets with known relative exposure values. Locking
325    // auto-exposure after open but before the first call to
326    // startPreview may result in severely over- or under-exposed
327    // images.  The driver will not change the AE lock after
328    // auto-focus completes.
329    static const char KEY_AUTO_EXPOSURE_LOCK[];
330    // Whether locking the auto-exposure is supported. "true" means it is, and
331    // "false" or this key not existing means it is not supported.
332    static const char KEY_AUTO_EXPOSURE_LOCK_SUPPORTED[];
333    // The state of the auto-white balance lock. "true" means that
334    // auto-white balance is locked to its current value and will not
335    // change. "false" means the auto-white balance routine is free to
336    // change white balance values. If auto-white balance is already
337    // locked, setting this to true again has no effect (the driver
338    // will not recalculate white balance values). Stopping preview or
339    // taking a still image will not change the lock. In conjunction
340    // with exposure compensation, this allows for capturing
341    // multi-exposure brackets with fixed white balance. Locking
342    // auto-white balance after open but before the first call to
343    // startPreview may result in severely incorrect color.  The
344    // driver will not change the AWB lock after auto-focus
345    // completes.
346    static const char KEY_AUTO_WHITEBALANCE_LOCK[];
347    // Whether locking the auto-white balance is supported. "true"
348    // means it is, and "false" or this key not existing means it is
349    // not supported.
350    static const char KEY_AUTO_WHITEBALANCE_LOCK_SUPPORTED[];
351
352    // The maximum number of metering areas supported. This is the maximum
353    // length of KEY_METERING_AREAS.
354    // Example value: "0" or "2". Read only.
355    static const char KEY_MAX_NUM_METERING_AREAS[];
356    // Current metering areas. Camera driver uses these areas to decide
357    // exposure.
358    //
359    // Before accessing this parameter, apps should check
360    // KEY_MAX_NUM_METERING_AREAS first to know the maximum number of metering
361    // areas first. If the value is 0, metering area is not supported.
362    //
363    // Each metering area is a rectangle with specified weight. The direction is
364    // relative to the sensor orientation, that is, what the sensor sees. The
365    // direction is not affected by the rotation or mirroring of
366    // CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates of the rectangle range
367    // from -1000 to 1000. (-1000, -1000) is the upper left point. (1000, 1000)
368    // is the lower right point. The width and height of metering areas cannot
369    // be 0 or negative.
370    //
371    // The fifth element is the weight. Values for weight must range from 1 to
372    // 1000.  The weight should be interpreted as a per-pixel weight - all
373    // pixels in the area have the specified weight. This means a small area
374    // with the same weight as a larger area will have less influence on the
375    // metering than the larger area. Metering areas can partially overlap and
376    // the driver will add the weights in the overlap region.
377    //
378    // A special case of all-zero single metering area means driver to decide
379    // the metering area. For example, the driver may use more signals to decide
380    // metering areas and change them dynamically. Apps can set all-zero if they
381    // want the driver to decide metering areas.
382    //
383    // Metering areas are relative to the current field of view (KEY_ZOOM).
384    // No matter what the zoom level is, (-1000,-1000) represents the top of the
385    // currently visible camera frame. The metering area cannot be set to be
386    // outside the current field of view, even when using zoom.
387    //
388    // No matter what metering areas are, the final exposure are compensated
389    // by KEY_EXPOSURE_COMPENSATION.
390    // Example value: "(-10,-10,0,0,300),(0,0,10,10,700)". Read/write.
391    static const char KEY_METERING_AREAS[];
392    // Current zoom value.
393    // Example value: "0" or "6". Read/write.
394    static const char KEY_ZOOM[];
395    // Maximum zoom value.
396    // Example value: "6". Read only.
397    static const char KEY_MAX_ZOOM[];
398    // The zoom ratios of all zoom values. The zoom ratio is in 1/100
399    // increments. Ex: a zoom of 3.2x is returned as 320. The number of list
400    // elements is KEY_MAX_ZOOM + 1. The first element is always 100. The last
401    // element is the zoom ratio of zoom value KEY_MAX_ZOOM.
402    // Example value: "100,150,200,250,300,350,400". Read only.
403    static const char KEY_ZOOM_RATIOS[];
404    // Whether zoom is supported. Zoom is supported if the value is "true". Zoom
405    // is not supported if the value is not "true" or the key does not exist.
406    // Example value: "true". Read only.
407    static const char KEY_ZOOM_SUPPORTED[];
408    // Whether if smooth zoom is supported. Smooth zoom is supported if the
409    // value is "true". It is not supported if the value is not "true" or the
410    // key does not exist.
411    // See CAMERA_CMD_START_SMOOTH_ZOOM, CAMERA_CMD_STOP_SMOOTH_ZOOM, and
412    // CAMERA_MSG_ZOOM in frameworks/base/include/camera/Camera.h.
413    // Example value: "true". Read only.
414    static const char KEY_SMOOTH_ZOOM_SUPPORTED[];
415
416    // The distances (in meters) from the camera to where an object appears to
417    // be in focus. The object is sharpest at the optimal focus distance. The
418    // depth of field is the far focus distance minus near focus distance.
419    //
420    // Focus distances may change after starting auto focus, canceling auto
421    // focus, or starting the preview. Applications can read this anytime to get
422    // the latest focus distances. If the focus mode is FOCUS_MODE_CONTINUOUS,
423    // focus distances may change from time to time.
424    //
425    // This is intended to estimate the distance between the camera and the
426    // subject. After autofocus, the subject distance may be within near and far
427    // focus distance. However, the precision depends on the camera hardware,
428    // autofocus algorithm, the focus area, and the scene. The error can be
429    // large and it should be only used as a reference.
430    //
431    // Far focus distance > optimal focus distance > near focus distance. If
432    // the far focus distance is infinity, the value should be "Infinity" (case
433    // sensitive). The format is three float values separated by commas. The
434    // first is near focus distance. The second is optimal focus distance. The
435    // third is far focus distance.
436    // Example value: "0.95,1.9,Infinity" or "0.049,0.05,0.051". Read only.
437    static const char KEY_FOCUS_DISTANCES[];
438
439    // The current dimensions in pixels (width x height) for video frames.
440    // The width and height must be one of the supported sizes retrieved
441    // via KEY_SUPPORTED_VIDEO_SIZES.
442    // Example value: "1280x720". Read/write.
443    static const char KEY_VIDEO_SIZE[];
444    // A list of the supported dimensions in pixels (width x height)
445    // for video frames. See CAMERA_MSG_VIDEO_FRAME for details in
446    // frameworks/base/include/camera/Camera.h.
447    // Example: "176x144,1280x720". Read only.
448    static const char KEY_SUPPORTED_VIDEO_SIZES[];
449
450    // The maximum number of detected faces supported by hardware face
451    // detection. If the value is 0, hardware face detection is not supported.
452    // Example: "5". Read only
453    static const char KEY_MAX_NUM_DETECTED_FACES_HW[];
454
455    // The maximum number of detected faces supported by software face
456    // detection. If the value is 0, software face detection is not supported.
457    // Example: "5". Read only
458    static const char KEY_MAX_NUM_DETECTED_FACES_SW[];
459
460    // Preferred preview frame size in pixels for video recording.
461    // The width and height must be one of the supported sizes retrieved
462    // via KEY_SUPPORTED_PREVIEW_SIZES. This key can be used only when
463    // getSupportedVideoSizes() does not return an empty Vector of Size.
464    // Camcorder applications are recommended to set the preview size
465    // to a value that is not larger than the preferred preview size.
466    // In other words, the product of the width and height of the
467    // preview size should not be larger than that of the preferred
468    // preview size. In addition, we recommend to choos a preview size
469    // that has the same aspect ratio as the resolution of video to be
470    // recorded.
471    // Example value: "800x600". Read only.
472    static const char KEY_PREFERRED_PREVIEW_SIZE_FOR_VIDEO[];
473
474    // The image format for video frames. See CAMERA_MSG_VIDEO_FRAME in
475    // frameworks/base/include/camera/Camera.h.
476    // Example value: "yuv420sp" or PIXEL_FORMAT_XXX constants. Read only.
477    static const char KEY_VIDEO_FRAME_FORMAT[];
478
479    // Sets the hint of the recording mode. If this is true, MediaRecorder.start
480    // may be faster or has less glitches. This should be called before starting
481    // the preview for the best result. But it is allowed to change the hint
482    // while the preview is active. The default value is false.
483    //
484    // The apps can still call Camera.takePicture when the hint is true. The
485    // apps can call MediaRecorder.start when the hint is false. But the
486    // performance may be worse.
487    // Example value: "true" or "false". Read/write.
488    static const char KEY_RECORDING_HINT[];
489
490    // Returns true if video snapshot is supported. That is, applications
491    // can call Camera.takePicture during recording. Applications do not need to
492    // call Camera.startPreview after taking a picture. The preview will be
493    // still active. Other than that, taking a picture during recording is
494    // identical to taking a picture normally. All settings and methods related
495    // to takePicture work identically. Ex: KEY_PICTURE_SIZE,
496    // KEY_SUPPORTED_PICTURE_SIZES, KEY_JPEG_QUALITY, KEY_ROTATION, and etc.
497    // The picture will have an EXIF header. FLASH_MODE_AUTO and FLASH_MODE_ON
498    // also still work, but the video will record the flash.
499    //
500    // Applications can set shutter callback as null to avoid the shutter
501    // sound. It is also recommended to set raw picture and post view callbacks
502    // to null to avoid the interrupt of preview display.
503    //
504    // Field-of-view of the recorded video may be different from that of the
505    // captured pictures.
506    // Example value: "true" or "false". Read only.
507    static const char KEY_VIDEO_SNAPSHOT_SUPPORTED[];
508
509    // The state of the video stabilization. If set to true, both the
510    // preview stream and the recorded video stream are stabilized by
511    // the camera. Only valid to set if KEY_VIDEO_STABILIZATION_SUPPORTED is
512    // set to true.
513    //
514    // The value of this key can be changed any time the camera is
515    // open. If preview or recording is active, it is acceptable for
516    // there to be a slight video glitch when video stabilization is
517    // toggled on and off.
518    //
519    // This only stabilizes video streams (between-frames stabilization), and
520    // has no effect on still image capture.
521    static const char KEY_VIDEO_STABILIZATION[];
522
523    // Returns true if video stabilization is supported. That is, applications
524    // can set KEY_VIDEO_STABILIZATION to true and have a stabilized preview
525    // stream and record stabilized videos.
526    static const char KEY_VIDEO_STABILIZATION_SUPPORTED[];
527
528    // Value for KEY_ZOOM_SUPPORTED or KEY_SMOOTH_ZOOM_SUPPORTED.
529    static const char TRUE[];
530    static const char FALSE[];
531
532    // Value for KEY_FOCUS_DISTANCES.
533    static const char FOCUS_DISTANCE_INFINITY[];
534
535    // Values for white balance settings.
536    static const char WHITE_BALANCE_AUTO[];
537    static const char WHITE_BALANCE_INCANDESCENT[];
538    static const char WHITE_BALANCE_FLUORESCENT[];
539    static const char WHITE_BALANCE_WARM_FLUORESCENT[];
540    static const char WHITE_BALANCE_DAYLIGHT[];
541    static const char WHITE_BALANCE_CLOUDY_DAYLIGHT[];
542    static const char WHITE_BALANCE_TWILIGHT[];
543    static const char WHITE_BALANCE_SHADE[];
544
545    // Values for effect settings.
546    static const char EFFECT_NONE[];
547    static const char EFFECT_MONO[];
548    static const char EFFECT_NEGATIVE[];
549    static const char EFFECT_SOLARIZE[];
550    static const char EFFECT_SEPIA[];
551    static const char EFFECT_POSTERIZE[];
552    static const char EFFECT_WHITEBOARD[];
553    static const char EFFECT_BLACKBOARD[];
554    static const char EFFECT_AQUA[];
555
556    // Values for antibanding settings.
557    static const char ANTIBANDING_AUTO[];
558    static const char ANTIBANDING_50HZ[];
559    static const char ANTIBANDING_60HZ[];
560    static const char ANTIBANDING_OFF[];
561
562    // Values for flash mode settings.
563    // Flash will not be fired.
564    static const char FLASH_MODE_OFF[];
565    // Flash will be fired automatically when required. The flash may be fired
566    // during preview, auto-focus, or snapshot depending on the driver.
567    static const char FLASH_MODE_AUTO[];
568    // Flash will always be fired during snapshot. The flash may also be
569    // fired during preview or auto-focus depending on the driver.
570    static const char FLASH_MODE_ON[];
571    // Flash will be fired in red-eye reduction mode.
572    static const char FLASH_MODE_RED_EYE[];
573    // Constant emission of light during preview, auto-focus and snapshot.
574    // This can also be used for video recording.
575    static const char FLASH_MODE_TORCH[];
576
577    // Values for scene mode settings.
578    static const char SCENE_MODE_AUTO[];
579    static const char SCENE_MODE_ACTION[];
580    static const char SCENE_MODE_PORTRAIT[];
581    static const char SCENE_MODE_LANDSCAPE[];
582    static const char SCENE_MODE_NIGHT[];
583    static const char SCENE_MODE_NIGHT_PORTRAIT[];
584    static const char SCENE_MODE_THEATRE[];
585    static const char SCENE_MODE_BEACH[];
586    static const char SCENE_MODE_SNOW[];
587    static const char SCENE_MODE_SUNSET[];
588    static const char SCENE_MODE_STEADYPHOTO[];
589    static const char SCENE_MODE_FIREWORKS[];
590    static const char SCENE_MODE_SPORTS[];
591    static const char SCENE_MODE_PARTY[];
592    static const char SCENE_MODE_CANDLELIGHT[];
593    // Applications are looking for a barcode. Camera driver will be optimized
594    // for barcode reading.
595    static const char SCENE_MODE_BARCODE[];
596    // A high-dynamic range mode. In this mode, the HAL module will use a
597    // capture strategy that extends the dynamic range of the captured
598    // image in some fashion. Only the final image is returned.
599    static const char SCENE_MODE_HDR[];
600
601    // Pixel color formats for KEY_PREVIEW_FORMAT, KEY_PICTURE_FORMAT,
602    // and KEY_VIDEO_FRAME_FORMAT
603    static const char PIXEL_FORMAT_YUV422SP[];
604    static const char PIXEL_FORMAT_YUV420SP[]; // NV21
605    static const char PIXEL_FORMAT_YUV422I[]; // YUY2
606    static const char PIXEL_FORMAT_YUV420P[]; // YV12
607    static const char PIXEL_FORMAT_RGB565[];
608    static const char PIXEL_FORMAT_RGBA8888[];
609    static const char PIXEL_FORMAT_JPEG[];
610    // Raw bayer format used for images, which is 10 bit precision samples
611    // stored in 16 bit words. The filter pattern is RGGB.
612    static const char PIXEL_FORMAT_BAYER_RGGB[];
613    // Pixel format is not known to the framework
614    static const char PIXEL_FORMAT_ANDROID_OPAQUE[];
615
616    // Values for focus mode settings.
617    // Auto-focus mode. Applications should call
618    // CameraHardwareInterface.autoFocus to start the focus in this mode.
619    static const char FOCUS_MODE_AUTO[];
620    // Focus is set at infinity. Applications should not call
621    // CameraHardwareInterface.autoFocus in this mode.
622    static const char FOCUS_MODE_INFINITY[];
623    // Macro (close-up) focus mode. Applications should call
624    // CameraHardwareInterface.autoFocus to start the focus in this mode.
625    static const char FOCUS_MODE_MACRO[];
626    // Focus is fixed. The camera is always in this mode if the focus is not
627    // adjustable. If the camera has auto-focus, this mode can fix the
628    // focus, which is usually at hyperfocal distance. Applications should
629    // not call CameraHardwareInterface.autoFocus in this mode.
630    static const char FOCUS_MODE_FIXED[];
631    // Extended depth of field (EDOF). Focusing is done digitally and
632    // continuously. Applications should not call
633    // CameraHardwareInterface.autoFocus in this mode.
634    static const char FOCUS_MODE_EDOF[];
635    // Continuous auto focus mode intended for video recording. The camera
636    // continuously tries to focus. This is the best choice for video
637    // recording because the focus changes smoothly . Applications still can
638    // call CameraHardwareInterface.takePicture in this mode but the subject may
639    // not be in focus. Auto focus starts when the parameter is set.
640    //
641    // Applications can call CameraHardwareInterface.autoFocus in this mode. The
642    // focus callback will immediately return with a boolean that indicates
643    // whether the focus is sharp or not. The focus position is locked after
644    // autoFocus call. If applications want to resume the continuous focus,
645    // cancelAutoFocus must be called. Restarting the preview will not resume
646    // the continuous autofocus. To stop continuous focus, applications should
647    // change the focus mode to other modes.
648    static const char FOCUS_MODE_CONTINUOUS_VIDEO[];
649    // Continuous auto focus mode intended for taking pictures. The camera
650    // continuously tries to focus. The speed of focus change is more aggressive
651    // than FOCUS_MODE_CONTINUOUS_VIDEO. Auto focus starts when the parameter is
652    // set.
653    //
654    // Applications can call CameraHardwareInterface.autoFocus in this mode. If
655    // the autofocus is in the middle of scanning, the focus callback will
656    // return when it completes. If the autofocus is not scanning, focus
657    // callback will immediately return with a boolean that indicates whether
658    // the focus is sharp or not. The apps can then decide if they want to take
659    // a picture immediately or to change the focus mode to auto, and run a full
660    // autofocus cycle. The focus position is locked after autoFocus call. If
661    // applications want to resume the continuous focus, cancelAutoFocus must be
662    // called. Restarting the preview will not resume the continuous autofocus.
663    // To stop continuous focus, applications should change the focus mode to
664    // other modes.
665    static const char FOCUS_MODE_CONTINUOUS_PICTURE[];
666
667private:
668    DefaultKeyedVector<String8,String8>    mMap;
669};
670
671}; // namespace android
672
673#endif
674