blob: 5e5a6f16c2305197882bd7b123435ae9968a6b4d [file] [log] [blame]
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -07001/*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_HARDWARE_CAMERA_PARAMETERS_H
18#define ANDROID_HARDWARE_CAMERA_PARAMETERS_H
19
20#include <utils/KeyedVector.h>
21#include <utils/String8.h>
22
23namespace android {
24
25struct Size {
26 int width;
27 int height;
28
29 Size() {
30 width = 0;
31 height = 0;
32 }
33
34 Size(int w, int h) {
35 width = w;
36 height = h;
37 }
38};
Ankit Premrajkabf3be122011-11-21 19:25:02 -080039#ifdef QCOM_HARDWARE
40struct FPSRange{
41 int minFPS;
42 int maxFPS;
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -070043
Ankit Premrajkabf3be122011-11-21 19:25:02 -080044 FPSRange(){
45 minFPS=0;
46 maxFPS=0;
47 };
48 FPSRange(int min,int max){
49 minFPS=min;
50 maxFPS=max;
51 };
52};
53#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -070054class CameraParameters
55{
56public:
57 CameraParameters();
58 CameraParameters(const String8 &params) { unflatten(params); }
59 ~CameraParameters();
60
61 String8 flatten() const;
62 void unflatten(const String8 &params);
63
64 void set(const char *key, const char *value);
65 void set(const char *key, int value);
66 void setFloat(const char *key, float value);
67 const char *get(const char *key) const;
68 int getInt(const char *key) const;
codeworkxd8d2b352013-01-17 19:51:39 +000069#ifdef SAMSUNG_CAMERA_HARDWARE
70 int getInt64(const char *key) const;
71#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -070072 float getFloat(const char *key) const;
73
74 void remove(const char *key);
75
76 void setPreviewSize(int width, int height);
77 void getPreviewSize(int *width, int *height) const;
78 void getSupportedPreviewSizes(Vector<Size> &sizes) const;
79
80 // Set the dimensions in pixels to the given width and height
81 // for video frames. The given width and height must be one
82 // of the supported dimensions returned from
83 // getSupportedVideoSizes(). Must not be called if
84 // getSupportedVideoSizes() returns an empty Vector of Size.
85 void setVideoSize(int width, int height);
86 // Retrieve the current dimensions (width and height)
87 // in pixels for video frames, which must be one of the
88 // supported dimensions returned from getSupportedVideoSizes().
89 // Must not be called if getSupportedVideoSizes() returns an
90 // empty Vector of Size.
91 void getVideoSize(int *width, int *height) const;
92 // Retrieve a Vector of supported dimensions (width and height)
93 // in pixels for video frames. If sizes returned from the method
94 // is empty, the camera does not support calls to setVideoSize()
95 // or getVideoSize(). In adddition, it also indicates that
96 // the camera only has a single output, and does not have
97 // separate output for video frames and preview frame.
98 void getSupportedVideoSizes(Vector<Size> &sizes) const;
99 // Retrieve the preferred preview size (width and height) in pixels
100 // for video recording. The given width and height must be one of
101 // supported preview sizes returned from getSupportedPreviewSizes().
102 // Must not be called if getSupportedVideoSizes() returns an empty
103 // Vector of Size. If getSupportedVideoSizes() returns an empty
104 // Vector of Size, the width and height returned from this method
105 // is invalid, and is "-1x-1".
106 void getPreferredPreviewSizeForVideo(int *width, int *height) const;
107
108 void setPreviewFrameRate(int fps);
109 int getPreviewFrameRate() const;
110 void getPreviewFpsRange(int *min_fps, int *max_fps) const;
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800111#ifdef QCOM_HARDWARE
112 void setPreviewFrameRateMode(const char *mode);
113 const char *getPreviewFrameRateMode() const;
114#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700115 void setPreviewFormat(const char *format);
116 const char *getPreviewFormat() const;
117 void setPictureSize(int width, int height);
118 void getPictureSize(int *width, int *height) const;
119 void getSupportedPictureSizes(Vector<Size> &sizes) const;
120 void setPictureFormat(const char *format);
121 const char *getPictureFormat() const;
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800122#ifdef QCOM_HARDWARE
123 void setTouchIndexAec(int x, int y);
124 void getTouchIndexAec(int *x, int *y) const;
125 void setTouchIndexAf(int x, int y);
126 void getTouchIndexAf(int *x, int *y) const;
127#endif
128
129 void getMeteringAreaCenter(int * x, int *y) const;
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700130
131 void dump() const;
132 status_t dump(int fd, const Vector<String16>& args) const;
133
134 // Parameter keys to communicate between camera application and driver.
135 // The access (read/write, read only, or write only) is viewed from the
136 // perspective of applications, not driver.
137
138 // Preview frame size in pixels (width x height).
139 // Example value: "480x320". Read/Write.
140 static const char KEY_PREVIEW_SIZE[];
141 // Supported preview frame sizes in pixels.
142 // Example value: "800x600,480x320". Read only.
143 static const char KEY_SUPPORTED_PREVIEW_SIZES[];
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800144#ifdef QCOM_HARDWARE
145 // Supported PREVIEW/RECORDING SIZES IN HIGH FRAME RATE recording, sizes in pixels.
146 // Example value: "800x480,432x320". Read only.
147 static const char KEY_SUPPORTED_HFR_SIZES[];
148#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700149 // The current minimum and maximum preview fps. This controls the rate of
150 // preview frames received (CAMERA_MSG_PREVIEW_FRAME). The minimum and
151 // maximum fps must be one of the elements from
152 // KEY_SUPPORTED_PREVIEW_FPS_RANGE parameter.
153 // Example value: "10500,26623"
154 static const char KEY_PREVIEW_FPS_RANGE[];
155 // The supported preview fps (frame-per-second) ranges. Each range contains
156 // a minimum fps and maximum fps. If minimum fps equals to maximum fps, the
157 // camera outputs frames in fixed frame rate. If not, the camera outputs
158 // frames in auto frame rate. The actual frame rate fluctuates between the
159 // minimum and the maximum. The list has at least one element. The list is
160 // sorted from small to large (first by maximum fps and then minimum fps).
161 // Example value: "(10500,26623),(15000,26623),(30000,30000)"
162 static const char KEY_SUPPORTED_PREVIEW_FPS_RANGE[];
163 // The image format for preview frames. See CAMERA_MSG_PREVIEW_FRAME in
164 // frameworks/av/include/camera/Camera.h. The default is
165 // PIXEL_FORMAT_YUV420SP. Example value: "yuv420sp" or PIXEL_FORMAT_XXX
166 // constants. Read/write.
167 static const char KEY_PREVIEW_FORMAT[];
168 // Supported image formats for preview frames.
169 // Example value: "yuv420sp,yuv422i-yuyv". Read only.
170 static const char KEY_SUPPORTED_PREVIEW_FORMATS[];
171 // Number of preview frames per second. This is the target frame rate. The
172 // actual frame rate depends on the driver.
173 // Example value: "15". Read/write.
174 static const char KEY_PREVIEW_FRAME_RATE[];
175 // Supported number of preview frames per second.
176 // Example value: "24,15,10". Read.
177 static const char KEY_SUPPORTED_PREVIEW_FRAME_RATES[];
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800178#ifdef QCOM_HARDWARE
179 // The mode of preview frame rate.
180 // Example value: "frame-rate-auto, frame-rate-fixed".
181 static const char KEY_PREVIEW_FRAME_RATE_MODE[];
182 static const char KEY_SUPPORTED_PREVIEW_FRAME_RATE_MODES[];
183 static const char KEY_PREVIEW_FRAME_RATE_AUTO_MODE[];
184 static const char KEY_PREVIEW_FRAME_RATE_FIXED_MODE[];
185#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700186 // The dimensions for captured pictures in pixels (width x height).
187 // Example value: "1024x768". Read/write.
188 static const char KEY_PICTURE_SIZE[];
189 // Supported dimensions for captured pictures in pixels.
190 // Example value: "2048x1536,1024x768". Read only.
191 static const char KEY_SUPPORTED_PICTURE_SIZES[];
192 // The image format for captured pictures. See CAMERA_MSG_COMPRESSED_IMAGE
193 // in frameworks/base/include/camera/Camera.h.
194 // Example value: "jpeg" or PIXEL_FORMAT_XXX constants. Read/write.
195 static const char KEY_PICTURE_FORMAT[];
196 // Supported image formats for captured pictures.
197 // Example value: "jpeg,rgb565". Read only.
198 static const char KEY_SUPPORTED_PICTURE_FORMATS[];
199 // The width (in pixels) of EXIF thumbnail in Jpeg picture.
200 // Example value: "512". Read/write.
201 static const char KEY_JPEG_THUMBNAIL_WIDTH[];
202 // The height (in pixels) of EXIF thumbnail in Jpeg picture.
203 // Example value: "384". Read/write.
204 static const char KEY_JPEG_THUMBNAIL_HEIGHT[];
205 // Supported EXIF thumbnail sizes (width x height). 0x0 means not thumbnail
206 // in EXIF.
207 // Example value: "512x384,320x240,0x0". Read only.
208 static const char KEY_SUPPORTED_JPEG_THUMBNAIL_SIZES[];
209 // The quality of the EXIF thumbnail in Jpeg picture. The range is 1 to 100,
210 // with 100 being the best.
211 // Example value: "90". Read/write.
212 static const char KEY_JPEG_THUMBNAIL_QUALITY[];
213 // Jpeg quality of captured picture. The range is 1 to 100, with 100 being
214 // the best.
215 // Example value: "90". Read/write.
216 static const char KEY_JPEG_QUALITY[];
217 // The rotation angle in degrees relative to the orientation of the camera.
218 // This affects the pictures returned from CAMERA_MSG_COMPRESSED_IMAGE. The
219 // camera driver may set orientation in the EXIF header without rotating the
220 // picture. Or the driver may rotate the picture and the EXIF thumbnail. If
221 // the Jpeg picture is rotated, the orientation in the EXIF header will be
222 // missing or 1 (row #0 is top and column #0 is left side).
223 //
224 // Note that the JPEG pictures of front-facing cameras are not mirrored
225 // as in preview display.
226 //
227 // For example, suppose the natural orientation of the device is portrait.
228 // The device is rotated 270 degrees clockwise, so the device orientation is
229 // 270. Suppose a back-facing camera sensor is mounted in landscape and the
230 // top side of the camera sensor is aligned with the right edge of the
231 // display in natural orientation. So the camera orientation is 90. The
232 // rotation should be set to 0 (270 + 90).
233 //
234 // Example value: "0" or "90" or "180" or "270". Write only.
235 static const char KEY_ROTATION[];
236 // GPS latitude coordinate. GPSLatitude and GPSLatitudeRef will be stored in
237 // JPEG EXIF header.
238 // Example value: "25.032146" or "-33.462809". Write only.
239 static const char KEY_GPS_LATITUDE[];
240 // GPS longitude coordinate. GPSLongitude and GPSLongitudeRef will be stored
241 // in JPEG EXIF header.
242 // Example value: "121.564448" or "-70.660286". Write only.
243 static const char KEY_GPS_LONGITUDE[];
244 // GPS altitude. GPSAltitude and GPSAltitudeRef will be stored in JPEG EXIF
245 // header.
246 // Example value: "21.0" or "-5". Write only.
247 static const char KEY_GPS_ALTITUDE[];
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800248
249#ifdef QCOM_HARDWARE
250 static const char KEY_SKIN_TONE_ENHANCEMENT[] ;
251 static const char KEY_SUPPORTED_SKIN_TONE_ENHANCEMENT_MODES[] ;
252#endif
253
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700254 // GPS timestamp (UTC in seconds since January 1, 1970). This should be
255 // stored in JPEG EXIF header.
256 // Example value: "1251192757". Write only.
257 static const char KEY_GPS_TIMESTAMP[];
258 // GPS Processing Method
259 // Example value: "GPS" or "NETWORK". Write only.
260 static const char KEY_GPS_PROCESSING_METHOD[];
261 // Current white balance setting.
262 // Example value: "auto" or WHITE_BALANCE_XXX constants. Read/write.
263 static const char KEY_WHITE_BALANCE[];
264 // Supported white balance settings.
265 // Example value: "auto,incandescent,daylight". Read only.
266 static const char KEY_SUPPORTED_WHITE_BALANCE[];
267 // Current color effect setting.
268 // Example value: "none" or EFFECT_XXX constants. Read/write.
269 static const char KEY_EFFECT[];
270 // Supported color effect settings.
271 // Example value: "none,mono,sepia". Read only.
272 static const char KEY_SUPPORTED_EFFECTS[];
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800273#ifdef QCOM_HARDWARE
274 //Touch Af/AEC settings.
275 static const char KEY_TOUCH_AF_AEC[];
276 static const char KEY_SUPPORTED_TOUCH_AF_AEC[];
277 //Touch Index for AEC.
278 static const char KEY_TOUCH_INDEX_AEC[];
279 //Touch Index for AF.
280 static const char KEY_TOUCH_INDEX_AF[];
281#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700282 // Current antibanding setting.
283 // Example value: "auto" or ANTIBANDING_XXX constants. Read/write.
284 static const char KEY_ANTIBANDING[];
285 // Supported antibanding settings.
286 // Example value: "auto,50hz,60hz,off". Read only.
287 static const char KEY_SUPPORTED_ANTIBANDING[];
288 // Current scene mode.
289 // Example value: "auto" or SCENE_MODE_XXX constants. Read/write.
290 static const char KEY_SCENE_MODE[];
291 // Supported scene mode settings.
292 // Example value: "auto,night,fireworks". Read only.
293 static const char KEY_SUPPORTED_SCENE_MODES[];
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800294#ifdef QCOM_HARDWARE
295 // Current auto scene detection mode.
296 // Example value: "off" or SCENE_DETECT_XXX constants. Read/write.
297 static const char KEY_SCENE_DETECT[];
298 // Supported auto scene detection settings.
299 // Example value: "off,backlight,snow/cloudy". Read only.
300 static const char KEY_SUPPORTED_SCENE_DETECT[];
301#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700302 // Current flash mode.
303 // Example value: "auto" or FLASH_MODE_XXX constants. Read/write.
304 static const char KEY_FLASH_MODE[];
305 // Supported flash modes.
306 // Example value: "auto,on,off". Read only.
307 static const char KEY_SUPPORTED_FLASH_MODES[];
308 // Current focus mode. This will not be empty. Applications should call
309 // CameraHardwareInterface.autoFocus to start the focus if focus mode is
310 // FOCUS_MODE_AUTO or FOCUS_MODE_MACRO.
311 // Example value: "auto" or FOCUS_MODE_XXX constants. Read/write.
312 static const char KEY_FOCUS_MODE[];
313 // Supported focus modes.
314 // Example value: "auto,macro,fixed". Read only.
315 static const char KEY_SUPPORTED_FOCUS_MODES[];
316 // The maximum number of focus areas supported. This is the maximum length
317 // of KEY_FOCUS_AREAS.
318 // Example value: "0" or "2". Read only.
319 static const char KEY_MAX_NUM_FOCUS_AREAS[];
320 // Current focus areas.
321 //
322 // Before accessing this parameter, apps should check
323 // KEY_MAX_NUM_FOCUS_AREAS first to know the maximum number of focus areas
324 // first. If the value is 0, focus area is not supported.
325 //
326 // Each focus area is a five-element int array. The first four elements are
327 // the rectangle of the area (left, top, right, bottom). The direction is
328 // relative to the sensor orientation, that is, what the sensor sees. The
329 // direction is not affected by the rotation or mirroring of
330 // CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates range from -1000 to 1000.
331 // (-1000,-1000) is the upper left point. (1000, 1000) is the lower right
332 // point. The width and height of focus areas cannot be 0 or negative.
333 //
334 // The fifth element is the weight. Values for weight must range from 1 to
335 // 1000. The weight should be interpreted as a per-pixel weight - all
336 // pixels in the area have the specified weight. This means a small area
337 // with the same weight as a larger area will have less influence on the
338 // focusing than the larger area. Focus areas can partially overlap and the
339 // driver will add the weights in the overlap region.
340 //
341 // A special case of single focus area (0,0,0,0,0) means driver to decide
342 // the focus area. For example, the driver may use more signals to decide
343 // focus areas and change them dynamically. Apps can set (0,0,0,0,0) if they
344 // want the driver to decide focus areas.
345 //
346 // Focus areas are relative to the current field of view (KEY_ZOOM). No
347 // matter what the zoom level is, (-1000,-1000) represents the top of the
348 // currently visible camera frame. The focus area cannot be set to be
349 // outside the current field of view, even when using zoom.
350 //
351 // Focus area only has effect if the current focus mode is FOCUS_MODE_AUTO,
352 // FOCUS_MODE_MACRO, FOCUS_MODE_CONTINUOUS_VIDEO, or
353 // FOCUS_MODE_CONTINUOUS_PICTURE.
354 // Example value: "(-10,-10,0,0,300),(0,0,10,10,700)". Read/write.
355 static const char KEY_FOCUS_AREAS[];
356 // Focal length in millimeter.
357 // Example value: "4.31". Read only.
358 static const char KEY_FOCAL_LENGTH[];
359 // Horizontal angle of view in degrees.
360 // Example value: "54.8". Read only.
361 static const char KEY_HORIZONTAL_VIEW_ANGLE[];
362 // Vertical angle of view in degrees.
363 // Example value: "42.5". Read only.
364 static const char KEY_VERTICAL_VIEW_ANGLE[];
365 // Exposure compensation index. 0 means exposure is not adjusted.
James Paintere5382062012-09-05 18:02:32 -0700366 // Example value: "-5" or "5". Read/write.
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700367 static const char KEY_EXPOSURE_COMPENSATION[];
368 // The maximum exposure compensation index (>=0).
369 // Example value: "6". Read only.
370 static const char KEY_MAX_EXPOSURE_COMPENSATION[];
371 // The minimum exposure compensation index (<=0).
372 // Example value: "-6". Read only.
373 static const char KEY_MIN_EXPOSURE_COMPENSATION[];
374 // The exposure compensation step. Exposure compensation index multiply by
James Paintere5382062012-09-05 18:02:32 -0700375 // step eqals to EV. Ex: if exposure compensation index is -6 and step is
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700376 // 0.3333, EV is -2.
377 // Example value: "0.333333333" or "0.5". Read only.
378 static const char KEY_EXPOSURE_COMPENSATION_STEP[];
379 // The state of the auto-exposure lock. "true" means that
380 // auto-exposure is locked to its current value and will not
381 // change. "false" means the auto-exposure routine is free to
382 // change exposure values. If auto-exposure is already locked,
383 // setting this to true again has no effect (the driver will not
384 // recalculate exposure values). Changing exposure compensation
385 // settings will still affect the exposure settings while
386 // auto-exposure is locked. Stopping preview or taking a still
387 // image will not change the lock. In conjunction with
388 // exposure compensation, this allows for capturing multi-exposure
389 // brackets with known relative exposure values. Locking
390 // auto-exposure after open but before the first call to
391 // startPreview may result in severely over- or under-exposed
392 // images. The driver will not change the AE lock after
393 // auto-focus completes.
394 static const char KEY_AUTO_EXPOSURE_LOCK[];
395 // Whether locking the auto-exposure is supported. "true" means it is, and
396 // "false" or this key not existing means it is not supported.
397 static const char KEY_AUTO_EXPOSURE_LOCK_SUPPORTED[];
398 // The state of the auto-white balance lock. "true" means that
399 // auto-white balance is locked to its current value and will not
400 // change. "false" means the auto-white balance routine is free to
401 // change white balance values. If auto-white balance is already
402 // locked, setting this to true again has no effect (the driver
403 // will not recalculate white balance values). Stopping preview or
404 // taking a still image will not change the lock. In conjunction
405 // with exposure compensation, this allows for capturing
406 // multi-exposure brackets with fixed white balance. Locking
407 // auto-white balance after open but before the first call to
408 // startPreview may result in severely incorrect color. The
409 // driver will not change the AWB lock after auto-focus
410 // completes.
411 static const char KEY_AUTO_WHITEBALANCE_LOCK[];
412 // Whether locking the auto-white balance is supported. "true"
413 // means it is, and "false" or this key not existing means it is
414 // not supported.
415 static const char KEY_AUTO_WHITEBALANCE_LOCK_SUPPORTED[];
416
417 // The maximum number of metering areas supported. This is the maximum
418 // length of KEY_METERING_AREAS.
419 // Example value: "0" or "2". Read only.
420 static const char KEY_MAX_NUM_METERING_AREAS[];
421 // Current metering areas. Camera driver uses these areas to decide
422 // exposure.
423 //
424 // Before accessing this parameter, apps should check
425 // KEY_MAX_NUM_METERING_AREAS first to know the maximum number of metering
426 // areas first. If the value is 0, metering area is not supported.
427 //
428 // Each metering area is a rectangle with specified weight. The direction is
429 // relative to the sensor orientation, that is, what the sensor sees. The
430 // direction is not affected by the rotation or mirroring of
431 // CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates of the rectangle range
432 // from -1000 to 1000. (-1000, -1000) is the upper left point. (1000, 1000)
433 // is the lower right point. The width and height of metering areas cannot
434 // be 0 or negative.
435 //
436 // The fifth element is the weight. Values for weight must range from 1 to
437 // 1000. The weight should be interpreted as a per-pixel weight - all
438 // pixels in the area have the specified weight. This means a small area
439 // with the same weight as a larger area will have less influence on the
440 // metering than the larger area. Metering areas can partially overlap and
441 // the driver will add the weights in the overlap region.
442 //
443 // A special case of all-zero single metering area means driver to decide
444 // the metering area. For example, the driver may use more signals to decide
445 // metering areas and change them dynamically. Apps can set all-zero if they
446 // want the driver to decide metering areas.
447 //
448 // Metering areas are relative to the current field of view (KEY_ZOOM).
449 // No matter what the zoom level is, (-1000,-1000) represents the top of the
450 // currently visible camera frame. The metering area cannot be set to be
451 // outside the current field of view, even when using zoom.
452 //
453 // No matter what metering areas are, the final exposure are compensated
454 // by KEY_EXPOSURE_COMPENSATION.
455 // Example value: "(-10,-10,0,0,300),(0,0,10,10,700)". Read/write.
456 static const char KEY_METERING_AREAS[];
457 // Current zoom value.
458 // Example value: "0" or "6". Read/write.
459 static const char KEY_ZOOM[];
460 // Maximum zoom value.
461 // Example value: "6". Read only.
462 static const char KEY_MAX_ZOOM[];
463 // The zoom ratios of all zoom values. The zoom ratio is in 1/100
464 // increments. Ex: a zoom of 3.2x is returned as 320. The number of list
465 // elements is KEY_MAX_ZOOM + 1. The first element is always 100. The last
466 // element is the zoom ratio of zoom value KEY_MAX_ZOOM.
467 // Example value: "100,150,200,250,300,350,400". Read only.
468 static const char KEY_ZOOM_RATIOS[];
469 // Whether zoom is supported. Zoom is supported if the value is "true". Zoom
470 // is not supported if the value is not "true" or the key does not exist.
471 // Example value: "true". Read only.
472 static const char KEY_ZOOM_SUPPORTED[];
473 // Whether if smooth zoom is supported. Smooth zoom is supported if the
474 // value is "true". It is not supported if the value is not "true" or the
475 // key does not exist.
476 // See CAMERA_CMD_START_SMOOTH_ZOOM, CAMERA_CMD_STOP_SMOOTH_ZOOM, and
477 // CAMERA_MSG_ZOOM in frameworks/base/include/camera/Camera.h.
478 // Example value: "true". Read only.
479 static const char KEY_SMOOTH_ZOOM_SUPPORTED[];
480
481 // The distances (in meters) from the camera to where an object appears to
482 // be in focus. The object is sharpest at the optimal focus distance. The
483 // depth of field is the far focus distance minus near focus distance.
484 //
485 // Focus distances may change after starting auto focus, canceling auto
486 // focus, or starting the preview. Applications can read this anytime to get
487 // the latest focus distances. If the focus mode is FOCUS_MODE_CONTINUOUS,
488 // focus distances may change from time to time.
489 //
490 // This is intended to estimate the distance between the camera and the
491 // subject. After autofocus, the subject distance may be within near and far
492 // focus distance. However, the precision depends on the camera hardware,
493 // autofocus algorithm, the focus area, and the scene. The error can be
494 // large and it should be only used as a reference.
495 //
496 // Far focus distance > optimal focus distance > near focus distance. If
497 // the far focus distance is infinity, the value should be "Infinity" (case
498 // sensitive). The format is three float values separated by commas. The
499 // first is near focus distance. The second is optimal focus distance. The
500 // third is far focus distance.
501 // Example value: "0.95,1.9,Infinity" or "0.049,0.05,0.051". Read only.
502 static const char KEY_FOCUS_DISTANCES[];
503
504 // The current dimensions in pixels (width x height) for video frames.
505 // The width and height must be one of the supported sizes retrieved
506 // via KEY_SUPPORTED_VIDEO_SIZES.
507 // Example value: "1280x720". Read/write.
508 static const char KEY_VIDEO_SIZE[];
509 // A list of the supported dimensions in pixels (width x height)
510 // for video frames. See CAMERA_MSG_VIDEO_FRAME for details in
511 // frameworks/base/include/camera/Camera.h.
512 // Example: "176x144,1280x720". Read only.
513 static const char KEY_SUPPORTED_VIDEO_SIZES[];
514
515 // The maximum number of detected faces supported by hardware face
516 // detection. If the value is 0, hardware face detection is not supported.
517 // Example: "5". Read only
518 static const char KEY_MAX_NUM_DETECTED_FACES_HW[];
519
520 // The maximum number of detected faces supported by software face
521 // detection. If the value is 0, software face detection is not supported.
522 // Example: "5". Read only
523 static const char KEY_MAX_NUM_DETECTED_FACES_SW[];
524
525 // Preferred preview frame size in pixels for video recording.
526 // The width and height must be one of the supported sizes retrieved
527 // via KEY_SUPPORTED_PREVIEW_SIZES. This key can be used only when
528 // getSupportedVideoSizes() does not return an empty Vector of Size.
529 // Camcorder applications are recommended to set the preview size
530 // to a value that is not larger than the preferred preview size.
531 // In other words, the product of the width and height of the
532 // preview size should not be larger than that of the preferred
533 // preview size. In addition, we recommend to choos a preview size
534 // that has the same aspect ratio as the resolution of video to be
535 // recorded.
536 // Example value: "800x600". Read only.
537 static const char KEY_PREFERRED_PREVIEW_SIZE_FOR_VIDEO[];
538
539 // The image format for video frames. See CAMERA_MSG_VIDEO_FRAME in
540 // frameworks/base/include/camera/Camera.h.
541 // Example value: "yuv420sp" or PIXEL_FORMAT_XXX constants. Read only.
542 static const char KEY_VIDEO_FRAME_FORMAT[];
543
544 // Sets the hint of the recording mode. If this is true, MediaRecorder.start
545 // may be faster or has less glitches. This should be called before starting
546 // the preview for the best result. But it is allowed to change the hint
547 // while the preview is active. The default value is false.
548 //
549 // The apps can still call Camera.takePicture when the hint is true. The
550 // apps can call MediaRecorder.start when the hint is false. But the
551 // performance may be worse.
552 // Example value: "true" or "false". Read/write.
553 static const char KEY_RECORDING_HINT[];
554
555 // Returns true if video snapshot is supported. That is, applications
556 // can call Camera.takePicture during recording. Applications do not need to
557 // call Camera.startPreview after taking a picture. The preview will be
558 // still active. Other than that, taking a picture during recording is
559 // identical to taking a picture normally. All settings and methods related
560 // to takePicture work identically. Ex: KEY_PICTURE_SIZE,
561 // KEY_SUPPORTED_PICTURE_SIZES, KEY_JPEG_QUALITY, KEY_ROTATION, and etc.
562 // The picture will have an EXIF header. FLASH_MODE_AUTO and FLASH_MODE_ON
563 // also still work, but the video will record the flash.
564 //
565 // Applications can set shutter callback as null to avoid the shutter
566 // sound. It is also recommended to set raw picture and post view callbacks
567 // to null to avoid the interrupt of preview display.
568 //
569 // Field-of-view of the recorded video may be different from that of the
570 // captured pictures.
571 // Example value: "true" or "false". Read only.
572 static const char KEY_VIDEO_SNAPSHOT_SUPPORTED[];
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800573 static const char KEY_FULL_VIDEO_SNAP_SUPPORTED[];
574
575#ifdef QCOM_HARDWARE
576 static const char KEY_ISO_MODE[];
577 static const char KEY_SUPPORTED_ISO_MODES[];
578 static const char KEY_LENSSHADE[] ;
579 static const char KEY_SUPPORTED_LENSSHADE_MODES[] ;
580
581 static const char KEY_AUTO_EXPOSURE[];
582 static const char KEY_SUPPORTED_AUTO_EXPOSURE[];
583
584 static const char KEY_GPS_LATITUDE_REF[];
585 static const char KEY_GPS_LONGITUDE_REF[];
586 static const char KEY_GPS_ALTITUDE_REF[];
587 static const char KEY_GPS_STATUS[];
588 static const char KEY_EXIF_DATETIME[];
589#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700590
591 // The state of the video stabilization. If set to true, both the
592 // preview stream and the recorded video stream are stabilized by
593 // the camera. Only valid to set if KEY_VIDEO_STABILIZATION_SUPPORTED is
594 // set to true.
595 //
596 // The value of this key can be changed any time the camera is
597 // open. If preview or recording is active, it is acceptable for
598 // there to be a slight video glitch when video stabilization is
599 // toggled on and off.
600 //
601 // This only stabilizes video streams (between-frames stabilization), and
602 // has no effect on still image capture.
603 static const char KEY_VIDEO_STABILIZATION[];
604
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800605#ifdef QCOM_HARDWARE
606 static const char KEY_MEMORY_COLOR_ENHANCEMENT[];
607 static const char KEY_SUPPORTED_MEM_COLOR_ENHANCE_MODES[];
608
Steve Kondik6b8f36a2013-01-09 00:27:31 -0800609 static const char KEY_POWER_MODE_SUPPORTED[];
Emerson Pinter8eda5d32012-11-27 19:52:52 -0200610 static const char KEY_POWER_MODE[];
611
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800612 static const char KEY_ZSL[];
613 static const char KEY_SUPPORTED_ZSL_MODES[];
614
615 static const char KEY_CAMERA_MODE[];
616
617 static const char KEY_VIDEO_HIGH_FRAME_RATE[];
618 static const char KEY_SUPPORTED_VIDEO_HIGH_FRAME_RATE_MODES[];
619 static const char KEY_HIGH_DYNAMIC_RANGE_IMAGING[];
620 static const char KEY_SUPPORTED_HDR_IMAGING_MODES[];
621#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700622 // Returns true if video stabilization is supported. That is, applications
623 // can set KEY_VIDEO_STABILIZATION to true and have a stabilized preview
624 // stream and record stabilized videos.
625 static const char KEY_VIDEO_STABILIZATION_SUPPORTED[];
626
James Paintere5382062012-09-05 18:02:32 -0700627 // Supported modes for special effects with light.
628 // Example values: "lowlight,hdr".
629 static const char KEY_LIGHTFX[];
630
codeworkx9d292992012-11-27 01:30:33 +0100631#ifdef HAVE_ISO
632 static const char KEY_SUPPORTED_ISO_MODES[];
633 static const char KEY_ISO_MODE[];
634#endif
635
codeworkx9f122152012-11-27 01:22:13 +0100636#ifdef SAMSUNG_CAMERA_HARDWARE
637 static const char KEY_ANTI_SHAKE_MODE[];
638 static const char KEY_METERING[];
639 static const char KEY_WDR[];
640 static const char KEY_WEATHER[];
codeworkxd8d2b352013-01-17 19:51:39 +0000641 static const char KEY_CITYID[];
codeworkx9f122152012-11-27 01:22:13 +0100642#endif
Daniel Hillenbranddc3600a2013-05-04 19:48:15 +0200643
644#ifdef HTC_CAMERA_HARDWARE
645 static const char KEY_TIME_CONS_POST_PROCESSING[];
646 static const char KEY_OIS_MODE[];
647 static const char KEY_APP_OIS_SETTING[];
648 static const char KEY_OIS_SUPPORT[];
649 static const char KEY_CONTIBURST_TYPE[];
650 static const char KEY_CAPTURE_MODE[];
651 static const char CAPTURE_MODE_NORMAL[];
652 static const char CAPTURE_MODE_CONTI_ZOE[];
653 static const char CAPTURE_MODE_CONTI_BURST[];
654 static const char CAPTURE_MODE_CONTI_BURST_ONE_SHOT[];
655 static const char CAPTURE_MODE_HDR[];
656 static const char CAPTURE_MODE_PANORAMA[];
657 static const char CAPTURE_MODE_ZOE[];
658 static const char KEY_CONTI_BURST_STATE[];
659 static const char KEY_SUPPORTED_CAPTURE_MODES[];
660 static const char KEY_MIN_CONTRAST[];
atis11298eec442013-06-30 19:46:32 +0100661 static const char KEY_DEF_CONTRAST[];
Daniel Hillenbranddc3600a2013-05-04 19:48:15 +0200662 static const char KEY_MIN_SHARPNESS[];
atis11298eec442013-06-30 19:46:32 +0100663 static const char KEY_DEF_SHARPNESS[];
Daniel Hillenbranddc3600a2013-05-04 19:48:15 +0200664 static const char KEY_MIN_SATURATION[];
atis11298eec442013-06-30 19:46:32 +0100665 static const char KEY_DEF_SATURATION[];
Daniel Hillenbranddc3600a2013-05-04 19:48:15 +0200666 static const char KEY_SINGLE_ISP_OUTPUT_ENABLED[];
667 static const char POST_PROCESSING_ENABLE[];
668 static const char POST_PROCESSING_BYPASS[];
669 static const char POST_PROCESSING_DELAY[];
670 static const char SCENE_MODE_OFF[];
671 static const char SCENE_MODE_TEXT[];
672 static const char BURST_MODE_LIMIT20[];
673 static const char BURST_MODE_UNLIMITED[];
674 static const char OIS_MODE_OFF[];
675 static const char OIS_MODE_ON[];
676 static const char CONTI_BURST_CAPTURING[];
677 static const char CONTI_BURST_CAPTURE_DONE[];
678 static const char APP_OIS_SETTING_FALSE[];
679 static const char APP_OIS_SETTING_TRUE[];
Daniel Hillenbrand8f093d62013-05-05 15:56:08 +0200680 static const char KEY_GPU_EFFECT[];
681 static const char KEY_GPU_EFFECT_PARAM_0[];
682 static const char KEY_GPU_EFFECT_PARAM_1[];
683 static const char KEY_GPU_EFFECT_PARAM_2[];
684 static const char KEY_GPU_EFFECT_PARAM_3[];
Daniel Hillenbrand2d8a8ca2013-06-27 17:16:10 +0200685 static const char KEY_FORCE_USE_AUDIO_ENABLED[];
Daniel Hillenbranddc3600a2013-05-04 19:48:15 +0200686#endif
687
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800688 static const char KEY_AE_BRACKET_HDR[];
codeworkx9f122152012-11-27 01:22:13 +0100689
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700690 // Value for KEY_ZOOM_SUPPORTED or KEY_SMOOTH_ZOOM_SUPPORTED.
691 static const char TRUE[];
692 static const char FALSE[];
693
694 // Value for KEY_FOCUS_DISTANCES.
695 static const char FOCUS_DISTANCE_INFINITY[];
696
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800697#ifdef QCOM_HARDWARE
698 // DENOISE
699 static const char KEY_DENOISE[];
700 static const char KEY_SUPPORTED_DENOISE[];
701
702 //Selectable zone AF.
703 static const char KEY_SELECTABLE_ZONE_AF[];
704 static const char KEY_SUPPORTED_SELECTABLE_ZONE_AF[];
705
706 //Face Detection
707 static const char KEY_FACE_DETECTION[];
708 static const char KEY_SUPPORTED_FACE_DETECTION[];
709
710 //Redeye Reduction
711 static const char KEY_REDEYE_REDUCTION[];
712 static const char KEY_SUPPORTED_REDEYE_REDUCTION[];
713#endif
714
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700715 // Values for white balance settings.
716 static const char WHITE_BALANCE_AUTO[];
717 static const char WHITE_BALANCE_INCANDESCENT[];
718 static const char WHITE_BALANCE_FLUORESCENT[];
719 static const char WHITE_BALANCE_WARM_FLUORESCENT[];
720 static const char WHITE_BALANCE_DAYLIGHT[];
721 static const char WHITE_BALANCE_CLOUDY_DAYLIGHT[];
722 static const char WHITE_BALANCE_TWILIGHT[];
723 static const char WHITE_BALANCE_SHADE[];
724
725 // Values for effect settings.
726 static const char EFFECT_NONE[];
727 static const char EFFECT_MONO[];
728 static const char EFFECT_NEGATIVE[];
729 static const char EFFECT_SOLARIZE[];
730 static const char EFFECT_SEPIA[];
731 static const char EFFECT_POSTERIZE[];
732 static const char EFFECT_WHITEBOARD[];
733 static const char EFFECT_BLACKBOARD[];
734 static const char EFFECT_AQUA[];
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800735#ifdef QCOM_HARDWARE
736 static const char EFFECT_EMBOSS[];
737 static const char EFFECT_SKETCH[];
738 static const char EFFECT_NEON[];
739
740 // Values for Touch AF/AEC
741 static const char TOUCH_AF_AEC_OFF[] ;
742 static const char TOUCH_AF_AEC_ON[] ;
743#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700744
745 // Values for antibanding settings.
746 static const char ANTIBANDING_AUTO[];
747 static const char ANTIBANDING_50HZ[];
748 static const char ANTIBANDING_60HZ[];
749 static const char ANTIBANDING_OFF[];
750
751 // Values for flash mode settings.
752 // Flash will not be fired.
753 static const char FLASH_MODE_OFF[];
754 // Flash will be fired automatically when required. The flash may be fired
755 // during preview, auto-focus, or snapshot depending on the driver.
756 static const char FLASH_MODE_AUTO[];
757 // Flash will always be fired during snapshot. The flash may also be
758 // fired during preview or auto-focus depending on the driver.
759 static const char FLASH_MODE_ON[];
760 // Flash will be fired in red-eye reduction mode.
761 static const char FLASH_MODE_RED_EYE[];
762 // Constant emission of light during preview, auto-focus and snapshot.
763 // This can also be used for video recording.
764 static const char FLASH_MODE_TORCH[];
765
766 // Values for scene mode settings.
767 static const char SCENE_MODE_AUTO[];
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800768 static const char SCENE_MODE_ASD[];
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700769 static const char SCENE_MODE_ACTION[];
770 static const char SCENE_MODE_PORTRAIT[];
771 static const char SCENE_MODE_LANDSCAPE[];
772 static const char SCENE_MODE_NIGHT[];
773 static const char SCENE_MODE_NIGHT_PORTRAIT[];
774 static const char SCENE_MODE_THEATRE[];
775 static const char SCENE_MODE_BEACH[];
776 static const char SCENE_MODE_SNOW[];
777 static const char SCENE_MODE_SUNSET[];
778 static const char SCENE_MODE_STEADYPHOTO[];
779 static const char SCENE_MODE_FIREWORKS[];
780 static const char SCENE_MODE_SPORTS[];
781 static const char SCENE_MODE_PARTY[];
782 static const char SCENE_MODE_CANDLELIGHT[];
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800783#ifdef QCOM_HARDWARE
784 static const char SCENE_MODE_BACKLIGHT[];
785 static const char SCENE_MODE_FLOWERS[];
786 static const char SCENE_MODE_AR[];
787#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700788 // Applications are looking for a barcode. Camera driver will be optimized
789 // for barcode reading.
790 static const char SCENE_MODE_BARCODE[];
Eino-Ville Talvalac61b2aa2012-09-10 11:59:12 -0700791 // A high-dynamic range mode. In this mode, the HAL module will use a
792 // capture strategy that extends the dynamic range of the captured
793 // image in some fashion. Only the final image is returned.
794 static const char SCENE_MODE_HDR[];
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700795
796 // Pixel color formats for KEY_PREVIEW_FORMAT, KEY_PICTURE_FORMAT,
797 // and KEY_VIDEO_FRAME_FORMAT
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800798#ifdef QCOM_HARDWARE
799 static const char SCENE_DETECT_OFF[];
800 static const char SCENE_DETECT_ON[];
801#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700802 static const char PIXEL_FORMAT_YUV422SP[];
803 static const char PIXEL_FORMAT_YUV420SP[]; // NV21
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800804#ifdef QCOM_HARDWARE
805 static const char PIXEL_FORMAT_YUV420SP_ADRENO[]; // ADRENO
806#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700807 static const char PIXEL_FORMAT_YUV422I[]; // YUY2
808 static const char PIXEL_FORMAT_YUV420P[]; // YV12
809 static const char PIXEL_FORMAT_RGB565[];
810 static const char PIXEL_FORMAT_RGBA8888[];
811 static const char PIXEL_FORMAT_JPEG[];
812 // Raw bayer format used for images, which is 10 bit precision samples
813 // stored in 16 bit words. The filter pattern is RGGB.
814 static const char PIXEL_FORMAT_BAYER_RGGB[];
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800815
Eino-Ville Talvalaf6d96962012-07-18 17:50:46 -0700816 // Pixel format is not known to the framework
817 static const char PIXEL_FORMAT_ANDROID_OPAQUE[];
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700818
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800819#ifdef QCOM_HARDWARE
820 static const char PIXEL_FORMAT_RAW[];
821 static const char PIXEL_FORMAT_YV12[]; // NV21
822 static const char PIXEL_FORMAT_NV12[]; //NV12
823#endif
824
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700825 // Values for focus mode settings.
826 // Auto-focus mode. Applications should call
827 // CameraHardwareInterface.autoFocus to start the focus in this mode.
828 static const char FOCUS_MODE_AUTO[];
829 // Focus is set at infinity. Applications should not call
830 // CameraHardwareInterface.autoFocus in this mode.
831 static const char FOCUS_MODE_INFINITY[];
832 // Macro (close-up) focus mode. Applications should call
833 // CameraHardwareInterface.autoFocus to start the focus in this mode.
834 static const char FOCUS_MODE_MACRO[];
835 // Focus is fixed. The camera is always in this mode if the focus is not
836 // adjustable. If the camera has auto-focus, this mode can fix the
837 // focus, which is usually at hyperfocal distance. Applications should
838 // not call CameraHardwareInterface.autoFocus in this mode.
839 static const char FOCUS_MODE_FIXED[];
840 // Extended depth of field (EDOF). Focusing is done digitally and
841 // continuously. Applications should not call
842 // CameraHardwareInterface.autoFocus in this mode.
843 static const char FOCUS_MODE_EDOF[];
844 // Continuous auto focus mode intended for video recording. The camera
845 // continuously tries to focus. This is the best choice for video
846 // recording because the focus changes smoothly . Applications still can
847 // call CameraHardwareInterface.takePicture in this mode but the subject may
848 // not be in focus. Auto focus starts when the parameter is set.
849 //
850 // Applications can call CameraHardwareInterface.autoFocus in this mode. The
851 // focus callback will immediately return with a boolean that indicates
852 // whether the focus is sharp or not. The focus position is locked after
853 // autoFocus call. If applications want to resume the continuous focus,
854 // cancelAutoFocus must be called. Restarting the preview will not resume
855 // the continuous autofocus. To stop continuous focus, applications should
856 // change the focus mode to other modes.
857 static const char FOCUS_MODE_CONTINUOUS_VIDEO[];
858 // Continuous auto focus mode intended for taking pictures. The camera
859 // continuously tries to focus. The speed of focus change is more aggressive
860 // than FOCUS_MODE_CONTINUOUS_VIDEO. Auto focus starts when the parameter is
861 // set.
862 //
863 // Applications can call CameraHardwareInterface.autoFocus in this mode. If
864 // the autofocus is in the middle of scanning, the focus callback will
865 // return when it completes. If the autofocus is not scanning, focus
866 // callback will immediately return with a boolean that indicates whether
867 // the focus is sharp or not. The apps can then decide if they want to take
868 // a picture immediately or to change the focus mode to auto, and run a full
869 // autofocus cycle. The focus position is locked after autoFocus call. If
870 // applications want to resume the continuous focus, cancelAutoFocus must be
871 // called. Restarting the preview will not resume the continuous autofocus.
872 // To stop continuous focus, applications should change the focus mode to
873 // other modes.
874 static const char FOCUS_MODE_CONTINUOUS_PICTURE[];
875
James Paintere5382062012-09-05 18:02:32 -0700876 // Values for light special effects
877 // Low-light enhancement mode
878 static const char LIGHTFX_LOWLIGHT[];
879 // High-dynamic range mode
880 static const char LIGHTFX_HDR[];
881
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800882#ifdef QCOM_HARDWARE
883 // Normal focus mode. Applications should call
884 // CameraHardwareInterface.autoFocus to start the focus in this mode.
885 static const char FOCUS_MODE_NORMAL[];
886 static const char ISO_AUTO[];
887 static const char ISO_HJR[] ;
888 static const char ISO_100[];
889 static const char ISO_200[] ;
890 static const char ISO_400[];
891 static const char ISO_800[];
892 static const char ISO_1600[];
Emerson Pinter5649c282012-11-27 09:13:34 -0200893 static const char ISO_3200[];
894 static const char ISO_6400[];
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800895 // Values for Lens Shading
896 static const char LENSSHADE_ENABLE[] ;
897 static const char LENSSHADE_DISABLE[] ;
898
899 // Values for auto exposure settings.
900 static const char AUTO_EXPOSURE_FRAME_AVG[];
901 static const char AUTO_EXPOSURE_CENTER_WEIGHTED[];
902 static const char AUTO_EXPOSURE_SPOT_METERING[];
903
904 static const char KEY_SHARPNESS[];
905 static const char KEY_MAX_SHARPNESS[];
906 static const char KEY_CONTRAST[];
907 static const char KEY_MAX_CONTRAST[];
908 static const char KEY_SATURATION[];
909 static const char KEY_MAX_SATURATION[];
910
911 static const char KEY_HISTOGRAM[] ;
912 static const char KEY_SUPPORTED_HISTOGRAM_MODES[] ;
913 // Values for HISTOGRAM
914 static const char HISTOGRAM_ENABLE[] ;
915 static const char HISTOGRAM_DISABLE[] ;
916
917 // Values for SKIN TONE ENHANCEMENT
918 static const char SKIN_TONE_ENHANCEMENT_ENABLE[] ;
919 static const char SKIN_TONE_ENHANCEMENT_DISABLE[] ;
920
921 // Values for Denoise
922 static const char DENOISE_OFF[] ;
923 static const char DENOISE_ON[] ;
924
925 // Values for auto exposure settings.
926 static const char SELECTABLE_ZONE_AF_AUTO[];
927 static const char SELECTABLE_ZONE_AF_SPOT_METERING[];
928 static const char SELECTABLE_ZONE_AF_CENTER_WEIGHTED[];
929 static const char SELECTABLE_ZONE_AF_FRAME_AVERAGE[];
930
931 // Values for Face Detection settings.
932 static const char FACE_DETECTION_OFF[];
933 static const char FACE_DETECTION_ON[];
934
935 // Values for MCE settings.
936 static const char MCE_ENABLE[];
937 static const char MCE_DISABLE[];
938
939 // Values for ZSL settings.
940 static const char ZSL_OFF[];
941 static const char ZSL_ON[];
942
943 // Values for HDR Bracketing settings.
944 static const char AE_BRACKET_HDR_OFF[];
945 static const char AE_BRACKET_HDR[];
946 static const char AE_BRACKET[];
947
Emerson Pinter8eda5d32012-11-27 19:52:52 -0200948 //POWER MODE
949 static const char LOW_POWER[];
950 static const char NORMAL_POWER[];
951
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800952 // Values for HFR settings.
953 static const char VIDEO_HFR_OFF[];
954 static const char VIDEO_HFR_2X[];
955 static const char VIDEO_HFR_3X[];
956 static const char VIDEO_HFR_4X[];
957
958 // Values for Redeye Reduction settings.
959 static const char REDEYE_REDUCTION_ENABLE[];
960 static const char REDEYE_REDUCTION_DISABLE[];
961 // Values for HDR settings.
962 static const char HDR_ENABLE[];
963 static const char HDR_DISABLE[];
964
Arne Coucheron2a1aae02013-04-15 05:31:41 +0200965#if defined(QCOM_HARDWARE) && defined(SAMSUNG_CAMERA_LEGACY)
966 static const char FOCUS_MODE_FACEDETECT[];
967 static const char FOCUS_MODE_TOUCHAF[];
968 static const char ISO_50[];
969 static const char KEY_ANTI_SHAKE_MODE[];
970 static const char KEY_AUTO_CONTRAST[];
971 static const char KEY_BEAUTY_MODE[];
972 static const char KEY_BLUR_MODE[];
973 static const char KEY_VINTAGE_MODE[];
974 static const char KEY_WDR_MODE[];
975 static const char VINTAGE_MODE_BNW[];
976 static const char VINTAGE_MODE_COOL[];
977 static const char VINTAGE_MODE_NORMAL[];
978 static const char VINTAGE_MODE_OFF[];
979 static const char VINTAGE_MODE_WARM[];
980 static const char SCENE_MODE_DAWN[];
981 static const char SCENE_MODE_DUSKDAWN[];
982 static const char SCENE_MODE_FALL[];
983 static const char SCENE_MODE_FALL_COLOR[];
984 static const char SCENE_MODE_TEXT[];
985#endif
986
Ankit Premrajkabf3be122011-11-21 19:25:02 -0800987 // Values for Redeye Reduction settings.
988 // static const char REDEYE_REDUCTION_ENABLE[];
989 // static const char REDEYE_REDUCTION_DISABLE[];
990 // Values for HDR settings.
991 // static const char HDR_ENABLE[];
992 // static const char HDR_DISABLE[];
993
994 enum {
995 CAMERA_ORIENTATION_UNKNOWN = 0,
996 CAMERA_ORIENTATION_PORTRAIT = 1,
997 CAMERA_ORIENTATION_LANDSCAPE = 2,
998 };
999 int getOrientation() const;
1000 void setOrientation(int orientation);
1001 void setPreviewFpsRange(int minFPS,int maxFPS);
1002 void getSupportedHfrSizes(Vector<Size> &sizes) const;
1003#endif
1004
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -07001005private:
1006 DefaultKeyedVector<String8,String8> mMap;
1007};
1008
1009}; // namespace android
1010
1011#endif