Zvikomborero VIncent Zvikaramba | b8244e3 | 2016-08-18 13:51:48 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 The CyanogenMod 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 | #define CAMERA_PARAMETERS_EXTRA_C \ |
| 18 | const char CameraParameters::KEY_SUPPORTED_ISO_MODES[] = "iso-values"; \ |
| 19 | const char CameraParameters::KEY_DIS[] = "dis"; \ |
| 20 | const char CameraParameters::DIS_DISABLE[] = "disable"; \ |
| 21 | const char CameraParameters::KEY_FACE_DETECTION[] = "face-detection"; \ |
| 22 | const char CameraParameters::KEY_SUPPORTED_FACE_DETECTION[] = "face-detection-values"; \ |
| 23 | const char CameraParameters::FACE_DETECTION_OFF[] = "off"; \ |
| 24 | const char CameraParameters::FACE_DETECTION_ON[] = "on"; \ |
| 25 | const char CameraParameters::KEY_ZSL[] = "zsl"; \ |
| 26 | const char CameraParameters::KEY_SUPPORTED_ZSL_MODES[] = "zsl-values"; \ |
| 27 | const char CameraParameters::ZSL_OFF[] = "off"; \ |
| 28 | const char CameraParameters::ZSL_ON[] = "on"; \ |
| 29 | const char CameraParameters::KEY_ISO_MODE[] = "iso"; \ |
| 30 | const char CameraParameters::KEY_CAMERA_MODE[] = "camera-mode"; \ |
| 31 | const char CameraParameters::KEY_SAMSUNG_CAMERA_MODE[] = "cam_mode"; \ |
| 32 | const char CameraParameters::KEY_SELECTABLE_ZONE_AF[] = "selectable-zone-af"; \ |
| 33 | const char CameraParameters::KEY_SUPPORTED_SELECTABLE_ZONE_AF[] = "selectable-zone-af-values"; \ |
| 34 | const char CameraParameters::SELECTABLE_ZONE_AF_AUTO[] = "auto"; \ |
| 35 | const char CameraParameters::SELECTABLE_ZONE_AF_SPOT_METERING[] = "spot-metering"; \ |
| 36 | const char CameraParameters::SELECTABLE_ZONE_AF_CENTER_WEIGHTED[] = "center-weighted"; \ |
| 37 | const char CameraParameters::SELECTABLE_ZONE_AF_FRAME_AVERAGE[] = "frame-average"; \ |
| 38 | const char CameraParameters::KEY_PREVIEW_FRAME_RATE_MODE[] = "preview-frame-rate-mode"; \ |
| 39 | const char CameraParameters::KEY_SUPPORTED_PREVIEW_FRAME_RATE_MODES[] = "preview-frame-rate-modes"; \ |
| 40 | const char CameraParameters::KEY_PREVIEW_FRAME_RATE_AUTO_MODE[] = "frame-rate-auto"; \ |
| 41 | const char CameraParameters::KEY_PREVIEW_FRAME_RATE_FIXED_MODE[] = "frame-rate-fixed"; \ |
| 42 | const char CameraParameters::KEY_SHARPNESS[] = "sharpness"; \ |
| 43 | const char CameraParameters::KEY_SATURATION[] = "saturation"; \ |
| 44 | const char CameraParameters::KEY_CONTRAST[] = "contrast"; \ |
| 45 | const char CameraParameters::KEY_SCENE_DETECT[] = "scene-detect"; \ |
| 46 | const char CameraParameters::KEY_SUPPORTED_SCENE_DETECT[] = "scene-detect-values"; \ |
| 47 | const char CameraParameters::SCENE_DETECT_OFF[] = "off"; \ |
| 48 | const char CameraParameters::SCENE_DETECT_ON[] = "on"; \ |
| 49 | const char CameraParameters::KEY_WEATHER[] = "weather"; \ |
| 50 | const char CameraParameters::KEY_CITYID[] = "contextualtag-cityid"; \ |
| 51 | const char CameraParameters::KEY_TOUCH_AF_AEC[] = "touch-af-aec"; \ |
| 52 | const char CameraParameters::KEY_SUPPORTED_TOUCH_AF_AEC[] = "touch-af-aec-values"; \ |
| 53 | const char CameraParameters::TOUCH_AF_AEC_OFF[] = "touch-off"; \ |
| 54 | const char CameraParameters::TOUCH_AF_AEC_ON[] = "touch-on"; \ |
| 55 | const char CameraParameters::KEY_MEMORY_COLOR_ENHANCEMENT[] = "mce"; \ |
| 56 | const char CameraParameters::KEY_LENSSHADE[] = "lensshade"; \ |
| 57 | const char CameraParameters::KEY_REDEYE_REDUCTION[] = "redeye-reduction"; \ |
| 58 | const char CameraParameters::KEY_SUPPORTED_REDEYE_REDUCTION[] = "redeye-reduction-values"; \ |
| 59 | const char CameraParameters::REDEYE_REDUCTION_ENABLE[] = "enable"; \ |
| 60 | const char CameraParameters::REDEYE_REDUCTION_DISABLE[] = "disable"; \ |
| 61 | const char CameraParameters::KEY_GPS_LATITUDE_REF[] = "gps-latitude-ref"; \ |
| 62 | const char CameraParameters::KEY_GPS_LONGITUDE_REF[] = "gps-longitude-ref"; \ |
| 63 | const char CameraParameters::KEY_GPS_ALTITUDE_REF[] = "gps-altitude-ref"; \ |
| 64 | const char CameraParameters::KEY_GPS_STATUS[] = "gps-status"; \ |
| 65 | const char CameraParameters::KEY_EXIF_DATETIME[] = "exif-datetime"; \ |
| 66 | const char CameraParameters::KEY_AUTO_EXPOSURE[] = "auto-exposure"; \ |
| 67 | const char CameraParameters::KEY_SUPPORTED_AUTO_EXPOSURE[] = "auto-exposure-values"; \ |
| 68 | const char CameraParameters::KEY_SUPPORTED_LENSSHADE_MODES[] = "lensshade-values"; \ |
| 69 | const char CameraParameters::LENSSHADE_ENABLE[] = "enable"; \ |
| 70 | const char CameraParameters::LENSSHADE_DISABLE[] = "disable"; \ |
| 71 | const char CameraParameters::MCE_ENABLE[] = "enable"; \ |
| 72 | const char CameraParameters::MCE_DISABLE[] = "disable"; \ |
| 73 | const char CameraParameters::ISO_AUTO[] = "auto"; \ |
| 74 | const char CameraParameters::ISO_HJR[] = "ISO_HJR"; \ |
| 75 | const char CameraParameters::ISO_100[] = "ISO100"; \ |
| 76 | const char CameraParameters::ISO_200[] = "ISO200"; \ |
| 77 | const char CameraParameters::ISO_400[] = "ISO400"; \ |
| 78 | const char CameraParameters::ISO_800[] = "ISO800"; \ |
| 79 | const char CameraParameters::ISO_1600[] = "ISO1600"; \ |
| 80 | const char CameraParameters::ISO_3200[] = "ISO3200"; \ |
| 81 | const char CameraParameters::ISO_6400[] = "ISO6400"; \ |
| 82 | const char CameraParameters::KEY_SUPPORTED_HFR_SIZES[] = "hfr-size-values"; \ |
| 83 | const char CameraParameters::KEY_SUPPORTED_MEM_COLOR_ENHANCE_MODES[] = "mce-values"; \ |
| 84 | const char CameraParameters::VIDEO_HFR_OFF[] = "off"; \ |
| 85 | const char CameraParameters::VIDEO_HFR_2X[] = "60"; \ |
| 86 | const char CameraParameters::VIDEO_HFR_3X[] = "90"; \ |
| 87 | const char CameraParameters::VIDEO_HFR_4X[] = "120"; \ |
| 88 | const char CameraParameters::KEY_VIDEO_HIGH_FRAME_RATE[] = "video-hfr"; \ |
| 89 | const char CameraParameters::KEY_SUPPORTED_VIDEO_HIGH_FRAME_RATE_MODES[] = "video-hfr-values"; \ |
| 90 | const char CameraParameters::KEY_HISTOGRAM[] = "histogram"; \ |
| 91 | const char CameraParameters::KEY_SUPPORTED_HISTOGRAM_MODES[] = "histogram-values"; \ |
| 92 | const char CameraParameters::HISTOGRAM_ENABLE[] = "enable"; \ |
| 93 | const char CameraParameters::HISTOGRAM_DISABLE[] = "disable"; \ |
| 94 | const char CameraParameters::SKIN_TONE_ENHANCEMENT_ENABLE[] = "enable"; \ |
| 95 | const char CameraParameters::SKIN_TONE_ENHANCEMENT_DISABLE[] = "disable"; \ |
| 96 | const char CameraParameters::KEY_SKIN_TONE_ENHANCEMENT[] = "skinToneEnhancement"; \ |
| 97 | const char CameraParameters::KEY_SUPPORTED_SKIN_TONE_ENHANCEMENT_MODES[] = "skinToneEnhancement-values"; \ |
| 98 | const char CameraParameters::DENOISE_OFF[] = "denoise-off"; \ |
| 99 | const char CameraParameters::DENOISE_ON[] = "denoise-on"; \ |
| 100 | const char CameraParameters::KEY_DENOISE[] = "denoise"; \ |
| 101 | const char CameraParameters::KEY_SUPPORTED_DENOISE[] = "denoise-values"; \ |
| 102 | const char CameraParameters::EFFECT_EMBOSS[] = "emboss"; \ |
| 103 | const char CameraParameters::EFFECT_SKETCH[] = "sketch"; \ |
| 104 | const char CameraParameters::EFFECT_NEON[] = "neon"; \ |
| 105 | const char CameraParameters::SCENE_MODE_FLOWERS[] = "flowers"; \ |
| 106 | const char CameraParameters::SCENE_MODE_AR[] = "AR"; \ |
| 107 | const char CameraParameters::PIXEL_FORMAT_YUV420SP_ADRENO[] = "yuv420sp-adreno"; \ |
| 108 | const char CameraParameters::PIXEL_FORMAT_RAW[] = "raw"; \ |
| 109 | const char CameraParameters::PIXEL_FORMAT_YV12[] = "yuv420p"; \ |
| 110 | const char CameraParameters::PIXEL_FORMAT_NV12[] = "nv12"; \ |
| 111 | const char CameraParameters::EFFECT_CARTOONIZE[] = "cartoonize"; \ |
| 112 | const char CameraParameters::EFFECT_POINT_RED_YELLOW[] = "point-red-yellow"; \ |
| 113 | const char CameraParameters::EFFECT_POINT_GREEN[] = "point-green"; \ |
| 114 | const char CameraParameters::EFFECT_POINT_BLUE[] = "point-blue"; \ |
| 115 | const char CameraParameters::EFFECT_VINTAGE_COLD[] = "vintage-cold"; \ |
| 116 | const char CameraParameters::EFFECT_VINTAGE_WARM[] = "vintage-warm"; \ |
| 117 | const char CameraParameters::EFFECT_WASHED[] = "washed"; \ |
| 118 | const char CameraParameters::SCENE_MODE_BACKLIGHT[] = "backlight"; \ |
| 119 | const char CameraParameters::SCENE_MODE_ASD[] = "asd"; \ |
| 120 | int CameraParameters::getInt64(const char *key) const { return -1; }; \ |
| 121 | const char *CameraParameters::getPreviewFrameRateMode() const { return get(KEY_PREVIEW_FRAME_RATE_MODE); }; \ |
| 122 | void CameraParameters::setPreviewFrameRateMode(const char *mode) { set(KEY_PREVIEW_FRAME_RATE_MODE, mode); }; \ |
| 123 | void CameraParameters::getMeteringAreaCenter(int *x, int *y) const { }; \ |
| 124 | void CameraParameters::setTouchIndexAec(int x, int y) { }; \ |
| 125 | void CameraParameters::setTouchIndexAf(int x, int y) { }; \ |
| 126 | void CameraParameters::setPreviewFpsRange(int minFPS, int maxFPS) { }; |
| 127 | |
| 128 | #define CAMERA_PARAMETERS_EXTRA_H \ |
| 129 | static const char KEY_SUPPORTED_ISO_MODES[]; \ |
| 130 | static const char KEY_DIS[]; \ |
| 131 | static const char DIS_DISABLE[]; \ |
| 132 | static const char KEY_FACE_DETECTION[]; \ |
| 133 | static const char KEY_SUPPORTED_FACE_DETECTION[]; \ |
| 134 | static const char FACE_DETECTION_OFF[]; \ |
| 135 | static const char FACE_DETECTION_ON[]; \ |
| 136 | static const char KEY_ZSL[]; \ |
| 137 | static const char KEY_SUPPORTED_ZSL_MODES[]; \ |
| 138 | static const char ZSL_OFF[]; \ |
| 139 | static const char ZSL_ON[]; \ |
| 140 | static const char KEY_ISO_MODE[]; \ |
| 141 | static const char KEY_CAMERA_MODE[]; \ |
| 142 | static const char KEY_SAMSUNG_CAMERA_MODE[]; \ |
| 143 | static const char KEY_SELECTABLE_ZONE_AF[]; \ |
| 144 | static const char KEY_SUPPORTED_SELECTABLE_ZONE_AF[]; \ |
| 145 | static const char SELECTABLE_ZONE_AF_AUTO[]; \ |
| 146 | static const char SELECTABLE_ZONE_AF_SPOT_METERING[]; \ |
| 147 | static const char SELECTABLE_ZONE_AF_CENTER_WEIGHTED[]; \ |
| 148 | static const char SELECTABLE_ZONE_AF_FRAME_AVERAGE[]; \ |
| 149 | static const char KEY_PREVIEW_FRAME_RATE_MODE[]; \ |
| 150 | static const char KEY_SUPPORTED_PREVIEW_FRAME_RATE_MODES[]; \ |
| 151 | static const char KEY_PREVIEW_FRAME_RATE_AUTO_MODE[]; \ |
| 152 | static const char KEY_PREVIEW_FRAME_RATE_FIXED_MODE[]; \ |
| 153 | static const char KEY_SHARPNESS[]; \ |
| 154 | static const char KEY_SATURATION[]; \ |
| 155 | static const char KEY_CONTRAST[]; \ |
| 156 | static const char KEY_SCENE_DETECT[]; \ |
| 157 | static const char KEY_SUPPORTED_SCENE_DETECT[]; \ |
| 158 | static const char SCENE_DETECT_OFF[]; \ |
| 159 | static const char SCENE_DETECT_ON[]; \ |
| 160 | static const char KEY_WEATHER[]; \ |
| 161 | static const char KEY_CITYID[]; \ |
| 162 | static const char KEY_TOUCH_AF_AEC[]; \ |
| 163 | static const char KEY_SUPPORTED_TOUCH_AF_AEC[]; \ |
| 164 | static const char TOUCH_AF_AEC_OFF[]; \ |
| 165 | static const char TOUCH_AF_AEC_ON[]; \ |
| 166 | static const char KEY_MEMORY_COLOR_ENHANCEMENT[]; \ |
| 167 | static const char KEY_LENSSHADE[]; \ |
| 168 | static const char KEY_REDEYE_REDUCTION[]; \ |
| 169 | static const char KEY_SUPPORTED_REDEYE_REDUCTION[]; \ |
| 170 | static const char REDEYE_REDUCTION_ENABLE[]; \ |
| 171 | static const char REDEYE_REDUCTION_DISABLE[]; \ |
| 172 | static const char KEY_GPS_LATITUDE_REF[]; \ |
| 173 | static const char KEY_GPS_LONGITUDE_REF[]; \ |
| 174 | static const char KEY_GPS_ALTITUDE_REF[]; \ |
| 175 | static const char KEY_GPS_STATUS[]; \ |
| 176 | static const char KEY_EXIF_DATETIME[]; \ |
| 177 | static const char KEY_AUTO_EXPOSURE[]; \ |
| 178 | static const char KEY_SUPPORTED_AUTO_EXPOSURE[]; \ |
| 179 | static const char KEY_SUPPORTED_LENSSHADE_MODES[]; \ |
| 180 | static const char LENSSHADE_ENABLE[]; \ |
| 181 | static const char LENSSHADE_DISABLE[]; \ |
| 182 | static const char MCE_ENABLE[]; \ |
| 183 | static const char MCE_DISABLE[]; \ |
| 184 | static const char ISO_AUTO[]; \ |
| 185 | static const char ISO_HJR[]; \ |
| 186 | static const char ISO_100[]; \ |
| 187 | static const char ISO_200[]; \ |
| 188 | static const char ISO_400[]; \ |
| 189 | static const char ISO_800[]; \ |
| 190 | static const char ISO_1600[]; \ |
| 191 | static const char ISO_3200[]; \ |
| 192 | static const char ISO_6400[]; \ |
| 193 | static const char KEY_SUPPORTED_HFR_SIZES[]; \ |
| 194 | static const char KEY_SUPPORTED_MEM_COLOR_ENHANCE_MODES[]; \ |
| 195 | static const char VIDEO_HFR_OFF[]; \ |
| 196 | static const char VIDEO_HFR_2X[]; \ |
| 197 | static const char VIDEO_HFR_3X[]; \ |
| 198 | static const char VIDEO_HFR_4X[]; \ |
| 199 | static const char KEY_VIDEO_HIGH_FRAME_RATE[]; \ |
| 200 | static const char KEY_SUPPORTED_VIDEO_HIGH_FRAME_RATE_MODES[]; \ |
| 201 | static const char KEY_HISTOGRAM[]; \ |
| 202 | static const char KEY_SUPPORTED_HISTOGRAM_MODES[]; \ |
| 203 | static const char HISTOGRAM_ENABLE[]; \ |
| 204 | static const char HISTOGRAM_DISABLE[]; \ |
| 205 | static const char SKIN_TONE_ENHANCEMENT_ENABLE[]; \ |
| 206 | static const char SKIN_TONE_ENHANCEMENT_DISABLE[]; \ |
| 207 | static const char KEY_SKIN_TONE_ENHANCEMENT[]; \ |
| 208 | static const char KEY_SUPPORTED_SKIN_TONE_ENHANCEMENT_MODES[]; \ |
| 209 | static const char DENOISE_OFF[]; \ |
| 210 | static const char DENOISE_ON[]; \ |
| 211 | static const char KEY_DENOISE[]; \ |
| 212 | static const char KEY_SUPPORTED_DENOISE[]; \ |
| 213 | static const char EFFECT_EMBOSS[]; \ |
| 214 | static const char EFFECT_SKETCH[]; \ |
| 215 | static const char EFFECT_NEON[]; \ |
| 216 | static const char SCENE_MODE_FLOWERS[]; \ |
| 217 | static const char SCENE_MODE_AR[]; \ |
| 218 | static const char PIXEL_FORMAT_YUV420SP_ADRENO[]; \ |
| 219 | static const char PIXEL_FORMAT_RAW[]; \ |
| 220 | static const char PIXEL_FORMAT_YV12[]; \ |
| 221 | static const char PIXEL_FORMAT_NV12[]; \ |
| 222 | static const char EFFECT_CARTOONIZE[]; \ |
| 223 | static const char EFFECT_POINT_RED_YELLOW[]; \ |
| 224 | static const char EFFECT_POINT_GREEN[]; \ |
| 225 | static const char EFFECT_POINT_BLUE[]; \ |
| 226 | static const char EFFECT_VINTAGE_COLD[]; \ |
| 227 | static const char EFFECT_VINTAGE_WARM[]; \ |
| 228 | static const char EFFECT_WASHED[]; \ |
| 229 | static const char SCENE_MODE_BACKLIGHT[]; \ |
| 230 | static const char SCENE_MODE_ASD[]; \ |
| 231 | int getInt64(const char *key) const; \ |
| 232 | const char *getPreviewFrameRateMode() const; \ |
| 233 | void setPreviewFrameRateMode(const char *mode); \ |
| 234 | void getMeteringAreaCenter(int *x, int *y) const; \ |
| 235 | void setTouchIndexAec(int x, int y); \ |
| 236 | void setTouchIndexAf(int x, int y); \ |
| 237 | void setPreviewFpsRange(int minFPS, int maxFPS); |