blob: 350888af91dec390249c5db49244c219cfa7072d [file] [log] [blame]
Zvikomborero VIncent Zvikarambab8244e32016-08-18 13:51:48 -04001/*
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 \
18const char CameraParameters::KEY_SUPPORTED_ISO_MODES[] = "iso-values"; \
19const char CameraParameters::KEY_DIS[] = "dis"; \
20const char CameraParameters::DIS_DISABLE[] = "disable"; \
21const char CameraParameters::KEY_FACE_DETECTION[] = "face-detection"; \
22const char CameraParameters::KEY_SUPPORTED_FACE_DETECTION[] = "face-detection-values"; \
23const char CameraParameters::FACE_DETECTION_OFF[] = "off"; \
24const char CameraParameters::FACE_DETECTION_ON[] = "on"; \
25const char CameraParameters::KEY_ZSL[] = "zsl"; \
26const char CameraParameters::KEY_SUPPORTED_ZSL_MODES[] = "zsl-values"; \
27const char CameraParameters::ZSL_OFF[] = "off"; \
28const char CameraParameters::ZSL_ON[] = "on"; \
29const char CameraParameters::KEY_ISO_MODE[] = "iso"; \
30const char CameraParameters::KEY_CAMERA_MODE[] = "camera-mode"; \
31const char CameraParameters::KEY_SAMSUNG_CAMERA_MODE[] = "cam_mode"; \
32const char CameraParameters::KEY_SELECTABLE_ZONE_AF[] = "selectable-zone-af"; \
33const char CameraParameters::KEY_SUPPORTED_SELECTABLE_ZONE_AF[] = "selectable-zone-af-values"; \
34const char CameraParameters::SELECTABLE_ZONE_AF_AUTO[] = "auto"; \
35const char CameraParameters::SELECTABLE_ZONE_AF_SPOT_METERING[] = "spot-metering"; \
36const char CameraParameters::SELECTABLE_ZONE_AF_CENTER_WEIGHTED[] = "center-weighted"; \
37const char CameraParameters::SELECTABLE_ZONE_AF_FRAME_AVERAGE[] = "frame-average"; \
38const char CameraParameters::KEY_PREVIEW_FRAME_RATE_MODE[] = "preview-frame-rate-mode"; \
39const char CameraParameters::KEY_SUPPORTED_PREVIEW_FRAME_RATE_MODES[] = "preview-frame-rate-modes"; \
40const char CameraParameters::KEY_PREVIEW_FRAME_RATE_AUTO_MODE[] = "frame-rate-auto"; \
41const char CameraParameters::KEY_PREVIEW_FRAME_RATE_FIXED_MODE[] = "frame-rate-fixed"; \
42const char CameraParameters::KEY_SHARPNESS[] = "sharpness"; \
43const char CameraParameters::KEY_SATURATION[] = "saturation"; \
44const char CameraParameters::KEY_CONTRAST[] = "contrast"; \
45const char CameraParameters::KEY_SCENE_DETECT[] = "scene-detect"; \
46const char CameraParameters::KEY_SUPPORTED_SCENE_DETECT[] = "scene-detect-values"; \
47const char CameraParameters::SCENE_DETECT_OFF[] = "off"; \
48const char CameraParameters::SCENE_DETECT_ON[] = "on"; \
49const char CameraParameters::KEY_WEATHER[] = "weather"; \
50const char CameraParameters::KEY_CITYID[] = "contextualtag-cityid"; \
51const char CameraParameters::KEY_TOUCH_AF_AEC[] = "touch-af-aec"; \
52const char CameraParameters::KEY_SUPPORTED_TOUCH_AF_AEC[] = "touch-af-aec-values"; \
53const char CameraParameters::TOUCH_AF_AEC_OFF[] = "touch-off"; \
54const char CameraParameters::TOUCH_AF_AEC_ON[] = "touch-on"; \
55const char CameraParameters::KEY_MEMORY_COLOR_ENHANCEMENT[] = "mce"; \
56const char CameraParameters::KEY_LENSSHADE[] = "lensshade"; \
57const char CameraParameters::KEY_REDEYE_REDUCTION[] = "redeye-reduction"; \
58const char CameraParameters::KEY_SUPPORTED_REDEYE_REDUCTION[] = "redeye-reduction-values"; \
59const char CameraParameters::REDEYE_REDUCTION_ENABLE[] = "enable"; \
60const char CameraParameters::REDEYE_REDUCTION_DISABLE[] = "disable"; \
61const char CameraParameters::KEY_GPS_LATITUDE_REF[] = "gps-latitude-ref"; \
62const char CameraParameters::KEY_GPS_LONGITUDE_REF[] = "gps-longitude-ref"; \
63const char CameraParameters::KEY_GPS_ALTITUDE_REF[] = "gps-altitude-ref"; \
64const char CameraParameters::KEY_GPS_STATUS[] = "gps-status"; \
65const char CameraParameters::KEY_EXIF_DATETIME[] = "exif-datetime"; \
66const char CameraParameters::KEY_AUTO_EXPOSURE[] = "auto-exposure"; \
67const char CameraParameters::KEY_SUPPORTED_AUTO_EXPOSURE[] = "auto-exposure-values"; \
68const char CameraParameters::KEY_SUPPORTED_LENSSHADE_MODES[] = "lensshade-values"; \
69const char CameraParameters::LENSSHADE_ENABLE[] = "enable"; \
70const char CameraParameters::LENSSHADE_DISABLE[] = "disable"; \
71const char CameraParameters::MCE_ENABLE[] = "enable"; \
72const char CameraParameters::MCE_DISABLE[] = "disable"; \
73const char CameraParameters::ISO_AUTO[] = "auto"; \
74const char CameraParameters::ISO_HJR[] = "ISO_HJR"; \
75const char CameraParameters::ISO_100[] = "ISO100"; \
76const char CameraParameters::ISO_200[] = "ISO200"; \
77const char CameraParameters::ISO_400[] = "ISO400"; \
78const char CameraParameters::ISO_800[] = "ISO800"; \
79const char CameraParameters::ISO_1600[] = "ISO1600"; \
80const char CameraParameters::ISO_3200[] = "ISO3200"; \
81const char CameraParameters::ISO_6400[] = "ISO6400"; \
82const char CameraParameters::KEY_SUPPORTED_HFR_SIZES[] = "hfr-size-values"; \
83const char CameraParameters::KEY_SUPPORTED_MEM_COLOR_ENHANCE_MODES[] = "mce-values"; \
84const char CameraParameters::VIDEO_HFR_OFF[] = "off"; \
85const char CameraParameters::VIDEO_HFR_2X[] = "60"; \
86const char CameraParameters::VIDEO_HFR_3X[] = "90"; \
87const char CameraParameters::VIDEO_HFR_4X[] = "120"; \
88const char CameraParameters::KEY_VIDEO_HIGH_FRAME_RATE[] = "video-hfr"; \
89const char CameraParameters::KEY_SUPPORTED_VIDEO_HIGH_FRAME_RATE_MODES[] = "video-hfr-values"; \
90const char CameraParameters::KEY_HISTOGRAM[] = "histogram"; \
91const char CameraParameters::KEY_SUPPORTED_HISTOGRAM_MODES[] = "histogram-values"; \
92const char CameraParameters::HISTOGRAM_ENABLE[] = "enable"; \
93const char CameraParameters::HISTOGRAM_DISABLE[] = "disable"; \
94const char CameraParameters::SKIN_TONE_ENHANCEMENT_ENABLE[] = "enable"; \
95const char CameraParameters::SKIN_TONE_ENHANCEMENT_DISABLE[] = "disable"; \
96const char CameraParameters::KEY_SKIN_TONE_ENHANCEMENT[] = "skinToneEnhancement"; \
97const char CameraParameters::KEY_SUPPORTED_SKIN_TONE_ENHANCEMENT_MODES[] = "skinToneEnhancement-values"; \
98const char CameraParameters::DENOISE_OFF[] = "denoise-off"; \
99const char CameraParameters::DENOISE_ON[] = "denoise-on"; \
100const char CameraParameters::KEY_DENOISE[] = "denoise"; \
101const char CameraParameters::KEY_SUPPORTED_DENOISE[] = "denoise-values"; \
102const char CameraParameters::EFFECT_EMBOSS[] = "emboss"; \
103const char CameraParameters::EFFECT_SKETCH[] = "sketch"; \
104const char CameraParameters::EFFECT_NEON[] = "neon"; \
105const char CameraParameters::SCENE_MODE_FLOWERS[] = "flowers"; \
106const char CameraParameters::SCENE_MODE_AR[] = "AR"; \
107const char CameraParameters::PIXEL_FORMAT_YUV420SP_ADRENO[] = "yuv420sp-adreno"; \
108const char CameraParameters::PIXEL_FORMAT_RAW[] = "raw"; \
109const char CameraParameters::PIXEL_FORMAT_YV12[] = "yuv420p"; \
110const char CameraParameters::PIXEL_FORMAT_NV12[] = "nv12"; \
111const char CameraParameters::EFFECT_CARTOONIZE[] = "cartoonize"; \
112const char CameraParameters::EFFECT_POINT_RED_YELLOW[] = "point-red-yellow"; \
113const char CameraParameters::EFFECT_POINT_GREEN[] = "point-green"; \
114const char CameraParameters::EFFECT_POINT_BLUE[] = "point-blue"; \
115const char CameraParameters::EFFECT_VINTAGE_COLD[] = "vintage-cold"; \
116const char CameraParameters::EFFECT_VINTAGE_WARM[] = "vintage-warm"; \
117const char CameraParameters::EFFECT_WASHED[] = "washed"; \
118const char CameraParameters::SCENE_MODE_BACKLIGHT[] = "backlight"; \
119const char CameraParameters::SCENE_MODE_ASD[] = "asd"; \
120int CameraParameters::getInt64(const char *key) const { return -1; }; \
121const char *CameraParameters::getPreviewFrameRateMode() const { return get(KEY_PREVIEW_FRAME_RATE_MODE); }; \
122void CameraParameters::setPreviewFrameRateMode(const char *mode) { set(KEY_PREVIEW_FRAME_RATE_MODE, mode); }; \
123void CameraParameters::getMeteringAreaCenter(int *x, int *y) const { }; \
124void CameraParameters::setTouchIndexAec(int x, int y) { }; \
125void CameraParameters::setTouchIndexAf(int x, int y) { }; \
126void 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);