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