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