blob: c39f9262481d884e064ee04e1359a5e69b8e7b89 [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 Premrajka140a9ac2011-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 Premrajka140a9ac2011-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;
69 float getFloat(const char *key) const;
70
71 void remove(const char *key);
72
73 void setPreviewSize(int width, int height);
74 void getPreviewSize(int *width, int *height) const;
75 void getSupportedPreviewSizes(Vector<Size> &sizes) const;
76
77 // Set the dimensions in pixels to the given width and height
78 // for video frames. The given width and height must be one
79 // of the supported dimensions returned from
80 // getSupportedVideoSizes(). Must not be called if
81 // getSupportedVideoSizes() returns an empty Vector of Size.
82 void setVideoSize(int width, int height);
83 // Retrieve the current dimensions (width and height)
84 // in pixels for video frames, which must be one of the
85 // supported dimensions returned from getSupportedVideoSizes().
86 // Must not be called if getSupportedVideoSizes() returns an
87 // empty Vector of Size.
88 void getVideoSize(int *width, int *height) const;
89 // Retrieve a Vector of supported dimensions (width and height)
90 // in pixels for video frames. If sizes returned from the method
91 // is empty, the camera does not support calls to setVideoSize()
92 // or getVideoSize(). In adddition, it also indicates that
93 // the camera only has a single output, and does not have
94 // separate output for video frames and preview frame.
95 void getSupportedVideoSizes(Vector<Size> &sizes) const;
96 // Retrieve the preferred preview size (width and height) in pixels
97 // for video recording. The given width and height must be one of
98 // supported preview sizes returned from getSupportedPreviewSizes().
99 // Must not be called if getSupportedVideoSizes() returns an empty
100 // Vector of Size. If getSupportedVideoSizes() returns an empty
101 // Vector of Size, the width and height returned from this method
102 // is invalid, and is "-1x-1".
103 void getPreferredPreviewSizeForVideo(int *width, int *height) const;
104
105 void setPreviewFrameRate(int fps);
106 int getPreviewFrameRate() const;
107 void getPreviewFpsRange(int *min_fps, int *max_fps) const;
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800108#ifdef QCOM_HARDWARE
109 void setPreviewFrameRateMode(const char *mode);
110 const char *getPreviewFrameRateMode() const;
111#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700112 void setPreviewFormat(const char *format);
113 const char *getPreviewFormat() const;
114 void setPictureSize(int width, int height);
115 void getPictureSize(int *width, int *height) const;
116 void getSupportedPictureSizes(Vector<Size> &sizes) const;
117 void setPictureFormat(const char *format);
118 const char *getPictureFormat() const;
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800119#ifdef QCOM_HARDWARE
120 void setTouchIndexAec(int x, int y);
121 void getTouchIndexAec(int *x, int *y) const;
122 void setTouchIndexAf(int x, int y);
123 void getTouchIndexAf(int *x, int *y) const;
124#endif
125
126 void getMeteringAreaCenter(int * x, int *y) const;
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700127
128 void dump() const;
129 status_t dump(int fd, const Vector<String16>& args) const;
130
131 // Parameter keys to communicate between camera application and driver.
132 // The access (read/write, read only, or write only) is viewed from the
133 // perspective of applications, not driver.
134
135 // Preview frame size in pixels (width x height).
136 // Example value: "480x320". Read/Write.
137 static const char KEY_PREVIEW_SIZE[];
138 // Supported preview frame sizes in pixels.
139 // Example value: "800x600,480x320". Read only.
140 static const char KEY_SUPPORTED_PREVIEW_SIZES[];
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800141#ifdef QCOM_HARDWARE
142 // Supported PREVIEW/RECORDING SIZES IN HIGH FRAME RATE recording, sizes in pixels.
143 // Example value: "800x480,432x320". Read only.
144 static const char KEY_SUPPORTED_HFR_SIZES[];
145#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700146 // The current minimum and maximum preview fps. This controls the rate of
147 // preview frames received (CAMERA_MSG_PREVIEW_FRAME). The minimum and
148 // maximum fps must be one of the elements from
149 // KEY_SUPPORTED_PREVIEW_FPS_RANGE parameter.
150 // Example value: "10500,26623"
151 static const char KEY_PREVIEW_FPS_RANGE[];
152 // The supported preview fps (frame-per-second) ranges. Each range contains
153 // a minimum fps and maximum fps. If minimum fps equals to maximum fps, the
154 // camera outputs frames in fixed frame rate. If not, the camera outputs
155 // frames in auto frame rate. The actual frame rate fluctuates between the
156 // minimum and the maximum. The list has at least one element. The list is
157 // sorted from small to large (first by maximum fps and then minimum fps).
158 // Example value: "(10500,26623),(15000,26623),(30000,30000)"
159 static const char KEY_SUPPORTED_PREVIEW_FPS_RANGE[];
160 // The image format for preview frames. See CAMERA_MSG_PREVIEW_FRAME in
161 // frameworks/av/include/camera/Camera.h. The default is
162 // PIXEL_FORMAT_YUV420SP. Example value: "yuv420sp" or PIXEL_FORMAT_XXX
163 // constants. Read/write.
164 static const char KEY_PREVIEW_FORMAT[];
165 // Supported image formats for preview frames.
166 // Example value: "yuv420sp,yuv422i-yuyv". Read only.
167 static const char KEY_SUPPORTED_PREVIEW_FORMATS[];
168 // Number of preview frames per second. This is the target frame rate. The
169 // actual frame rate depends on the driver.
170 // Example value: "15". Read/write.
171 static const char KEY_PREVIEW_FRAME_RATE[];
172 // Supported number of preview frames per second.
173 // Example value: "24,15,10". Read.
174 static const char KEY_SUPPORTED_PREVIEW_FRAME_RATES[];
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800175#ifdef QCOM_HARDWARE
176 // The mode of preview frame rate.
177 // Example value: "frame-rate-auto, frame-rate-fixed".
178 static const char KEY_PREVIEW_FRAME_RATE_MODE[];
179 static const char KEY_SUPPORTED_PREVIEW_FRAME_RATE_MODES[];
180 static const char KEY_PREVIEW_FRAME_RATE_AUTO_MODE[];
181 static const char KEY_PREVIEW_FRAME_RATE_FIXED_MODE[];
xkonnicb9bc7f2012-08-09 11:05:39 +0200182 static const char KEY_CAPTURE_MODE[];
183 static const char KEY_SUPPORTED_CAPTURE_MODES[];
184 static const char KEY_PICTURE_COUNT[];
185 static const char KEY_MAX_BURST_PICTURE_COUNT[];
186 static const char KEY_SUPPORTED_CONTINUOUS_AF[];
andrew.borendb4fd362012-10-31 19:34:59 -0700187 static const char KEY_TAKING_PICTURE_ZOOM[];
188 static const char KEY_PANORAMA_MODE[];
189 static const char PANORAMA_MODE_NOT_INPROGRESS[];
190 static const char PANORAMA_MODE_INPROGRESS[];
xkonnicb9bc7f2012-08-09 11:05:39 +0200191 static const char CAPTURE_MODE_NORMAL[];
192 static const char CAPTURE_MODE_BURST[];
193 static const char CAPTURE_MODE_CONTI_BURST[];
194 static const char CAPTURE_MODE_HDR[];
195 static const char CAPTURE_MODE_HJR[];
196 static const char CAPTURE_MODE_PANORAMA[];
andrew.borendb4fd362012-10-31 19:34:59 -0700197
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800198#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700199 // The dimensions for captured pictures in pixels (width x height).
200 // Example value: "1024x768". Read/write.
201 static const char KEY_PICTURE_SIZE[];
202 // Supported dimensions for captured pictures in pixels.
203 // Example value: "2048x1536,1024x768". Read only.
204 static const char KEY_SUPPORTED_PICTURE_SIZES[];
205 // The image format for captured pictures. See CAMERA_MSG_COMPRESSED_IMAGE
206 // in frameworks/base/include/camera/Camera.h.
207 // Example value: "jpeg" or PIXEL_FORMAT_XXX constants. Read/write.
208 static const char KEY_PICTURE_FORMAT[];
209 // Supported image formats for captured pictures.
210 // Example value: "jpeg,rgb565". Read only.
211 static const char KEY_SUPPORTED_PICTURE_FORMATS[];
212 // The width (in pixels) of EXIF thumbnail in Jpeg picture.
213 // Example value: "512". Read/write.
214 static const char KEY_JPEG_THUMBNAIL_WIDTH[];
215 // The height (in pixels) of EXIF thumbnail in Jpeg picture.
216 // Example value: "384". Read/write.
217 static const char KEY_JPEG_THUMBNAIL_HEIGHT[];
218 // Supported EXIF thumbnail sizes (width x height). 0x0 means not thumbnail
219 // in EXIF.
220 // Example value: "512x384,320x240,0x0". Read only.
221 static const char KEY_SUPPORTED_JPEG_THUMBNAIL_SIZES[];
222 // The quality of the EXIF thumbnail in Jpeg picture. The range is 1 to 100,
223 // with 100 being the best.
224 // Example value: "90". Read/write.
225 static const char KEY_JPEG_THUMBNAIL_QUALITY[];
226 // Jpeg quality of captured picture. The range is 1 to 100, with 100 being
227 // the best.
228 // Example value: "90". Read/write.
229 static const char KEY_JPEG_QUALITY[];
230 // The rotation angle in degrees relative to the orientation of the camera.
231 // This affects the pictures returned from CAMERA_MSG_COMPRESSED_IMAGE. The
232 // camera driver may set orientation in the EXIF header without rotating the
233 // picture. Or the driver may rotate the picture and the EXIF thumbnail. If
234 // the Jpeg picture is rotated, the orientation in the EXIF header will be
235 // missing or 1 (row #0 is top and column #0 is left side).
236 //
237 // Note that the JPEG pictures of front-facing cameras are not mirrored
238 // as in preview display.
239 //
240 // For example, suppose the natural orientation of the device is portrait.
241 // The device is rotated 270 degrees clockwise, so the device orientation is
242 // 270. Suppose a back-facing camera sensor is mounted in landscape and the
243 // top side of the camera sensor is aligned with the right edge of the
244 // display in natural orientation. So the camera orientation is 90. The
245 // rotation should be set to 0 (270 + 90).
246 //
247 // Example value: "0" or "90" or "180" or "270". Write only.
248 static const char KEY_ROTATION[];
249 // GPS latitude coordinate. GPSLatitude and GPSLatitudeRef will be stored in
250 // JPEG EXIF header.
251 // Example value: "25.032146" or "-33.462809". Write only.
252 static const char KEY_GPS_LATITUDE[];
253 // GPS longitude coordinate. GPSLongitude and GPSLongitudeRef will be stored
254 // in JPEG EXIF header.
255 // Example value: "121.564448" or "-70.660286". Write only.
256 static const char KEY_GPS_LONGITUDE[];
257 // GPS altitude. GPSAltitude and GPSAltitudeRef will be stored in JPEG EXIF
258 // header.
259 // Example value: "21.0" or "-5". Write only.
260 static const char KEY_GPS_ALTITUDE[];
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800261
262#ifdef QCOM_HARDWARE
263 static const char KEY_SKIN_TONE_ENHANCEMENT[] ;
264 static const char KEY_SUPPORTED_SKIN_TONE_ENHANCEMENT_MODES[] ;
265#endif
266
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700267 // GPS timestamp (UTC in seconds since January 1, 1970). This should be
268 // stored in JPEG EXIF header.
269 // Example value: "1251192757". Write only.
270 static const char KEY_GPS_TIMESTAMP[];
271 // GPS Processing Method
272 // Example value: "GPS" or "NETWORK". Write only.
273 static const char KEY_GPS_PROCESSING_METHOD[];
274 // Current white balance setting.
275 // Example value: "auto" or WHITE_BALANCE_XXX constants. Read/write.
276 static const char KEY_WHITE_BALANCE[];
277 // Supported white balance settings.
278 // Example value: "auto,incandescent,daylight". Read only.
279 static const char KEY_SUPPORTED_WHITE_BALANCE[];
280 // Current color effect setting.
281 // Example value: "none" or EFFECT_XXX constants. Read/write.
282 static const char KEY_EFFECT[];
283 // Supported color effect settings.
284 // Example value: "none,mono,sepia". Read only.
285 static const char KEY_SUPPORTED_EFFECTS[];
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800286#ifdef QCOM_HARDWARE
287 //Touch Af/AEC settings.
288 static const char KEY_TOUCH_AF_AEC[];
289 static const char KEY_SUPPORTED_TOUCH_AF_AEC[];
290 //Touch Index for AEC.
291 static const char KEY_TOUCH_INDEX_AEC[];
292 //Touch Index for AF.
293 static const char KEY_TOUCH_INDEX_AF[];
294#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700295 // Current antibanding setting.
296 // Example value: "auto" or ANTIBANDING_XXX constants. Read/write.
297 static const char KEY_ANTIBANDING[];
298 // Supported antibanding settings.
299 // Example value: "auto,50hz,60hz,off". Read only.
300 static const char KEY_SUPPORTED_ANTIBANDING[];
301 // Current scene mode.
302 // Example value: "auto" or SCENE_MODE_XXX constants. Read/write.
303 static const char KEY_SCENE_MODE[];
304 // Supported scene mode settings.
305 // Example value: "auto,night,fireworks". Read only.
306 static const char KEY_SUPPORTED_SCENE_MODES[];
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800307#ifdef QCOM_HARDWARE
308 // Current auto scene detection mode.
309 // Example value: "off" or SCENE_DETECT_XXX constants. Read/write.
310 static const char KEY_SCENE_DETECT[];
311 // Supported auto scene detection settings.
312 // Example value: "off,backlight,snow/cloudy". Read only.
313 static const char KEY_SUPPORTED_SCENE_DETECT[];
314#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700315 // Current flash mode.
316 // Example value: "auto" or FLASH_MODE_XXX constants. Read/write.
317 static const char KEY_FLASH_MODE[];
318 // Supported flash modes.
319 // Example value: "auto,on,off". Read only.
320 static const char KEY_SUPPORTED_FLASH_MODES[];
321 // Current focus mode. This will not be empty. Applications should call
322 // CameraHardwareInterface.autoFocus to start the focus if focus mode is
323 // FOCUS_MODE_AUTO or FOCUS_MODE_MACRO.
324 // Example value: "auto" or FOCUS_MODE_XXX constants. Read/write.
325 static const char KEY_FOCUS_MODE[];
326 // Supported focus modes.
327 // Example value: "auto,macro,fixed". Read only.
328 static const char KEY_SUPPORTED_FOCUS_MODES[];
329 // The maximum number of focus areas supported. This is the maximum length
330 // of KEY_FOCUS_AREAS.
331 // Example value: "0" or "2". Read only.
332 static const char KEY_MAX_NUM_FOCUS_AREAS[];
333 // Current focus areas.
334 //
335 // Before accessing this parameter, apps should check
336 // KEY_MAX_NUM_FOCUS_AREAS first to know the maximum number of focus areas
337 // first. If the value is 0, focus area is not supported.
338 //
339 // Each focus area is a five-element int array. The first four elements are
340 // the rectangle of the area (left, top, right, bottom). The direction is
341 // relative to the sensor orientation, that is, what the sensor sees. The
342 // direction is not affected by the rotation or mirroring of
343 // CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates range from -1000 to 1000.
344 // (-1000,-1000) is the upper left point. (1000, 1000) is the lower right
345 // point. The width and height of focus areas cannot be 0 or negative.
346 //
347 // The fifth element is the weight. Values for weight must range from 1 to
348 // 1000. The weight should be interpreted as a per-pixel weight - all
349 // pixels in the area have the specified weight. This means a small area
350 // with the same weight as a larger area will have less influence on the
351 // focusing than the larger area. Focus areas can partially overlap and the
352 // driver will add the weights in the overlap region.
353 //
354 // A special case of single focus area (0,0,0,0,0) means driver to decide
355 // the focus area. For example, the driver may use more signals to decide
356 // focus areas and change them dynamically. Apps can set (0,0,0,0,0) if they
357 // want the driver to decide focus areas.
358 //
359 // Focus areas are relative to the current field of view (KEY_ZOOM). No
360 // matter what the zoom level is, (-1000,-1000) represents the top of the
361 // currently visible camera frame. The focus area cannot be set to be
362 // outside the current field of view, even when using zoom.
363 //
364 // Focus area only has effect if the current focus mode is FOCUS_MODE_AUTO,
365 // FOCUS_MODE_MACRO, FOCUS_MODE_CONTINUOUS_VIDEO, or
366 // FOCUS_MODE_CONTINUOUS_PICTURE.
367 // Example value: "(-10,-10,0,0,300),(0,0,10,10,700)". Read/write.
368 static const char KEY_FOCUS_AREAS[];
369 // Focal length in millimeter.
370 // Example value: "4.31". Read only.
371 static const char KEY_FOCAL_LENGTH[];
372 // Horizontal angle of view in degrees.
373 // Example value: "54.8". Read only.
374 static const char KEY_HORIZONTAL_VIEW_ANGLE[];
375 // Vertical angle of view in degrees.
376 // Example value: "42.5". Read only.
377 static const char KEY_VERTICAL_VIEW_ANGLE[];
378 // Exposure compensation index. 0 means exposure is not adjusted.
James Paintere5382062012-09-05 18:02:32 -0700379 // Example value: "-5" or "5". Read/write.
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700380 static const char KEY_EXPOSURE_COMPENSATION[];
381 // The maximum exposure compensation index (>=0).
382 // Example value: "6". Read only.
383 static const char KEY_MAX_EXPOSURE_COMPENSATION[];
384 // The minimum exposure compensation index (<=0).
385 // Example value: "-6". Read only.
386 static const char KEY_MIN_EXPOSURE_COMPENSATION[];
387 // The exposure compensation step. Exposure compensation index multiply by
James Paintere5382062012-09-05 18:02:32 -0700388 // step eqals to EV. Ex: if exposure compensation index is -6 and step is
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700389 // 0.3333, EV is -2.
390 // Example value: "0.333333333" or "0.5". Read only.
391 static const char KEY_EXPOSURE_COMPENSATION_STEP[];
392 // The state of the auto-exposure lock. "true" means that
393 // auto-exposure is locked to its current value and will not
394 // change. "false" means the auto-exposure routine is free to
395 // change exposure values. If auto-exposure is already locked,
396 // setting this to true again has no effect (the driver will not
397 // recalculate exposure values). Changing exposure compensation
398 // settings will still affect the exposure settings while
399 // auto-exposure is locked. Stopping preview or taking a still
400 // image will not change the lock. In conjunction with
401 // exposure compensation, this allows for capturing multi-exposure
402 // brackets with known relative exposure values. Locking
403 // auto-exposure after open but before the first call to
404 // startPreview may result in severely over- or under-exposed
405 // images. The driver will not change the AE lock after
406 // auto-focus completes.
407 static const char KEY_AUTO_EXPOSURE_LOCK[];
408 // Whether locking the auto-exposure is supported. "true" means it is, and
409 // "false" or this key not existing means it is not supported.
410 static const char KEY_AUTO_EXPOSURE_LOCK_SUPPORTED[];
411 // The state of the auto-white balance lock. "true" means that
412 // auto-white balance is locked to its current value and will not
413 // change. "false" means the auto-white balance routine is free to
414 // change white balance values. If auto-white balance is already
415 // locked, setting this to true again has no effect (the driver
416 // will not recalculate white balance values). Stopping preview or
417 // taking a still image will not change the lock. In conjunction
418 // with exposure compensation, this allows for capturing
419 // multi-exposure brackets with fixed white balance. Locking
420 // auto-white balance after open but before the first call to
421 // startPreview may result in severely incorrect color. The
422 // driver will not change the AWB lock after auto-focus
423 // completes.
424 static const char KEY_AUTO_WHITEBALANCE_LOCK[];
425 // Whether locking the auto-white balance is supported. "true"
426 // means it is, and "false" or this key not existing means it is
427 // not supported.
428 static const char KEY_AUTO_WHITEBALANCE_LOCK_SUPPORTED[];
429
430 // The maximum number of metering areas supported. This is the maximum
431 // length of KEY_METERING_AREAS.
432 // Example value: "0" or "2". Read only.
433 static const char KEY_MAX_NUM_METERING_AREAS[];
434 // Current metering areas. Camera driver uses these areas to decide
435 // exposure.
436 //
437 // Before accessing this parameter, apps should check
438 // KEY_MAX_NUM_METERING_AREAS first to know the maximum number of metering
439 // areas first. If the value is 0, metering area is not supported.
440 //
441 // Each metering area is a rectangle with specified weight. The direction is
442 // relative to the sensor orientation, that is, what the sensor sees. The
443 // direction is not affected by the rotation or mirroring of
444 // CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates of the rectangle range
445 // from -1000 to 1000. (-1000, -1000) is the upper left point. (1000, 1000)
446 // is the lower right point. The width and height of metering areas cannot
447 // be 0 or negative.
448 //
449 // The fifth element is the weight. Values for weight must range from 1 to
450 // 1000. The weight should be interpreted as a per-pixel weight - all
451 // pixels in the area have the specified weight. This means a small area
452 // with the same weight as a larger area will have less influence on the
453 // metering than the larger area. Metering areas can partially overlap and
454 // the driver will add the weights in the overlap region.
455 //
456 // A special case of all-zero single metering area means driver to decide
457 // the metering area. For example, the driver may use more signals to decide
458 // metering areas and change them dynamically. Apps can set all-zero if they
459 // want the driver to decide metering areas.
460 //
461 // Metering areas are relative to the current field of view (KEY_ZOOM).
462 // No matter what the zoom level is, (-1000,-1000) represents the top of the
463 // currently visible camera frame. The metering area cannot be set to be
464 // outside the current field of view, even when using zoom.
465 //
466 // No matter what metering areas are, the final exposure are compensated
467 // by KEY_EXPOSURE_COMPENSATION.
468 // Example value: "(-10,-10,0,0,300),(0,0,10,10,700)". Read/write.
469 static const char KEY_METERING_AREAS[];
470 // Current zoom value.
471 // Example value: "0" or "6". Read/write.
472 static const char KEY_ZOOM[];
473 // Maximum zoom value.
474 // Example value: "6". Read only.
475 static const char KEY_MAX_ZOOM[];
476 // The zoom ratios of all zoom values. The zoom ratio is in 1/100
477 // increments. Ex: a zoom of 3.2x is returned as 320. The number of list
478 // elements is KEY_MAX_ZOOM + 1. The first element is always 100. The last
479 // element is the zoom ratio of zoom value KEY_MAX_ZOOM.
480 // Example value: "100,150,200,250,300,350,400". Read only.
481 static const char KEY_ZOOM_RATIOS[];
482 // Whether zoom is supported. Zoom is supported if the value is "true". Zoom
483 // is not supported if the value is not "true" or the key does not exist.
484 // Example value: "true". Read only.
485 static const char KEY_ZOOM_SUPPORTED[];
486 // Whether if smooth zoom is supported. Smooth zoom is supported if the
487 // value is "true". It is not supported if the value is not "true" or the
488 // key does not exist.
489 // See CAMERA_CMD_START_SMOOTH_ZOOM, CAMERA_CMD_STOP_SMOOTH_ZOOM, and
490 // CAMERA_MSG_ZOOM in frameworks/base/include/camera/Camera.h.
491 // Example value: "true". Read only.
492 static const char KEY_SMOOTH_ZOOM_SUPPORTED[];
493
494 // The distances (in meters) from the camera to where an object appears to
495 // be in focus. The object is sharpest at the optimal focus distance. The
496 // depth of field is the far focus distance minus near focus distance.
497 //
498 // Focus distances may change after starting auto focus, canceling auto
499 // focus, or starting the preview. Applications can read this anytime to get
500 // the latest focus distances. If the focus mode is FOCUS_MODE_CONTINUOUS,
501 // focus distances may change from time to time.
502 //
503 // This is intended to estimate the distance between the camera and the
504 // subject. After autofocus, the subject distance may be within near and far
505 // focus distance. However, the precision depends on the camera hardware,
506 // autofocus algorithm, the focus area, and the scene. The error can be
507 // large and it should be only used as a reference.
508 //
509 // Far focus distance > optimal focus distance > near focus distance. If
510 // the far focus distance is infinity, the value should be "Infinity" (case
511 // sensitive). The format is three float values separated by commas. The
512 // first is near focus distance. The second is optimal focus distance. The
513 // third is far focus distance.
514 // Example value: "0.95,1.9,Infinity" or "0.049,0.05,0.051". Read only.
515 static const char KEY_FOCUS_DISTANCES[];
516
517 // The current dimensions in pixels (width x height) for video frames.
518 // The width and height must be one of the supported sizes retrieved
519 // via KEY_SUPPORTED_VIDEO_SIZES.
520 // Example value: "1280x720". Read/write.
521 static const char KEY_VIDEO_SIZE[];
522 // A list of the supported dimensions in pixels (width x height)
523 // for video frames. See CAMERA_MSG_VIDEO_FRAME for details in
524 // frameworks/base/include/camera/Camera.h.
525 // Example: "176x144,1280x720". Read only.
526 static const char KEY_SUPPORTED_VIDEO_SIZES[];
527
528 // The maximum number of detected faces supported by hardware face
529 // detection. If the value is 0, hardware face detection is not supported.
530 // Example: "5". Read only
531 static const char KEY_MAX_NUM_DETECTED_FACES_HW[];
532
533 // The maximum number of detected faces supported by software face
534 // detection. If the value is 0, software face detection is not supported.
535 // Example: "5". Read only
536 static const char KEY_MAX_NUM_DETECTED_FACES_SW[];
537
538 // Preferred preview frame size in pixels for video recording.
539 // The width and height must be one of the supported sizes retrieved
540 // via KEY_SUPPORTED_PREVIEW_SIZES. This key can be used only when
541 // getSupportedVideoSizes() does not return an empty Vector of Size.
542 // Camcorder applications are recommended to set the preview size
543 // to a value that is not larger than the preferred preview size.
544 // In other words, the product of the width and height of the
545 // preview size should not be larger than that of the preferred
546 // preview size. In addition, we recommend to choos a preview size
547 // that has the same aspect ratio as the resolution of video to be
548 // recorded.
549 // Example value: "800x600". Read only.
550 static const char KEY_PREFERRED_PREVIEW_SIZE_FOR_VIDEO[];
551
552 // The image format for video frames. See CAMERA_MSG_VIDEO_FRAME in
553 // frameworks/base/include/camera/Camera.h.
554 // Example value: "yuv420sp" or PIXEL_FORMAT_XXX constants. Read only.
555 static const char KEY_VIDEO_FRAME_FORMAT[];
556
557 // Sets the hint of the recording mode. If this is true, MediaRecorder.start
558 // may be faster or has less glitches. This should be called before starting
559 // the preview for the best result. But it is allowed to change the hint
560 // while the preview is active. The default value is false.
561 //
562 // The apps can still call Camera.takePicture when the hint is true. The
563 // apps can call MediaRecorder.start when the hint is false. But the
564 // performance may be worse.
565 // Example value: "true" or "false". Read/write.
566 static const char KEY_RECORDING_HINT[];
567
568 // Returns true if video snapshot is supported. That is, applications
569 // can call Camera.takePicture during recording. Applications do not need to
570 // call Camera.startPreview after taking a picture. The preview will be
571 // still active. Other than that, taking a picture during recording is
572 // identical to taking a picture normally. All settings and methods related
573 // to takePicture work identically. Ex: KEY_PICTURE_SIZE,
574 // KEY_SUPPORTED_PICTURE_SIZES, KEY_JPEG_QUALITY, KEY_ROTATION, and etc.
575 // The picture will have an EXIF header. FLASH_MODE_AUTO and FLASH_MODE_ON
576 // also still work, but the video will record the flash.
577 //
578 // Applications can set shutter callback as null to avoid the shutter
579 // sound. It is also recommended to set raw picture and post view callbacks
580 // to null to avoid the interrupt of preview display.
581 //
582 // Field-of-view of the recorded video may be different from that of the
583 // captured pictures.
584 // Example value: "true" or "false". Read only.
585 static const char KEY_VIDEO_SNAPSHOT_SUPPORTED[];
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800586 static const char KEY_FULL_VIDEO_SNAP_SUPPORTED[];
587
588#ifdef QCOM_HARDWARE
589 static const char KEY_ISO_MODE[];
590 static const char KEY_SUPPORTED_ISO_MODES[];
591 static const char KEY_LENSSHADE[] ;
592 static const char KEY_SUPPORTED_LENSSHADE_MODES[] ;
593
594 static const char KEY_AUTO_EXPOSURE[];
595 static const char KEY_SUPPORTED_AUTO_EXPOSURE[];
596
597 static const char KEY_GPS_LATITUDE_REF[];
598 static const char KEY_GPS_LONGITUDE_REF[];
599 static const char KEY_GPS_ALTITUDE_REF[];
600 static const char KEY_GPS_STATUS[];
601 static const char KEY_EXIF_DATETIME[];
602#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700603
604 // The state of the video stabilization. If set to true, both the
605 // preview stream and the recorded video stream are stabilized by
606 // the camera. Only valid to set if KEY_VIDEO_STABILIZATION_SUPPORTED is
607 // set to true.
608 //
609 // The value of this key can be changed any time the camera is
610 // open. If preview or recording is active, it is acceptable for
611 // there to be a slight video glitch when video stabilization is
612 // toggled on and off.
613 //
614 // This only stabilizes video streams (between-frames stabilization), and
615 // has no effect on still image capture.
616 static const char KEY_VIDEO_STABILIZATION[];
617
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800618#ifdef QCOM_HARDWARE
619 static const char KEY_MEMORY_COLOR_ENHANCEMENT[];
620 static const char KEY_SUPPORTED_MEM_COLOR_ENHANCE_MODES[];
621
622 static const char KEY_ZSL[];
623 static const char KEY_SUPPORTED_ZSL_MODES[];
624
625 static const char KEY_CAMERA_MODE[];
626
627 static const char KEY_VIDEO_HIGH_FRAME_RATE[];
628 static const char KEY_SUPPORTED_VIDEO_HIGH_FRAME_RATE_MODES[];
629 static const char KEY_HIGH_DYNAMIC_RANGE_IMAGING[];
630 static const char KEY_SUPPORTED_HDR_IMAGING_MODES[];
631#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700632 // Returns true if video stabilization is supported. That is, applications
633 // can set KEY_VIDEO_STABILIZATION to true and have a stabilized preview
634 // stream and record stabilized videos.
635 static const char KEY_VIDEO_STABILIZATION_SUPPORTED[];
636
codeworkx612842e2012-11-27 01:30:33 +0100637#ifdef HAVE_ISO
638 static const char KEY_SUPPORTED_ISO_MODES[];
639 static const char KEY_ISO_MODE[];
640#endif
641
codeworkxf68caed2012-11-27 01:22:13 +0100642#ifdef SAMSUNG_CAMERA_HARDWARE
643 static const char KEY_ANTI_SHAKE_MODE[];
644 static const char KEY_METERING[];
645 static const char KEY_WDR[];
646 static const char KEY_WEATHER[];
647#endif
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800648 static const char KEY_AE_BRACKET_HDR[];
codeworkxf68caed2012-11-27 01:22:13 +0100649
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700650 // Value for KEY_ZOOM_SUPPORTED or KEY_SMOOTH_ZOOM_SUPPORTED.
651 static const char TRUE[];
652 static const char FALSE[];
653
654 // Value for KEY_FOCUS_DISTANCES.
655 static const char FOCUS_DISTANCE_INFINITY[];
656
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800657#ifdef QCOM_HARDWARE
658 // DENOISE
659 static const char KEY_DENOISE[];
660 static const char KEY_SUPPORTED_DENOISE[];
661
662 //Selectable zone AF.
663 static const char KEY_SELECTABLE_ZONE_AF[];
664 static const char KEY_SUPPORTED_SELECTABLE_ZONE_AF[];
665
666 //Face Detection
667 static const char KEY_FACE_DETECTION[];
668 static const char KEY_SUPPORTED_FACE_DETECTION[];
669
670 //Redeye Reduction
671 static const char KEY_REDEYE_REDUCTION[];
672 static const char KEY_SUPPORTED_REDEYE_REDUCTION[];
673#endif
674
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700675 // Values for white balance settings.
676 static const char WHITE_BALANCE_AUTO[];
677 static const char WHITE_BALANCE_INCANDESCENT[];
678 static const char WHITE_BALANCE_FLUORESCENT[];
679 static const char WHITE_BALANCE_WARM_FLUORESCENT[];
680 static const char WHITE_BALANCE_DAYLIGHT[];
681 static const char WHITE_BALANCE_CLOUDY_DAYLIGHT[];
682 static const char WHITE_BALANCE_TWILIGHT[];
683 static const char WHITE_BALANCE_SHADE[];
684
685 // Values for effect settings.
686 static const char EFFECT_NONE[];
687 static const char EFFECT_MONO[];
688 static const char EFFECT_NEGATIVE[];
689 static const char EFFECT_SOLARIZE[];
690 static const char EFFECT_SEPIA[];
691 static const char EFFECT_POSTERIZE[];
692 static const char EFFECT_WHITEBOARD[];
693 static const char EFFECT_BLACKBOARD[];
694 static const char EFFECT_AQUA[];
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800695#ifdef QCOM_HARDWARE
696 static const char EFFECT_EMBOSS[];
697 static const char EFFECT_SKETCH[];
698 static const char EFFECT_NEON[];
699
700 // Values for Touch AF/AEC
701 static const char TOUCH_AF_AEC_OFF[] ;
702 static const char TOUCH_AF_AEC_ON[] ;
703#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700704
705 // Values for antibanding settings.
706 static const char ANTIBANDING_AUTO[];
707 static const char ANTIBANDING_50HZ[];
708 static const char ANTIBANDING_60HZ[];
709 static const char ANTIBANDING_OFF[];
710
711 // Values for flash mode settings.
712 // Flash will not be fired.
713 static const char FLASH_MODE_OFF[];
714 // Flash will be fired automatically when required. The flash may be fired
715 // during preview, auto-focus, or snapshot depending on the driver.
716 static const char FLASH_MODE_AUTO[];
717 // Flash will always be fired during snapshot. The flash may also be
718 // fired during preview or auto-focus depending on the driver.
719 static const char FLASH_MODE_ON[];
720 // Flash will be fired in red-eye reduction mode.
721 static const char FLASH_MODE_RED_EYE[];
722 // Constant emission of light during preview, auto-focus and snapshot.
723 // This can also be used for video recording.
724 static const char FLASH_MODE_TORCH[];
725
726 // Values for scene mode settings.
727 static const char SCENE_MODE_AUTO[];
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800728 static const char SCENE_MODE_ASD[];
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700729 static const char SCENE_MODE_ACTION[];
730 static const char SCENE_MODE_PORTRAIT[];
731 static const char SCENE_MODE_LANDSCAPE[];
732 static const char SCENE_MODE_NIGHT[];
733 static const char SCENE_MODE_NIGHT_PORTRAIT[];
734 static const char SCENE_MODE_THEATRE[];
735 static const char SCENE_MODE_BEACH[];
736 static const char SCENE_MODE_SNOW[];
737 static const char SCENE_MODE_SUNSET[];
738 static const char SCENE_MODE_STEADYPHOTO[];
739 static const char SCENE_MODE_FIREWORKS[];
740 static const char SCENE_MODE_SPORTS[];
741 static const char SCENE_MODE_PARTY[];
742 static const char SCENE_MODE_CANDLELIGHT[];
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800743#ifdef QCOM_HARDWARE
744 static const char SCENE_MODE_BACKLIGHT[];
745 static const char SCENE_MODE_FLOWERS[];
746 static const char SCENE_MODE_AR[];
Ed Carrigandaa94b62012-09-04 22:13:43 -0700747 static const char SCENE_MODE_OFF[];
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800748#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700749 // Applications are looking for a barcode. Camera driver will be optimized
750 // for barcode reading.
751 static const char SCENE_MODE_BARCODE[];
Eino-Ville Talvalac61b2aa2012-09-10 11:59:12 -0700752 // A high-dynamic range mode. In this mode, the HAL module will use a
753 // capture strategy that extends the dynamic range of the captured
754 // image in some fashion. Only the final image is returned.
755 static const char SCENE_MODE_HDR[];
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700756
757 // Pixel color formats for KEY_PREVIEW_FORMAT, KEY_PICTURE_FORMAT,
758 // and KEY_VIDEO_FRAME_FORMAT
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800759#ifdef QCOM_HARDWARE
760 static const char SCENE_DETECT_OFF[];
761 static const char SCENE_DETECT_ON[];
762#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700763 static const char PIXEL_FORMAT_YUV422SP[];
764 static const char PIXEL_FORMAT_YUV420SP[]; // NV21
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800765#ifdef QCOM_HARDWARE
766 static const char PIXEL_FORMAT_YUV420SP_ADRENO[]; // ADRENO
767#endif
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700768 static const char PIXEL_FORMAT_YUV422I[]; // YUY2
769 static const char PIXEL_FORMAT_YUV420P[]; // YV12
770 static const char PIXEL_FORMAT_RGB565[];
771 static const char PIXEL_FORMAT_RGBA8888[];
772 static const char PIXEL_FORMAT_JPEG[];
773 // Raw bayer format used for images, which is 10 bit precision samples
774 // stored in 16 bit words. The filter pattern is RGGB.
775 static const char PIXEL_FORMAT_BAYER_RGGB[];
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800776
Eino-Ville Talvalaf6d96962012-07-18 17:50:46 -0700777 // Pixel format is not known to the framework
778 static const char PIXEL_FORMAT_ANDROID_OPAQUE[];
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700779
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800780#ifdef QCOM_HARDWARE
781 static const char PIXEL_FORMAT_RAW[];
782 static const char PIXEL_FORMAT_YV12[]; // NV21
783 static const char PIXEL_FORMAT_NV12[]; //NV12
784#endif
785
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700786 // Values for focus mode settings.
787 // Auto-focus mode. Applications should call
788 // CameraHardwareInterface.autoFocus to start the focus in this mode.
789 static const char FOCUS_MODE_AUTO[];
790 // Focus is set at infinity. Applications should not call
791 // CameraHardwareInterface.autoFocus in this mode.
792 static const char FOCUS_MODE_INFINITY[];
793 // Macro (close-up) focus mode. Applications should call
794 // CameraHardwareInterface.autoFocus to start the focus in this mode.
795 static const char FOCUS_MODE_MACRO[];
796 // Focus is fixed. The camera is always in this mode if the focus is not
797 // adjustable. If the camera has auto-focus, this mode can fix the
798 // focus, which is usually at hyperfocal distance. Applications should
799 // not call CameraHardwareInterface.autoFocus in this mode.
800 static const char FOCUS_MODE_FIXED[];
801 // Extended depth of field (EDOF). Focusing is done digitally and
802 // continuously. Applications should not call
803 // CameraHardwareInterface.autoFocus in this mode.
804 static const char FOCUS_MODE_EDOF[];
805 // Continuous auto focus mode intended for video recording. The camera
806 // continuously tries to focus. This is the best choice for video
807 // recording because the focus changes smoothly . Applications still can
808 // call CameraHardwareInterface.takePicture in this mode but the subject may
809 // not be in focus. Auto focus starts when the parameter is set.
810 //
811 // Applications can call CameraHardwareInterface.autoFocus in this mode. The
812 // focus callback will immediately return with a boolean that indicates
813 // whether the focus is sharp or not. The focus position is locked after
814 // autoFocus call. If applications want to resume the continuous focus,
815 // cancelAutoFocus must be called. Restarting the preview will not resume
816 // the continuous autofocus. To stop continuous focus, applications should
817 // change the focus mode to other modes.
818 static const char FOCUS_MODE_CONTINUOUS_VIDEO[];
819 // Continuous auto focus mode intended for taking pictures. The camera
820 // continuously tries to focus. The speed of focus change is more aggressive
821 // than FOCUS_MODE_CONTINUOUS_VIDEO. Auto focus starts when the parameter is
822 // set.
823 //
824 // Applications can call CameraHardwareInterface.autoFocus in this mode. If
825 // the autofocus is in the middle of scanning, the focus callback will
826 // return when it completes. If the autofocus is not scanning, focus
827 // callback will immediately return with a boolean that indicates whether
828 // the focus is sharp or not. The apps can then decide if they want to take
829 // a picture immediately or to change the focus mode to auto, and run a full
830 // autofocus cycle. The focus position is locked after autoFocus call. If
831 // applications want to resume the continuous focus, cancelAutoFocus must be
832 // called. Restarting the preview will not resume the continuous autofocus.
833 // To stop continuous focus, applications should change the focus mode to
834 // other modes.
835 static const char FOCUS_MODE_CONTINUOUS_PICTURE[];
836
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800837#ifdef QCOM_HARDWARE
xkonnicb9bc7f2012-08-09 11:05:39 +0200838 static const char FOCUS_MODE_CONTINUOUS_CAMERA[];
839
840 // Values for Continuous AF
841 static const char CAF_OFF[] ;
842 static const char CAF_ON[] ;
843 // Proprietaries from CodeAurora use these...
844 static const char CONTINUOUS_AF_OFF[] ;
845 static const char CONTINUOUS_AF_ON[] ;
846 static const char KEY_CONTINUOUS_AF[] ;
847
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800848 // Normal focus mode. Applications should call
849 // CameraHardwareInterface.autoFocus to start the focus in this mode.
850 static const char FOCUS_MODE_NORMAL[];
851 static const char ISO_AUTO[];
852 static const char ISO_HJR[] ;
853 static const char ISO_100[];
854 static const char ISO_200[] ;
855 static const char ISO_400[];
856 static const char ISO_800[];
857 static const char ISO_1600[];
Emerson Pinter4eec1382012-11-27 09:13:34 -0200858 static const char ISO_3200[];
859 static const char ISO_6400[];
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800860 // Values for Lens Shading
861 static const char LENSSHADE_ENABLE[] ;
862 static const char LENSSHADE_DISABLE[] ;
863
864 // Values for auto exposure settings.
865 static const char AUTO_EXPOSURE_FRAME_AVG[];
866 static const char AUTO_EXPOSURE_CENTER_WEIGHTED[];
867 static const char AUTO_EXPOSURE_SPOT_METERING[];
868
869 static const char KEY_SHARPNESS[];
870 static const char KEY_MAX_SHARPNESS[];
xkonnicb9bc7f2012-08-09 11:05:39 +0200871#ifdef QCOM_HARDWARE
872 static const char KEY_MIN_SHARPNESS[];
873#endif
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800874 static const char KEY_CONTRAST[];
875 static const char KEY_MAX_CONTRAST[];
xkonnicb9bc7f2012-08-09 11:05:39 +0200876#ifdef QCOM_HARDWARE
877 static const char KEY_MIN_CONTRAST[];
878#endif
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800879 static const char KEY_SATURATION[];
880 static const char KEY_MAX_SATURATION[];
xkonnicb9bc7f2012-08-09 11:05:39 +0200881#ifdef QCOM_HARDWARE
882 static const char KEY_MIN_SATURATION[];
883#endif
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800884
885 static const char KEY_HISTOGRAM[] ;
886 static const char KEY_SUPPORTED_HISTOGRAM_MODES[] ;
887 // Values for HISTOGRAM
888 static const char HISTOGRAM_ENABLE[] ;
889 static const char HISTOGRAM_DISABLE[] ;
890
891 // Values for SKIN TONE ENHANCEMENT
892 static const char SKIN_TONE_ENHANCEMENT_ENABLE[] ;
893 static const char SKIN_TONE_ENHANCEMENT_DISABLE[] ;
894
895 // Values for Denoise
896 static const char DENOISE_OFF[] ;
897 static const char DENOISE_ON[] ;
898
899 // Values for auto exposure settings.
900 static const char SELECTABLE_ZONE_AF_AUTO[];
901 static const char SELECTABLE_ZONE_AF_SPOT_METERING[];
902 static const char SELECTABLE_ZONE_AF_CENTER_WEIGHTED[];
903 static const char SELECTABLE_ZONE_AF_FRAME_AVERAGE[];
904
905 // Values for Face Detection settings.
906 static const char FACE_DETECTION_OFF[];
907 static const char FACE_DETECTION_ON[];
908
909 // Values for MCE settings.
910 static const char MCE_ENABLE[];
911 static const char MCE_DISABLE[];
912
913 // Values for ZSL settings.
914 static const char ZSL_OFF[];
915 static const char ZSL_ON[];
916
917 // Values for HDR Bracketing settings.
918 static const char AE_BRACKET_HDR_OFF[];
919 static const char AE_BRACKET_HDR[];
920 static const char AE_BRACKET[];
921
922 // Values for HFR settings.
923 static const char VIDEO_HFR_OFF[];
924 static const char VIDEO_HFR_2X[];
925 static const char VIDEO_HFR_3X[];
926 static const char VIDEO_HFR_4X[];
927
928 // Values for Redeye Reduction settings.
929 static const char REDEYE_REDUCTION_ENABLE[];
930 static const char REDEYE_REDUCTION_DISABLE[];
931 // Values for HDR settings.
932 static const char HDR_ENABLE[];
933 static const char HDR_DISABLE[];
934
935 // Values for Redeye Reduction settings.
936 // static const char REDEYE_REDUCTION_ENABLE[];
937 // static const char REDEYE_REDUCTION_DISABLE[];
938 // Values for HDR settings.
939 // static const char HDR_ENABLE[];
940 // static const char HDR_DISABLE[];
941
942 enum {
943 CAMERA_ORIENTATION_UNKNOWN = 0,
944 CAMERA_ORIENTATION_PORTRAIT = 1,
945 CAMERA_ORIENTATION_LANDSCAPE = 2,
946 };
947 int getOrientation() const;
948 void setOrientation(int orientation);
949 void setPreviewFpsRange(int minFPS,int maxFPS);
Ed Carrigandaa94b62012-09-04 22:13:43 -0700950 void setPostviewSize(int x, int y);
Ankit Premrajka140a9ac2011-11-21 19:25:02 -0800951 void getSupportedHfrSizes(Vector<Size> &sizes) const;
952#endif
953
Eino-Ville Talvalac2d64272012-05-15 15:38:27 -0700954private:
955 DefaultKeyedVector<String8,String8> mMap;
956};
957
958}; // namespace android
959
960#endif