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