1 /*
2  * Copyright (C) 2012 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 /**
18  * !! Do not reference this file directly !!
19  *
20  * It is logically a part of camera_metadata.c.  It is broken out for ease of
21  * maintaining the tag info.
22  *
23  * Array assignments are done using specified-index syntax to keep things in
24  * sync with camera_metadata_tags.h
25  */
26 
27 /**
28  * ! Do not edit this file directly !
29  *
30  * Generated automatically from camera_metadata_tag_info.mako
31  */
32 
33 const char *camera_metadata_section_names[ANDROID_SECTION_COUNT] = {
34     [ANDROID_COLOR_CORRECTION]     = "android.colorCorrection",
35     [ANDROID_CONTROL]              = "android.control",
36     [ANDROID_DEMOSAIC]             = "android.demosaic",
37     [ANDROID_EDGE]                 = "android.edge",
38     [ANDROID_FLASH]                = "android.flash",
39     [ANDROID_FLASH_INFO]           = "android.flash.info",
40     [ANDROID_HOT_PIXEL]            = "android.hotPixel",
41     [ANDROID_JPEG]                 = "android.jpeg",
42     [ANDROID_LENS]                 = "android.lens",
43     [ANDROID_LENS_INFO]            = "android.lens.info",
44     [ANDROID_NOISE_REDUCTION]      = "android.noiseReduction",
45     [ANDROID_QUIRKS]               = "android.quirks",
46     [ANDROID_REQUEST]              = "android.request",
47     [ANDROID_SCALER]               = "android.scaler",
48     [ANDROID_SENSOR]               = "android.sensor",
49     [ANDROID_SENSOR_INFO]          = "android.sensor.info",
50     [ANDROID_SHADING]              = "android.shading",
51     [ANDROID_STATISTICS]           = "android.statistics",
52     [ANDROID_STATISTICS_INFO]      = "android.statistics.info",
53     [ANDROID_TONEMAP]              = "android.tonemap",
54     [ANDROID_LED]                  = "android.led",
55     [ANDROID_INFO]                 = "android.info",
56     [ANDROID_BLACK_LEVEL]          = "android.blackLevel",
57     [ANDROID_SYNC]                 = "android.sync",
58     [ANDROID_REPROCESS]            = "android.reprocess",
59     [ANDROID_DEPTH]                = "android.depth",
60 };
61 
62 unsigned int camera_metadata_section_bounds[ANDROID_SECTION_COUNT][2] = {
63     [ANDROID_COLOR_CORRECTION]     = { ANDROID_COLOR_CORRECTION_START,
64                                        ANDROID_COLOR_CORRECTION_END },
65     [ANDROID_CONTROL]              = { ANDROID_CONTROL_START,
66                                        ANDROID_CONTROL_END },
67     [ANDROID_DEMOSAIC]             = { ANDROID_DEMOSAIC_START,
68                                        ANDROID_DEMOSAIC_END },
69     [ANDROID_EDGE]                 = { ANDROID_EDGE_START,
70                                        ANDROID_EDGE_END },
71     [ANDROID_FLASH]                = { ANDROID_FLASH_START,
72                                        ANDROID_FLASH_END },
73     [ANDROID_FLASH_INFO]           = { ANDROID_FLASH_INFO_START,
74                                        ANDROID_FLASH_INFO_END },
75     [ANDROID_HOT_PIXEL]            = { ANDROID_HOT_PIXEL_START,
76                                        ANDROID_HOT_PIXEL_END },
77     [ANDROID_JPEG]                 = { ANDROID_JPEG_START,
78                                        ANDROID_JPEG_END },
79     [ANDROID_LENS]                 = { ANDROID_LENS_START,
80                                        ANDROID_LENS_END },
81     [ANDROID_LENS_INFO]            = { ANDROID_LENS_INFO_START,
82                                        ANDROID_LENS_INFO_END },
83     [ANDROID_NOISE_REDUCTION]      = { ANDROID_NOISE_REDUCTION_START,
84                                        ANDROID_NOISE_REDUCTION_END },
85     [ANDROID_QUIRKS]               = { ANDROID_QUIRKS_START,
86                                        ANDROID_QUIRKS_END },
87     [ANDROID_REQUEST]              = { ANDROID_REQUEST_START,
88                                        ANDROID_REQUEST_END },
89     [ANDROID_SCALER]               = { ANDROID_SCALER_START,
90                                        ANDROID_SCALER_END },
91     [ANDROID_SENSOR]               = { ANDROID_SENSOR_START,
92                                        ANDROID_SENSOR_END },
93     [ANDROID_SENSOR_INFO]          = { ANDROID_SENSOR_INFO_START,
94                                        ANDROID_SENSOR_INFO_END },
95     [ANDROID_SHADING]              = { ANDROID_SHADING_START,
96                                        ANDROID_SHADING_END },
97     [ANDROID_STATISTICS]           = { ANDROID_STATISTICS_START,
98                                        ANDROID_STATISTICS_END },
99     [ANDROID_STATISTICS_INFO]      = { ANDROID_STATISTICS_INFO_START,
100                                        ANDROID_STATISTICS_INFO_END },
101     [ANDROID_TONEMAP]              = { ANDROID_TONEMAP_START,
102                                        ANDROID_TONEMAP_END },
103     [ANDROID_LED]                  = { ANDROID_LED_START,
104                                        ANDROID_LED_END },
105     [ANDROID_INFO]                 = { ANDROID_INFO_START,
106                                        ANDROID_INFO_END },
107     [ANDROID_BLACK_LEVEL]          = { ANDROID_BLACK_LEVEL_START,
108                                        ANDROID_BLACK_LEVEL_END },
109     [ANDROID_SYNC]                 = { ANDROID_SYNC_START,
110                                        ANDROID_SYNC_END },
111     [ANDROID_REPROCESS]            = { ANDROID_REPROCESS_START,
112                                        ANDROID_REPROCESS_END },
113     [ANDROID_DEPTH]                = { ANDROID_DEPTH_START,
114                                        ANDROID_DEPTH_END },
115 };
116 
117 static tag_info_t android_color_correction[ANDROID_COLOR_CORRECTION_END -
118         ANDROID_COLOR_CORRECTION_START] = {
119     [ ANDROID_COLOR_CORRECTION_MODE - ANDROID_COLOR_CORRECTION_START ] =
120     { "mode",                          TYPE_BYTE   },
121     [ ANDROID_COLOR_CORRECTION_TRANSFORM - ANDROID_COLOR_CORRECTION_START ] =
122     { "transform",                     TYPE_RATIONAL
123                 },
124     [ ANDROID_COLOR_CORRECTION_GAINS - ANDROID_COLOR_CORRECTION_START ] =
125     { "gains",                         TYPE_FLOAT  },
126     [ ANDROID_COLOR_CORRECTION_ABERRATION_MODE - ANDROID_COLOR_CORRECTION_START ] =
127     { "aberrationMode",                TYPE_BYTE   },
128     [ ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES - ANDROID_COLOR_CORRECTION_START ] =
129     { "availableAberrationModes",      TYPE_BYTE   },
130 };
131 
132 static tag_info_t android_control[ANDROID_CONTROL_END -
133         ANDROID_CONTROL_START] = {
134     [ ANDROID_CONTROL_AE_ANTIBANDING_MODE - ANDROID_CONTROL_START ] =
135     { "aeAntibandingMode",             TYPE_BYTE   },
136     [ ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION - ANDROID_CONTROL_START ] =
137     { "aeExposureCompensation",        TYPE_INT32  },
138     [ ANDROID_CONTROL_AE_LOCK - ANDROID_CONTROL_START ] =
139     { "aeLock",                        TYPE_BYTE   },
140     [ ANDROID_CONTROL_AE_MODE - ANDROID_CONTROL_START ] =
141     { "aeMode",                        TYPE_BYTE   },
142     [ ANDROID_CONTROL_AE_REGIONS - ANDROID_CONTROL_START ] =
143     { "aeRegions",                     TYPE_INT32  },
144     [ ANDROID_CONTROL_AE_TARGET_FPS_RANGE - ANDROID_CONTROL_START ] =
145     { "aeTargetFpsRange",              TYPE_INT32  },
146     [ ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER - ANDROID_CONTROL_START ] =
147     { "aePrecaptureTrigger",           TYPE_BYTE   },
148     [ ANDROID_CONTROL_AF_MODE - ANDROID_CONTROL_START ] =
149     { "afMode",                        TYPE_BYTE   },
150     [ ANDROID_CONTROL_AF_REGIONS - ANDROID_CONTROL_START ] =
151     { "afRegions",                     TYPE_INT32  },
152     [ ANDROID_CONTROL_AF_TRIGGER - ANDROID_CONTROL_START ] =
153     { "afTrigger",                     TYPE_BYTE   },
154     [ ANDROID_CONTROL_AWB_LOCK - ANDROID_CONTROL_START ] =
155     { "awbLock",                       TYPE_BYTE   },
156     [ ANDROID_CONTROL_AWB_MODE - ANDROID_CONTROL_START ] =
157     { "awbMode",                       TYPE_BYTE   },
158     [ ANDROID_CONTROL_AWB_REGIONS - ANDROID_CONTROL_START ] =
159     { "awbRegions",                    TYPE_INT32  },
160     [ ANDROID_CONTROL_CAPTURE_INTENT - ANDROID_CONTROL_START ] =
161     { "captureIntent",                 TYPE_BYTE   },
162     [ ANDROID_CONTROL_EFFECT_MODE - ANDROID_CONTROL_START ] =
163     { "effectMode",                    TYPE_BYTE   },
164     [ ANDROID_CONTROL_MODE - ANDROID_CONTROL_START ] =
165     { "mode",                          TYPE_BYTE   },
166     [ ANDROID_CONTROL_SCENE_MODE - ANDROID_CONTROL_START ] =
167     { "sceneMode",                     TYPE_BYTE   },
168     [ ANDROID_CONTROL_VIDEO_STABILIZATION_MODE - ANDROID_CONTROL_START ] =
169     { "videoStabilizationMode",        TYPE_BYTE   },
170     [ ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES - ANDROID_CONTROL_START ] =
171     { "aeAvailableAntibandingModes",   TYPE_BYTE   },
172     [ ANDROID_CONTROL_AE_AVAILABLE_MODES - ANDROID_CONTROL_START ] =
173     { "aeAvailableModes",              TYPE_BYTE   },
174     [ ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES - ANDROID_CONTROL_START ] =
175     { "aeAvailableTargetFpsRanges",    TYPE_INT32  },
176     [ ANDROID_CONTROL_AE_COMPENSATION_RANGE - ANDROID_CONTROL_START ] =
177     { "aeCompensationRange",           TYPE_INT32  },
178     [ ANDROID_CONTROL_AE_COMPENSATION_STEP - ANDROID_CONTROL_START ] =
179     { "aeCompensationStep",            TYPE_RATIONAL
180                 },
181     [ ANDROID_CONTROL_AF_AVAILABLE_MODES - ANDROID_CONTROL_START ] =
182     { "afAvailableModes",              TYPE_BYTE   },
183     [ ANDROID_CONTROL_AVAILABLE_EFFECTS - ANDROID_CONTROL_START ] =
184     { "availableEffects",              TYPE_BYTE   },
185     [ ANDROID_CONTROL_AVAILABLE_SCENE_MODES - ANDROID_CONTROL_START ] =
186     { "availableSceneModes",           TYPE_BYTE   },
187     [ ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES - ANDROID_CONTROL_START ] =
188     { "availableVideoStabilizationModes",
189                                         TYPE_BYTE   },
190     [ ANDROID_CONTROL_AWB_AVAILABLE_MODES - ANDROID_CONTROL_START ] =
191     { "awbAvailableModes",             TYPE_BYTE   },
192     [ ANDROID_CONTROL_MAX_REGIONS - ANDROID_CONTROL_START ] =
193     { "maxRegions",                    TYPE_INT32  },
194     [ ANDROID_CONTROL_SCENE_MODE_OVERRIDES - ANDROID_CONTROL_START ] =
195     { "sceneModeOverrides",            TYPE_BYTE   },
196     [ ANDROID_CONTROL_AE_PRECAPTURE_ID - ANDROID_CONTROL_START ] =
197     { "aePrecaptureId",                TYPE_INT32  },
198     [ ANDROID_CONTROL_AE_STATE - ANDROID_CONTROL_START ] =
199     { "aeState",                       TYPE_BYTE   },
200     [ ANDROID_CONTROL_AF_STATE - ANDROID_CONTROL_START ] =
201     { "afState",                       TYPE_BYTE   },
202     [ ANDROID_CONTROL_AF_TRIGGER_ID - ANDROID_CONTROL_START ] =
203     { "afTriggerId",                   TYPE_INT32  },
204     [ ANDROID_CONTROL_AWB_STATE - ANDROID_CONTROL_START ] =
205     { "awbState",                      TYPE_BYTE   },
206     [ ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS - ANDROID_CONTROL_START ] =
207     { "availableHighSpeedVideoConfigurations",
208                                         TYPE_INT32  },
209     [ ANDROID_CONTROL_AE_LOCK_AVAILABLE - ANDROID_CONTROL_START ] =
210     { "aeLockAvailable",               TYPE_BYTE   },
211     [ ANDROID_CONTROL_AWB_LOCK_AVAILABLE - ANDROID_CONTROL_START ] =
212     { "awbLockAvailable",              TYPE_BYTE   },
213     [ ANDROID_CONTROL_AVAILABLE_MODES - ANDROID_CONTROL_START ] =
214     { "availableModes",                TYPE_BYTE   },
215     [ ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE - ANDROID_CONTROL_START ] =
216     { "postRawSensitivityBoostRange",  TYPE_INT32  },
217     [ ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST - ANDROID_CONTROL_START ] =
218     { "postRawSensitivityBoost",       TYPE_INT32  },
219 };
220 
221 static tag_info_t android_demosaic[ANDROID_DEMOSAIC_END -
222         ANDROID_DEMOSAIC_START] = {
223     [ ANDROID_DEMOSAIC_MODE - ANDROID_DEMOSAIC_START ] =
224     { "mode",                          TYPE_BYTE   },
225 };
226 
227 static tag_info_t android_edge[ANDROID_EDGE_END -
228         ANDROID_EDGE_START] = {
229     [ ANDROID_EDGE_MODE - ANDROID_EDGE_START ] =
230     { "mode",                          TYPE_BYTE   },
231     [ ANDROID_EDGE_STRENGTH - ANDROID_EDGE_START ] =
232     { "strength",                      TYPE_BYTE   },
233     [ ANDROID_EDGE_AVAILABLE_EDGE_MODES - ANDROID_EDGE_START ] =
234     { "availableEdgeModes",            TYPE_BYTE   },
235 };
236 
237 static tag_info_t android_flash[ANDROID_FLASH_END -
238         ANDROID_FLASH_START] = {
239     [ ANDROID_FLASH_FIRING_POWER - ANDROID_FLASH_START ] =
240     { "firingPower",                   TYPE_BYTE   },
241     [ ANDROID_FLASH_FIRING_TIME - ANDROID_FLASH_START ] =
242     { "firingTime",                    TYPE_INT64  },
243     [ ANDROID_FLASH_MODE - ANDROID_FLASH_START ] =
244     { "mode",                          TYPE_BYTE   },
245     [ ANDROID_FLASH_COLOR_TEMPERATURE - ANDROID_FLASH_START ] =
246     { "colorTemperature",              TYPE_BYTE   },
247     [ ANDROID_FLASH_MAX_ENERGY - ANDROID_FLASH_START ] =
248     { "maxEnergy",                     TYPE_BYTE   },
249     [ ANDROID_FLASH_STATE - ANDROID_FLASH_START ] =
250     { "state",                         TYPE_BYTE   },
251 };
252 
253 static tag_info_t android_flash_info[ANDROID_FLASH_INFO_END -
254         ANDROID_FLASH_INFO_START] = {
255     [ ANDROID_FLASH_INFO_AVAILABLE - ANDROID_FLASH_INFO_START ] =
256     { "available",                     TYPE_BYTE   },
257     [ ANDROID_FLASH_INFO_CHARGE_DURATION - ANDROID_FLASH_INFO_START ] =
258     { "chargeDuration",                TYPE_INT64  },
259 };
260 
261 static tag_info_t android_hot_pixel[ANDROID_HOT_PIXEL_END -
262         ANDROID_HOT_PIXEL_START] = {
263     [ ANDROID_HOT_PIXEL_MODE - ANDROID_HOT_PIXEL_START ] =
264     { "mode",                          TYPE_BYTE   },
265     [ ANDROID_HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES - ANDROID_HOT_PIXEL_START ] =
266     { "availableHotPixelModes",        TYPE_BYTE   },
267 };
268 
269 static tag_info_t android_jpeg[ANDROID_JPEG_END -
270         ANDROID_JPEG_START] = {
271     [ ANDROID_JPEG_GPS_COORDINATES - ANDROID_JPEG_START ] =
272     { "gpsCoordinates",                TYPE_DOUBLE },
273     [ ANDROID_JPEG_GPS_PROCESSING_METHOD - ANDROID_JPEG_START ] =
274     { "gpsProcessingMethod",           TYPE_BYTE   },
275     [ ANDROID_JPEG_GPS_TIMESTAMP - ANDROID_JPEG_START ] =
276     { "gpsTimestamp",                  TYPE_INT64  },
277     [ ANDROID_JPEG_ORIENTATION - ANDROID_JPEG_START ] =
278     { "orientation",                   TYPE_INT32  },
279     [ ANDROID_JPEG_QUALITY - ANDROID_JPEG_START ] =
280     { "quality",                       TYPE_BYTE   },
281     [ ANDROID_JPEG_THUMBNAIL_QUALITY - ANDROID_JPEG_START ] =
282     { "thumbnailQuality",              TYPE_BYTE   },
283     [ ANDROID_JPEG_THUMBNAIL_SIZE - ANDROID_JPEG_START ] =
284     { "thumbnailSize",                 TYPE_INT32  },
285     [ ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES - ANDROID_JPEG_START ] =
286     { "availableThumbnailSizes",       TYPE_INT32  },
287     [ ANDROID_JPEG_MAX_SIZE - ANDROID_JPEG_START ] =
288     { "maxSize",                       TYPE_INT32  },
289     [ ANDROID_JPEG_SIZE - ANDROID_JPEG_START ] =
290     { "size",                          TYPE_INT32  },
291 };
292 
293 static tag_info_t android_lens[ANDROID_LENS_END -
294         ANDROID_LENS_START] = {
295     [ ANDROID_LENS_APERTURE - ANDROID_LENS_START ] =
296     { "aperture",                      TYPE_FLOAT  },
297     [ ANDROID_LENS_FILTER_DENSITY - ANDROID_LENS_START ] =
298     { "filterDensity",                 TYPE_FLOAT  },
299     [ ANDROID_LENS_FOCAL_LENGTH - ANDROID_LENS_START ] =
300     { "focalLength",                   TYPE_FLOAT  },
301     [ ANDROID_LENS_FOCUS_DISTANCE - ANDROID_LENS_START ] =
302     { "focusDistance",                 TYPE_FLOAT  },
303     [ ANDROID_LENS_OPTICAL_STABILIZATION_MODE - ANDROID_LENS_START ] =
304     { "opticalStabilizationMode",      TYPE_BYTE   },
305     [ ANDROID_LENS_FACING - ANDROID_LENS_START ] =
306     { "facing",                        TYPE_BYTE   },
307     [ ANDROID_LENS_POSE_ROTATION - ANDROID_LENS_START ] =
308     { "poseRotation",                  TYPE_FLOAT  },
309     [ ANDROID_LENS_POSE_TRANSLATION - ANDROID_LENS_START ] =
310     { "poseTranslation",               TYPE_FLOAT  },
311     [ ANDROID_LENS_FOCUS_RANGE - ANDROID_LENS_START ] =
312     { "focusRange",                    TYPE_FLOAT  },
313     [ ANDROID_LENS_STATE - ANDROID_LENS_START ] =
314     { "state",                         TYPE_BYTE   },
315     [ ANDROID_LENS_INTRINSIC_CALIBRATION - ANDROID_LENS_START ] =
316     { "intrinsicCalibration",          TYPE_FLOAT  },
317     [ ANDROID_LENS_RADIAL_DISTORTION - ANDROID_LENS_START ] =
318     { "radialDistortion",              TYPE_FLOAT  },
319 };
320 
321 static tag_info_t android_lens_info[ANDROID_LENS_INFO_END -
322         ANDROID_LENS_INFO_START] = {
323     [ ANDROID_LENS_INFO_AVAILABLE_APERTURES - ANDROID_LENS_INFO_START ] =
324     { "availableApertures",            TYPE_FLOAT  },
325     [ ANDROID_LENS_INFO_AVAILABLE_FILTER_DENSITIES - ANDROID_LENS_INFO_START ] =
326     { "availableFilterDensities",      TYPE_FLOAT  },
327     [ ANDROID_LENS_INFO_AVAILABLE_FOCAL_LENGTHS - ANDROID_LENS_INFO_START ] =
328     { "availableFocalLengths",         TYPE_FLOAT  },
329     [ ANDROID_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION - ANDROID_LENS_INFO_START ] =
330     { "availableOpticalStabilization", TYPE_BYTE   },
331     [ ANDROID_LENS_INFO_HYPERFOCAL_DISTANCE - ANDROID_LENS_INFO_START ] =
332     { "hyperfocalDistance",            TYPE_FLOAT  },
333     [ ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE - ANDROID_LENS_INFO_START ] =
334     { "minimumFocusDistance",          TYPE_FLOAT  },
335     [ ANDROID_LENS_INFO_SHADING_MAP_SIZE - ANDROID_LENS_INFO_START ] =
336     { "shadingMapSize",                TYPE_INT32  },
337     [ ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION - ANDROID_LENS_INFO_START ] =
338     { "focusDistanceCalibration",      TYPE_BYTE   },
339 };
340 
341 static tag_info_t android_noise_reduction[ANDROID_NOISE_REDUCTION_END -
342         ANDROID_NOISE_REDUCTION_START] = {
343     [ ANDROID_NOISE_REDUCTION_MODE - ANDROID_NOISE_REDUCTION_START ] =
344     { "mode",                          TYPE_BYTE   },
345     [ ANDROID_NOISE_REDUCTION_STRENGTH - ANDROID_NOISE_REDUCTION_START ] =
346     { "strength",                      TYPE_BYTE   },
347     [ ANDROID_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES - ANDROID_NOISE_REDUCTION_START ] =
348     { "availableNoiseReductionModes",  TYPE_BYTE   },
349 };
350 
351 static tag_info_t android_quirks[ANDROID_QUIRKS_END -
352         ANDROID_QUIRKS_START] = {
353     [ ANDROID_QUIRKS_METERING_CROP_REGION - ANDROID_QUIRKS_START ] =
354     { "meteringCropRegion",            TYPE_BYTE   },
355     [ ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO - ANDROID_QUIRKS_START ] =
356     { "triggerAfWithAuto",             TYPE_BYTE   },
357     [ ANDROID_QUIRKS_USE_ZSL_FORMAT - ANDROID_QUIRKS_START ] =
358     { "useZslFormat",                  TYPE_BYTE   },
359     [ ANDROID_QUIRKS_USE_PARTIAL_RESULT - ANDROID_QUIRKS_START ] =
360     { "usePartialResult",              TYPE_BYTE   },
361     [ ANDROID_QUIRKS_PARTIAL_RESULT - ANDROID_QUIRKS_START ] =
362     { "partialResult",                 TYPE_BYTE   },
363 };
364 
365 static tag_info_t android_request[ANDROID_REQUEST_END -
366         ANDROID_REQUEST_START] = {
367     [ ANDROID_REQUEST_FRAME_COUNT - ANDROID_REQUEST_START ] =
368     { "frameCount",                    TYPE_INT32  },
369     [ ANDROID_REQUEST_ID - ANDROID_REQUEST_START ] =
370     { "id",                            TYPE_INT32  },
371     [ ANDROID_REQUEST_INPUT_STREAMS - ANDROID_REQUEST_START ] =
372     { "inputStreams",                  TYPE_INT32  },
373     [ ANDROID_REQUEST_METADATA_MODE - ANDROID_REQUEST_START ] =
374     { "metadataMode",                  TYPE_BYTE   },
375     [ ANDROID_REQUEST_OUTPUT_STREAMS - ANDROID_REQUEST_START ] =
376     { "outputStreams",                 TYPE_INT32  },
377     [ ANDROID_REQUEST_TYPE - ANDROID_REQUEST_START ] =
378     { "type",                          TYPE_BYTE   },
379     [ ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS - ANDROID_REQUEST_START ] =
380     { "maxNumOutputStreams",           TYPE_INT32  },
381     [ ANDROID_REQUEST_MAX_NUM_REPROCESS_STREAMS - ANDROID_REQUEST_START ] =
382     { "maxNumReprocessStreams",        TYPE_INT32  },
383     [ ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS - ANDROID_REQUEST_START ] =
384     { "maxNumInputStreams",            TYPE_INT32  },
385     [ ANDROID_REQUEST_PIPELINE_DEPTH - ANDROID_REQUEST_START ] =
386     { "pipelineDepth",                 TYPE_BYTE   },
387     [ ANDROID_REQUEST_PIPELINE_MAX_DEPTH - ANDROID_REQUEST_START ] =
388     { "pipelineMaxDepth",              TYPE_BYTE   },
389     [ ANDROID_REQUEST_PARTIAL_RESULT_COUNT - ANDROID_REQUEST_START ] =
390     { "partialResultCount",            TYPE_INT32  },
391     [ ANDROID_REQUEST_AVAILABLE_CAPABILITIES - ANDROID_REQUEST_START ] =
392     { "availableCapabilities",         TYPE_BYTE   },
393     [ ANDROID_REQUEST_AVAILABLE_REQUEST_KEYS - ANDROID_REQUEST_START ] =
394     { "availableRequestKeys",          TYPE_INT32  },
395     [ ANDROID_REQUEST_AVAILABLE_RESULT_KEYS - ANDROID_REQUEST_START ] =
396     { "availableResultKeys",           TYPE_INT32  },
397     [ ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS - ANDROID_REQUEST_START ] =
398     { "availableCharacteristicsKeys",  TYPE_INT32  },
399 };
400 
401 static tag_info_t android_scaler[ANDROID_SCALER_END -
402         ANDROID_SCALER_START] = {
403     [ ANDROID_SCALER_CROP_REGION - ANDROID_SCALER_START ] =
404     { "cropRegion",                    TYPE_INT32  },
405     [ ANDROID_SCALER_AVAILABLE_FORMATS - ANDROID_SCALER_START ] =
406     { "availableFormats",              TYPE_INT32  },
407     [ ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS - ANDROID_SCALER_START ] =
408     { "availableJpegMinDurations",     TYPE_INT64  },
409     [ ANDROID_SCALER_AVAILABLE_JPEG_SIZES - ANDROID_SCALER_START ] =
410     { "availableJpegSizes",            TYPE_INT32  },
411     [ ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM - ANDROID_SCALER_START ] =
412     { "availableMaxDigitalZoom",       TYPE_FLOAT  },
413     [ ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS - ANDROID_SCALER_START ] =
414     { "availableProcessedMinDurations",
415                                         TYPE_INT64  },
416     [ ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES - ANDROID_SCALER_START ] =
417     { "availableProcessedSizes",       TYPE_INT32  },
418     [ ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS - ANDROID_SCALER_START ] =
419     { "availableRawMinDurations",      TYPE_INT64  },
420     [ ANDROID_SCALER_AVAILABLE_RAW_SIZES - ANDROID_SCALER_START ] =
421     { "availableRawSizes",             TYPE_INT32  },
422     [ ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP - ANDROID_SCALER_START ] =
423     { "availableInputOutputFormatsMap",
424                                         TYPE_INT32  },
425     [ ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS - ANDROID_SCALER_START ] =
426     { "availableStreamConfigurations", TYPE_INT32  },
427     [ ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS - ANDROID_SCALER_START ] =
428     { "availableMinFrameDurations",    TYPE_INT64  },
429     [ ANDROID_SCALER_AVAILABLE_STALL_DURATIONS - ANDROID_SCALER_START ] =
430     { "availableStallDurations",       TYPE_INT64  },
431     [ ANDROID_SCALER_CROPPING_TYPE - ANDROID_SCALER_START ] =
432     { "croppingType",                  TYPE_BYTE   },
433 };
434 
435 static tag_info_t android_sensor[ANDROID_SENSOR_END -
436         ANDROID_SENSOR_START] = {
437     [ ANDROID_SENSOR_EXPOSURE_TIME - ANDROID_SENSOR_START ] =
438     { "exposureTime",                  TYPE_INT64  },
439     [ ANDROID_SENSOR_FRAME_DURATION - ANDROID_SENSOR_START ] =
440     { "frameDuration",                 TYPE_INT64  },
441     [ ANDROID_SENSOR_SENSITIVITY - ANDROID_SENSOR_START ] =
442     { "sensitivity",                   TYPE_INT32  },
443     [ ANDROID_SENSOR_REFERENCE_ILLUMINANT1 - ANDROID_SENSOR_START ] =
444     { "referenceIlluminant1",          TYPE_BYTE   },
445     [ ANDROID_SENSOR_REFERENCE_ILLUMINANT2 - ANDROID_SENSOR_START ] =
446     { "referenceIlluminant2",          TYPE_BYTE   },
447     [ ANDROID_SENSOR_CALIBRATION_TRANSFORM1 - ANDROID_SENSOR_START ] =
448     { "calibrationTransform1",         TYPE_RATIONAL
449                 },
450     [ ANDROID_SENSOR_CALIBRATION_TRANSFORM2 - ANDROID_SENSOR_START ] =
451     { "calibrationTransform2",         TYPE_RATIONAL
452                 },
453     [ ANDROID_SENSOR_COLOR_TRANSFORM1 - ANDROID_SENSOR_START ] =
454     { "colorTransform1",               TYPE_RATIONAL
455                 },
456     [ ANDROID_SENSOR_COLOR_TRANSFORM2 - ANDROID_SENSOR_START ] =
457     { "colorTransform2",               TYPE_RATIONAL
458                 },
459     [ ANDROID_SENSOR_FORWARD_MATRIX1 - ANDROID_SENSOR_START ] =
460     { "forwardMatrix1",                TYPE_RATIONAL
461                 },
462     [ ANDROID_SENSOR_FORWARD_MATRIX2 - ANDROID_SENSOR_START ] =
463     { "forwardMatrix2",                TYPE_RATIONAL
464                 },
465     [ ANDROID_SENSOR_BASE_GAIN_FACTOR - ANDROID_SENSOR_START ] =
466     { "baseGainFactor",                TYPE_RATIONAL
467                 },
468     [ ANDROID_SENSOR_BLACK_LEVEL_PATTERN - ANDROID_SENSOR_START ] =
469     { "blackLevelPattern",             TYPE_INT32  },
470     [ ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY - ANDROID_SENSOR_START ] =
471     { "maxAnalogSensitivity",          TYPE_INT32  },
472     [ ANDROID_SENSOR_ORIENTATION - ANDROID_SENSOR_START ] =
473     { "orientation",                   TYPE_INT32  },
474     [ ANDROID_SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS - ANDROID_SENSOR_START ] =
475     { "profileHueSatMapDimensions",    TYPE_INT32  },
476     [ ANDROID_SENSOR_TIMESTAMP - ANDROID_SENSOR_START ] =
477     { "timestamp",                     TYPE_INT64  },
478     [ ANDROID_SENSOR_TEMPERATURE - ANDROID_SENSOR_START ] =
479     { "temperature",                   TYPE_FLOAT  },
480     [ ANDROID_SENSOR_NEUTRAL_COLOR_POINT - ANDROID_SENSOR_START ] =
481     { "neutralColorPoint",             TYPE_RATIONAL
482                 },
483     [ ANDROID_SENSOR_NOISE_PROFILE - ANDROID_SENSOR_START ] =
484     { "noiseProfile",                  TYPE_DOUBLE },
485     [ ANDROID_SENSOR_PROFILE_HUE_SAT_MAP - ANDROID_SENSOR_START ] =
486     { "profileHueSatMap",              TYPE_FLOAT  },
487     [ ANDROID_SENSOR_PROFILE_TONE_CURVE - ANDROID_SENSOR_START ] =
488     { "profileToneCurve",              TYPE_FLOAT  },
489     [ ANDROID_SENSOR_GREEN_SPLIT - ANDROID_SENSOR_START ] =
490     { "greenSplit",                    TYPE_FLOAT  },
491     [ ANDROID_SENSOR_TEST_PATTERN_DATA - ANDROID_SENSOR_START ] =
492     { "testPatternData",               TYPE_INT32  },
493     [ ANDROID_SENSOR_TEST_PATTERN_MODE - ANDROID_SENSOR_START ] =
494     { "testPatternMode",               TYPE_INT32  },
495     [ ANDROID_SENSOR_AVAILABLE_TEST_PATTERN_MODES - ANDROID_SENSOR_START ] =
496     { "availableTestPatternModes",     TYPE_INT32  },
497     [ ANDROID_SENSOR_ROLLING_SHUTTER_SKEW - ANDROID_SENSOR_START ] =
498     { "rollingShutterSkew",            TYPE_INT64  },
499     [ ANDROID_SENSOR_OPTICAL_BLACK_REGIONS - ANDROID_SENSOR_START ] =
500     { "opticalBlackRegions",           TYPE_INT32  },
501     [ ANDROID_SENSOR_DYNAMIC_BLACK_LEVEL - ANDROID_SENSOR_START ] =
502     { "dynamicBlackLevel",             TYPE_FLOAT  },
503     [ ANDROID_SENSOR_DYNAMIC_WHITE_LEVEL - ANDROID_SENSOR_START ] =
504     { "dynamicWhiteLevel",             TYPE_INT32  },
505     [ ANDROID_SENSOR_OPAQUE_RAW_SIZE - ANDROID_SENSOR_START ] =
506     { "opaqueRawSize",                 TYPE_INT32  },
507 };
508 
509 static tag_info_t android_sensor_info[ANDROID_SENSOR_INFO_END -
510         ANDROID_SENSOR_INFO_START] = {
511     [ ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE - ANDROID_SENSOR_INFO_START ] =
512     { "activeArraySize",               TYPE_INT32  },
513     [ ANDROID_SENSOR_INFO_SENSITIVITY_RANGE - ANDROID_SENSOR_INFO_START ] =
514     { "sensitivityRange",              TYPE_INT32  },
515     [ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT - ANDROID_SENSOR_INFO_START ] =
516     { "colorFilterArrangement",        TYPE_BYTE   },
517     [ ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE - ANDROID_SENSOR_INFO_START ] =
518     { "exposureTimeRange",             TYPE_INT64  },
519     [ ANDROID_SENSOR_INFO_MAX_FRAME_DURATION - ANDROID_SENSOR_INFO_START ] =
520     { "maxFrameDuration",              TYPE_INT64  },
521     [ ANDROID_SENSOR_INFO_PHYSICAL_SIZE - ANDROID_SENSOR_INFO_START ] =
522     { "physicalSize",                  TYPE_FLOAT  },
523     [ ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE - ANDROID_SENSOR_INFO_START ] =
524     { "pixelArraySize",                TYPE_INT32  },
525     [ ANDROID_SENSOR_INFO_WHITE_LEVEL - ANDROID_SENSOR_INFO_START ] =
526     { "whiteLevel",                    TYPE_INT32  },
527     [ ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE - ANDROID_SENSOR_INFO_START ] =
528     { "timestampSource",               TYPE_BYTE   },
529     [ ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED - ANDROID_SENSOR_INFO_START ] =
530     { "lensShadingApplied",            TYPE_BYTE   },
531     [ ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE - ANDROID_SENSOR_INFO_START ] =
532     { "preCorrectionActiveArraySize",  TYPE_INT32  },
533 };
534 
535 static tag_info_t android_shading[ANDROID_SHADING_END -
536         ANDROID_SHADING_START] = {
537     [ ANDROID_SHADING_MODE - ANDROID_SHADING_START ] =
538     { "mode",                          TYPE_BYTE   },
539     [ ANDROID_SHADING_STRENGTH - ANDROID_SHADING_START ] =
540     { "strength",                      TYPE_BYTE   },
541     [ ANDROID_SHADING_AVAILABLE_MODES - ANDROID_SHADING_START ] =
542     { "availableModes",                TYPE_BYTE   },
543 };
544 
545 static tag_info_t android_statistics[ANDROID_STATISTICS_END -
546         ANDROID_STATISTICS_START] = {
547     [ ANDROID_STATISTICS_FACE_DETECT_MODE - ANDROID_STATISTICS_START ] =
548     { "faceDetectMode",                TYPE_BYTE   },
549     [ ANDROID_STATISTICS_HISTOGRAM_MODE - ANDROID_STATISTICS_START ] =
550     { "histogramMode",                 TYPE_BYTE   },
551     [ ANDROID_STATISTICS_SHARPNESS_MAP_MODE - ANDROID_STATISTICS_START ] =
552     { "sharpnessMapMode",              TYPE_BYTE   },
553     [ ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE - ANDROID_STATISTICS_START ] =
554     { "hotPixelMapMode",               TYPE_BYTE   },
555     [ ANDROID_STATISTICS_FACE_IDS - ANDROID_STATISTICS_START ] =
556     { "faceIds",                       TYPE_INT32  },
557     [ ANDROID_STATISTICS_FACE_LANDMARKS - ANDROID_STATISTICS_START ] =
558     { "faceLandmarks",                 TYPE_INT32  },
559     [ ANDROID_STATISTICS_FACE_RECTANGLES - ANDROID_STATISTICS_START ] =
560     { "faceRectangles",                TYPE_INT32  },
561     [ ANDROID_STATISTICS_FACE_SCORES - ANDROID_STATISTICS_START ] =
562     { "faceScores",                    TYPE_BYTE   },
563     [ ANDROID_STATISTICS_HISTOGRAM - ANDROID_STATISTICS_START ] =
564     { "histogram",                     TYPE_INT32  },
565     [ ANDROID_STATISTICS_SHARPNESS_MAP - ANDROID_STATISTICS_START ] =
566     { "sharpnessMap",                  TYPE_INT32  },
567     [ ANDROID_STATISTICS_LENS_SHADING_CORRECTION_MAP - ANDROID_STATISTICS_START ] =
568     { "lensShadingCorrectionMap",      TYPE_BYTE   },
569     [ ANDROID_STATISTICS_LENS_SHADING_MAP - ANDROID_STATISTICS_START ] =
570     { "lensShadingMap",                TYPE_FLOAT  },
571     [ ANDROID_STATISTICS_PREDICTED_COLOR_GAINS - ANDROID_STATISTICS_START ] =
572     { "predictedColorGains",           TYPE_FLOAT  },
573     [ ANDROID_STATISTICS_PREDICTED_COLOR_TRANSFORM - ANDROID_STATISTICS_START ] =
574     { "predictedColorTransform",       TYPE_RATIONAL
575                 },
576     [ ANDROID_STATISTICS_SCENE_FLICKER - ANDROID_STATISTICS_START ] =
577     { "sceneFlicker",                  TYPE_BYTE   },
578     [ ANDROID_STATISTICS_HOT_PIXEL_MAP - ANDROID_STATISTICS_START ] =
579     { "hotPixelMap",                   TYPE_INT32  },
580     [ ANDROID_STATISTICS_LENS_SHADING_MAP_MODE - ANDROID_STATISTICS_START ] =
581     { "lensShadingMapMode",            TYPE_BYTE   },
582 };
583 
584 static tag_info_t android_statistics_info[ANDROID_STATISTICS_INFO_END -
585         ANDROID_STATISTICS_INFO_START] = {
586     [ ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES - ANDROID_STATISTICS_INFO_START ] =
587     { "availableFaceDetectModes",      TYPE_BYTE   },
588     [ ANDROID_STATISTICS_INFO_HISTOGRAM_BUCKET_COUNT - ANDROID_STATISTICS_INFO_START ] =
589     { "histogramBucketCount",          TYPE_INT32  },
590     [ ANDROID_STATISTICS_INFO_MAX_FACE_COUNT - ANDROID_STATISTICS_INFO_START ] =
591     { "maxFaceCount",                  TYPE_INT32  },
592     [ ANDROID_STATISTICS_INFO_MAX_HISTOGRAM_COUNT - ANDROID_STATISTICS_INFO_START ] =
593     { "maxHistogramCount",             TYPE_INT32  },
594     [ ANDROID_STATISTICS_INFO_MAX_SHARPNESS_MAP_VALUE - ANDROID_STATISTICS_INFO_START ] =
595     { "maxSharpnessMapValue",          TYPE_INT32  },
596     [ ANDROID_STATISTICS_INFO_SHARPNESS_MAP_SIZE - ANDROID_STATISTICS_INFO_START ] =
597     { "sharpnessMapSize",              TYPE_INT32  },
598     [ ANDROID_STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES - ANDROID_STATISTICS_INFO_START ] =
599     { "availableHotPixelMapModes",     TYPE_BYTE   },
600     [ ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES - ANDROID_STATISTICS_INFO_START ] =
601     { "availableLensShadingMapModes",  TYPE_BYTE   },
602 };
603 
604 static tag_info_t android_tonemap[ANDROID_TONEMAP_END -
605         ANDROID_TONEMAP_START] = {
606     [ ANDROID_TONEMAP_CURVE_BLUE - ANDROID_TONEMAP_START ] =
607     { "curveBlue",                     TYPE_FLOAT  },
608     [ ANDROID_TONEMAP_CURVE_GREEN - ANDROID_TONEMAP_START ] =
609     { "curveGreen",                    TYPE_FLOAT  },
610     [ ANDROID_TONEMAP_CURVE_RED - ANDROID_TONEMAP_START ] =
611     { "curveRed",                      TYPE_FLOAT  },
612     [ ANDROID_TONEMAP_MODE - ANDROID_TONEMAP_START ] =
613     { "mode",                          TYPE_BYTE   },
614     [ ANDROID_TONEMAP_MAX_CURVE_POINTS - ANDROID_TONEMAP_START ] =
615     { "maxCurvePoints",                TYPE_INT32  },
616     [ ANDROID_TONEMAP_AVAILABLE_TONE_MAP_MODES - ANDROID_TONEMAP_START ] =
617     { "availableToneMapModes",         TYPE_BYTE   },
618     [ ANDROID_TONEMAP_GAMMA - ANDROID_TONEMAP_START ] =
619     { "gamma",                         TYPE_FLOAT  },
620     [ ANDROID_TONEMAP_PRESET_CURVE - ANDROID_TONEMAP_START ] =
621     { "presetCurve",                   TYPE_BYTE   },
622 };
623 
624 static tag_info_t android_led[ANDROID_LED_END -
625         ANDROID_LED_START] = {
626     [ ANDROID_LED_TRANSMIT - ANDROID_LED_START ] =
627     { "transmit",                      TYPE_BYTE   },
628     [ ANDROID_LED_AVAILABLE_LEDS - ANDROID_LED_START ] =
629     { "availableLeds",                 TYPE_BYTE   },
630 };
631 
632 static tag_info_t android_info[ANDROID_INFO_END -
633         ANDROID_INFO_START] = {
634     [ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL - ANDROID_INFO_START ] =
635     { "supportedHardwareLevel",        TYPE_BYTE   },
636 };
637 
638 static tag_info_t android_black_level[ANDROID_BLACK_LEVEL_END -
639         ANDROID_BLACK_LEVEL_START] = {
640     [ ANDROID_BLACK_LEVEL_LOCK - ANDROID_BLACK_LEVEL_START ] =
641     { "lock",                          TYPE_BYTE   },
642 };
643 
644 static tag_info_t android_sync[ANDROID_SYNC_END -
645         ANDROID_SYNC_START] = {
646     [ ANDROID_SYNC_FRAME_NUMBER - ANDROID_SYNC_START ] =
647     { "frameNumber",                   TYPE_INT64  },
648     [ ANDROID_SYNC_MAX_LATENCY - ANDROID_SYNC_START ] =
649     { "maxLatency",                    TYPE_INT32  },
650 };
651 
652 static tag_info_t android_reprocess[ANDROID_REPROCESS_END -
653         ANDROID_REPROCESS_START] = {
654     [ ANDROID_REPROCESS_EFFECTIVE_EXPOSURE_FACTOR - ANDROID_REPROCESS_START ] =
655     { "effectiveExposureFactor",       TYPE_FLOAT  },
656     [ ANDROID_REPROCESS_MAX_CAPTURE_STALL - ANDROID_REPROCESS_START ] =
657     { "maxCaptureStall",               TYPE_INT32  },
658 };
659 
660 static tag_info_t android_depth[ANDROID_DEPTH_END -
661         ANDROID_DEPTH_START] = {
662     [ ANDROID_DEPTH_MAX_DEPTH_SAMPLES - ANDROID_DEPTH_START ] =
663     { "maxDepthSamples",               TYPE_INT32  },
664     [ ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS - ANDROID_DEPTH_START ] =
665     { "availableDepthStreamConfigurations",
666                                         TYPE_INT32  },
667     [ ANDROID_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS - ANDROID_DEPTH_START ] =
668     { "availableDepthMinFrameDurations",
669                                         TYPE_INT64  },
670     [ ANDROID_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS - ANDROID_DEPTH_START ] =
671     { "availableDepthStallDurations",  TYPE_INT64  },
672     [ ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE - ANDROID_DEPTH_START ] =
673     { "depthIsExclusive",              TYPE_BYTE   },
674 };
675 
676 
677 tag_info_t *tag_info[ANDROID_SECTION_COUNT] = {
678     android_color_correction,
679     android_control,
680     android_demosaic,
681     android_edge,
682     android_flash,
683     android_flash_info,
684     android_hot_pixel,
685     android_jpeg,
686     android_lens,
687     android_lens_info,
688     android_noise_reduction,
689     android_quirks,
690     android_request,
691     android_scaler,
692     android_sensor,
693     android_sensor_info,
694     android_shading,
695     android_statistics,
696     android_statistics_info,
697     android_tonemap,
698     android_led,
699     android_info,
700     android_black_level,
701     android_sync,
702     android_reprocess,
703     android_depth,
704 };
705 
camera_metadata_enum_snprint(uint32_t tag,uint32_t value,char * dst,size_t size)706 int camera_metadata_enum_snprint(uint32_t tag,
707                                  uint32_t value,
708                                  char *dst,
709                                  size_t size) {
710     const char *msg = "error: not an enum";
711     int ret = -1;
712 
713     switch(tag) {
714         case ANDROID_COLOR_CORRECTION_MODE: {
715             switch (value) {
716                 case ANDROID_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX:
717                     msg = "TRANSFORM_MATRIX";
718                     ret = 0;
719                     break;
720                 case ANDROID_COLOR_CORRECTION_MODE_FAST:
721                     msg = "FAST";
722                     ret = 0;
723                     break;
724                 case ANDROID_COLOR_CORRECTION_MODE_HIGH_QUALITY:
725                     msg = "HIGH_QUALITY";
726                     ret = 0;
727                     break;
728                 default:
729                     msg = "error: enum value out of range";
730             }
731             break;
732         }
733         case ANDROID_COLOR_CORRECTION_TRANSFORM: {
734             break;
735         }
736         case ANDROID_COLOR_CORRECTION_GAINS: {
737             break;
738         }
739         case ANDROID_COLOR_CORRECTION_ABERRATION_MODE: {
740             switch (value) {
741                 case ANDROID_COLOR_CORRECTION_ABERRATION_MODE_OFF:
742                     msg = "OFF";
743                     ret = 0;
744                     break;
745                 case ANDROID_COLOR_CORRECTION_ABERRATION_MODE_FAST:
746                     msg = "FAST";
747                     ret = 0;
748                     break;
749                 case ANDROID_COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY:
750                     msg = "HIGH_QUALITY";
751                     ret = 0;
752                     break;
753                 default:
754                     msg = "error: enum value out of range";
755             }
756             break;
757         }
758         case ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES: {
759             break;
760         }
761 
762         case ANDROID_CONTROL_AE_ANTIBANDING_MODE: {
763             switch (value) {
764                 case ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF:
765                     msg = "OFF";
766                     ret = 0;
767                     break;
768                 case ANDROID_CONTROL_AE_ANTIBANDING_MODE_50HZ:
769                     msg = "50HZ";
770                     ret = 0;
771                     break;
772                 case ANDROID_CONTROL_AE_ANTIBANDING_MODE_60HZ:
773                     msg = "60HZ";
774                     ret = 0;
775                     break;
776                 case ANDROID_CONTROL_AE_ANTIBANDING_MODE_AUTO:
777                     msg = "AUTO";
778                     ret = 0;
779                     break;
780                 default:
781                     msg = "error: enum value out of range";
782             }
783             break;
784         }
785         case ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION: {
786             break;
787         }
788         case ANDROID_CONTROL_AE_LOCK: {
789             switch (value) {
790                 case ANDROID_CONTROL_AE_LOCK_OFF:
791                     msg = "OFF";
792                     ret = 0;
793                     break;
794                 case ANDROID_CONTROL_AE_LOCK_ON:
795                     msg = "ON";
796                     ret = 0;
797                     break;
798                 default:
799                     msg = "error: enum value out of range";
800             }
801             break;
802         }
803         case ANDROID_CONTROL_AE_MODE: {
804             switch (value) {
805                 case ANDROID_CONTROL_AE_MODE_OFF:
806                     msg = "OFF";
807                     ret = 0;
808                     break;
809                 case ANDROID_CONTROL_AE_MODE_ON:
810                     msg = "ON";
811                     ret = 0;
812                     break;
813                 case ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH:
814                     msg = "ON_AUTO_FLASH";
815                     ret = 0;
816                     break;
817                 case ANDROID_CONTROL_AE_MODE_ON_ALWAYS_FLASH:
818                     msg = "ON_ALWAYS_FLASH";
819                     ret = 0;
820                     break;
821                 case ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE:
822                     msg = "ON_AUTO_FLASH_REDEYE";
823                     ret = 0;
824                     break;
825                 default:
826                     msg = "error: enum value out of range";
827             }
828             break;
829         }
830         case ANDROID_CONTROL_AE_REGIONS: {
831             break;
832         }
833         case ANDROID_CONTROL_AE_TARGET_FPS_RANGE: {
834             break;
835         }
836         case ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER: {
837             switch (value) {
838                 case ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE:
839                     msg = "IDLE";
840                     ret = 0;
841                     break;
842                 case ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_START:
843                     msg = "START";
844                     ret = 0;
845                     break;
846                 case ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL:
847                     msg = "CANCEL";
848                     ret = 0;
849                     break;
850                 default:
851                     msg = "error: enum value out of range";
852             }
853             break;
854         }
855         case ANDROID_CONTROL_AF_MODE: {
856             switch (value) {
857                 case ANDROID_CONTROL_AF_MODE_OFF:
858                     msg = "OFF";
859                     ret = 0;
860                     break;
861                 case ANDROID_CONTROL_AF_MODE_AUTO:
862                     msg = "AUTO";
863                     ret = 0;
864                     break;
865                 case ANDROID_CONTROL_AF_MODE_MACRO:
866                     msg = "MACRO";
867                     ret = 0;
868                     break;
869                 case ANDROID_CONTROL_AF_MODE_CONTINUOUS_VIDEO:
870                     msg = "CONTINUOUS_VIDEO";
871                     ret = 0;
872                     break;
873                 case ANDROID_CONTROL_AF_MODE_CONTINUOUS_PICTURE:
874                     msg = "CONTINUOUS_PICTURE";
875                     ret = 0;
876                     break;
877                 case ANDROID_CONTROL_AF_MODE_EDOF:
878                     msg = "EDOF";
879                     ret = 0;
880                     break;
881                 default:
882                     msg = "error: enum value out of range";
883             }
884             break;
885         }
886         case ANDROID_CONTROL_AF_REGIONS: {
887             break;
888         }
889         case ANDROID_CONTROL_AF_TRIGGER: {
890             switch (value) {
891                 case ANDROID_CONTROL_AF_TRIGGER_IDLE:
892                     msg = "IDLE";
893                     ret = 0;
894                     break;
895                 case ANDROID_CONTROL_AF_TRIGGER_START:
896                     msg = "START";
897                     ret = 0;
898                     break;
899                 case ANDROID_CONTROL_AF_TRIGGER_CANCEL:
900                     msg = "CANCEL";
901                     ret = 0;
902                     break;
903                 default:
904                     msg = "error: enum value out of range";
905             }
906             break;
907         }
908         case ANDROID_CONTROL_AWB_LOCK: {
909             switch (value) {
910                 case ANDROID_CONTROL_AWB_LOCK_OFF:
911                     msg = "OFF";
912                     ret = 0;
913                     break;
914                 case ANDROID_CONTROL_AWB_LOCK_ON:
915                     msg = "ON";
916                     ret = 0;
917                     break;
918                 default:
919                     msg = "error: enum value out of range";
920             }
921             break;
922         }
923         case ANDROID_CONTROL_AWB_MODE: {
924             switch (value) {
925                 case ANDROID_CONTROL_AWB_MODE_OFF:
926                     msg = "OFF";
927                     ret = 0;
928                     break;
929                 case ANDROID_CONTROL_AWB_MODE_AUTO:
930                     msg = "AUTO";
931                     ret = 0;
932                     break;
933                 case ANDROID_CONTROL_AWB_MODE_INCANDESCENT:
934                     msg = "INCANDESCENT";
935                     ret = 0;
936                     break;
937                 case ANDROID_CONTROL_AWB_MODE_FLUORESCENT:
938                     msg = "FLUORESCENT";
939                     ret = 0;
940                     break;
941                 case ANDROID_CONTROL_AWB_MODE_WARM_FLUORESCENT:
942                     msg = "WARM_FLUORESCENT";
943                     ret = 0;
944                     break;
945                 case ANDROID_CONTROL_AWB_MODE_DAYLIGHT:
946                     msg = "DAYLIGHT";
947                     ret = 0;
948                     break;
949                 case ANDROID_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT:
950                     msg = "CLOUDY_DAYLIGHT";
951                     ret = 0;
952                     break;
953                 case ANDROID_CONTROL_AWB_MODE_TWILIGHT:
954                     msg = "TWILIGHT";
955                     ret = 0;
956                     break;
957                 case ANDROID_CONTROL_AWB_MODE_SHADE:
958                     msg = "SHADE";
959                     ret = 0;
960                     break;
961                 default:
962                     msg = "error: enum value out of range";
963             }
964             break;
965         }
966         case ANDROID_CONTROL_AWB_REGIONS: {
967             break;
968         }
969         case ANDROID_CONTROL_CAPTURE_INTENT: {
970             switch (value) {
971                 case ANDROID_CONTROL_CAPTURE_INTENT_CUSTOM:
972                     msg = "CUSTOM";
973                     ret = 0;
974                     break;
975                 case ANDROID_CONTROL_CAPTURE_INTENT_PREVIEW:
976                     msg = "PREVIEW";
977                     ret = 0;
978                     break;
979                 case ANDROID_CONTROL_CAPTURE_INTENT_STILL_CAPTURE:
980                     msg = "STILL_CAPTURE";
981                     ret = 0;
982                     break;
983                 case ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_RECORD:
984                     msg = "VIDEO_RECORD";
985                     ret = 0;
986                     break;
987                 case ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT:
988                     msg = "VIDEO_SNAPSHOT";
989                     ret = 0;
990                     break;
991                 case ANDROID_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG:
992                     msg = "ZERO_SHUTTER_LAG";
993                     ret = 0;
994                     break;
995                 case ANDROID_CONTROL_CAPTURE_INTENT_MANUAL:
996                     msg = "MANUAL";
997                     ret = 0;
998                     break;
999                 default:
1000                     msg = "error: enum value out of range";
1001             }
1002             break;
1003         }
1004         case ANDROID_CONTROL_EFFECT_MODE: {
1005             switch (value) {
1006                 case ANDROID_CONTROL_EFFECT_MODE_OFF:
1007                     msg = "OFF";
1008                     ret = 0;
1009                     break;
1010                 case ANDROID_CONTROL_EFFECT_MODE_MONO:
1011                     msg = "MONO";
1012                     ret = 0;
1013                     break;
1014                 case ANDROID_CONTROL_EFFECT_MODE_NEGATIVE:
1015                     msg = "NEGATIVE";
1016                     ret = 0;
1017                     break;
1018                 case ANDROID_CONTROL_EFFECT_MODE_SOLARIZE:
1019                     msg = "SOLARIZE";
1020                     ret = 0;
1021                     break;
1022                 case ANDROID_CONTROL_EFFECT_MODE_SEPIA:
1023                     msg = "SEPIA";
1024                     ret = 0;
1025                     break;
1026                 case ANDROID_CONTROL_EFFECT_MODE_POSTERIZE:
1027                     msg = "POSTERIZE";
1028                     ret = 0;
1029                     break;
1030                 case ANDROID_CONTROL_EFFECT_MODE_WHITEBOARD:
1031                     msg = "WHITEBOARD";
1032                     ret = 0;
1033                     break;
1034                 case ANDROID_CONTROL_EFFECT_MODE_BLACKBOARD:
1035                     msg = "BLACKBOARD";
1036                     ret = 0;
1037                     break;
1038                 case ANDROID_CONTROL_EFFECT_MODE_AQUA:
1039                     msg = "AQUA";
1040                     ret = 0;
1041                     break;
1042                 default:
1043                     msg = "error: enum value out of range";
1044             }
1045             break;
1046         }
1047         case ANDROID_CONTROL_MODE: {
1048             switch (value) {
1049                 case ANDROID_CONTROL_MODE_OFF:
1050                     msg = "OFF";
1051                     ret = 0;
1052                     break;
1053                 case ANDROID_CONTROL_MODE_AUTO:
1054                     msg = "AUTO";
1055                     ret = 0;
1056                     break;
1057                 case ANDROID_CONTROL_MODE_USE_SCENE_MODE:
1058                     msg = "USE_SCENE_MODE";
1059                     ret = 0;
1060                     break;
1061                 case ANDROID_CONTROL_MODE_OFF_KEEP_STATE:
1062                     msg = "OFF_KEEP_STATE";
1063                     ret = 0;
1064                     break;
1065                 default:
1066                     msg = "error: enum value out of range";
1067             }
1068             break;
1069         }
1070         case ANDROID_CONTROL_SCENE_MODE: {
1071             switch (value) {
1072                 case ANDROID_CONTROL_SCENE_MODE_DISABLED:
1073                     msg = "DISABLED";
1074                     ret = 0;
1075                     break;
1076                 case ANDROID_CONTROL_SCENE_MODE_FACE_PRIORITY:
1077                     msg = "FACE_PRIORITY";
1078                     ret = 0;
1079                     break;
1080                 case ANDROID_CONTROL_SCENE_MODE_ACTION:
1081                     msg = "ACTION";
1082                     ret = 0;
1083                     break;
1084                 case ANDROID_CONTROL_SCENE_MODE_PORTRAIT:
1085                     msg = "PORTRAIT";
1086                     ret = 0;
1087                     break;
1088                 case ANDROID_CONTROL_SCENE_MODE_LANDSCAPE:
1089                     msg = "LANDSCAPE";
1090                     ret = 0;
1091                     break;
1092                 case ANDROID_CONTROL_SCENE_MODE_NIGHT:
1093                     msg = "NIGHT";
1094                     ret = 0;
1095                     break;
1096                 case ANDROID_CONTROL_SCENE_MODE_NIGHT_PORTRAIT:
1097                     msg = "NIGHT_PORTRAIT";
1098                     ret = 0;
1099                     break;
1100                 case ANDROID_CONTROL_SCENE_MODE_THEATRE:
1101                     msg = "THEATRE";
1102                     ret = 0;
1103                     break;
1104                 case ANDROID_CONTROL_SCENE_MODE_BEACH:
1105                     msg = "BEACH";
1106                     ret = 0;
1107                     break;
1108                 case ANDROID_CONTROL_SCENE_MODE_SNOW:
1109                     msg = "SNOW";
1110                     ret = 0;
1111                     break;
1112                 case ANDROID_CONTROL_SCENE_MODE_SUNSET:
1113                     msg = "SUNSET";
1114                     ret = 0;
1115                     break;
1116                 case ANDROID_CONTROL_SCENE_MODE_STEADYPHOTO:
1117                     msg = "STEADYPHOTO";
1118                     ret = 0;
1119                     break;
1120                 case ANDROID_CONTROL_SCENE_MODE_FIREWORKS:
1121                     msg = "FIREWORKS";
1122                     ret = 0;
1123                     break;
1124                 case ANDROID_CONTROL_SCENE_MODE_SPORTS:
1125                     msg = "SPORTS";
1126                     ret = 0;
1127                     break;
1128                 case ANDROID_CONTROL_SCENE_MODE_PARTY:
1129                     msg = "PARTY";
1130                     ret = 0;
1131                     break;
1132                 case ANDROID_CONTROL_SCENE_MODE_CANDLELIGHT:
1133                     msg = "CANDLELIGHT";
1134                     ret = 0;
1135                     break;
1136                 case ANDROID_CONTROL_SCENE_MODE_BARCODE:
1137                     msg = "BARCODE";
1138                     ret = 0;
1139                     break;
1140                 case ANDROID_CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO:
1141                     msg = "HIGH_SPEED_VIDEO";
1142                     ret = 0;
1143                     break;
1144                 case ANDROID_CONTROL_SCENE_MODE_HDR:
1145                     msg = "HDR";
1146                     ret = 0;
1147                     break;
1148                 case ANDROID_CONTROL_SCENE_MODE_FACE_PRIORITY_LOW_LIGHT:
1149                     msg = "FACE_PRIORITY_LOW_LIGHT";
1150                     ret = 0;
1151                     break;
1152                 case ANDROID_CONTROL_SCENE_MODE_DEVICE_CUSTOM_START:
1153                     msg = "DEVICE_CUSTOM_START";
1154                     ret = 0;
1155                     break;
1156                 case ANDROID_CONTROL_SCENE_MODE_DEVICE_CUSTOM_END:
1157                     msg = "DEVICE_CUSTOM_END";
1158                     ret = 0;
1159                     break;
1160                 default:
1161                     msg = "error: enum value out of range";
1162             }
1163             break;
1164         }
1165         case ANDROID_CONTROL_VIDEO_STABILIZATION_MODE: {
1166             switch (value) {
1167                 case ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_OFF:
1168                     msg = "OFF";
1169                     ret = 0;
1170                     break;
1171                 case ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_ON:
1172                     msg = "ON";
1173                     ret = 0;
1174                     break;
1175                 default:
1176                     msg = "error: enum value out of range";
1177             }
1178             break;
1179         }
1180         case ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES: {
1181             break;
1182         }
1183         case ANDROID_CONTROL_AE_AVAILABLE_MODES: {
1184             break;
1185         }
1186         case ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES: {
1187             break;
1188         }
1189         case ANDROID_CONTROL_AE_COMPENSATION_RANGE: {
1190             break;
1191         }
1192         case ANDROID_CONTROL_AE_COMPENSATION_STEP: {
1193             break;
1194         }
1195         case ANDROID_CONTROL_AF_AVAILABLE_MODES: {
1196             break;
1197         }
1198         case ANDROID_CONTROL_AVAILABLE_EFFECTS: {
1199             break;
1200         }
1201         case ANDROID_CONTROL_AVAILABLE_SCENE_MODES: {
1202             break;
1203         }
1204         case ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES: {
1205             break;
1206         }
1207         case ANDROID_CONTROL_AWB_AVAILABLE_MODES: {
1208             break;
1209         }
1210         case ANDROID_CONTROL_MAX_REGIONS: {
1211             break;
1212         }
1213         case ANDROID_CONTROL_SCENE_MODE_OVERRIDES: {
1214             break;
1215         }
1216         case ANDROID_CONTROL_AE_PRECAPTURE_ID: {
1217             break;
1218         }
1219         case ANDROID_CONTROL_AE_STATE: {
1220             switch (value) {
1221                 case ANDROID_CONTROL_AE_STATE_INACTIVE:
1222                     msg = "INACTIVE";
1223                     ret = 0;
1224                     break;
1225                 case ANDROID_CONTROL_AE_STATE_SEARCHING:
1226                     msg = "SEARCHING";
1227                     ret = 0;
1228                     break;
1229                 case ANDROID_CONTROL_AE_STATE_CONVERGED:
1230                     msg = "CONVERGED";
1231                     ret = 0;
1232                     break;
1233                 case ANDROID_CONTROL_AE_STATE_LOCKED:
1234                     msg = "LOCKED";
1235                     ret = 0;
1236                     break;
1237                 case ANDROID_CONTROL_AE_STATE_FLASH_REQUIRED:
1238                     msg = "FLASH_REQUIRED";
1239                     ret = 0;
1240                     break;
1241                 case ANDROID_CONTROL_AE_STATE_PRECAPTURE:
1242                     msg = "PRECAPTURE";
1243                     ret = 0;
1244                     break;
1245                 default:
1246                     msg = "error: enum value out of range";
1247             }
1248             break;
1249         }
1250         case ANDROID_CONTROL_AF_STATE: {
1251             switch (value) {
1252                 case ANDROID_CONTROL_AF_STATE_INACTIVE:
1253                     msg = "INACTIVE";
1254                     ret = 0;
1255                     break;
1256                 case ANDROID_CONTROL_AF_STATE_PASSIVE_SCAN:
1257                     msg = "PASSIVE_SCAN";
1258                     ret = 0;
1259                     break;
1260                 case ANDROID_CONTROL_AF_STATE_PASSIVE_FOCUSED:
1261                     msg = "PASSIVE_FOCUSED";
1262                     ret = 0;
1263                     break;
1264                 case ANDROID_CONTROL_AF_STATE_ACTIVE_SCAN:
1265                     msg = "ACTIVE_SCAN";
1266                     ret = 0;
1267                     break;
1268                 case ANDROID_CONTROL_AF_STATE_FOCUSED_LOCKED:
1269                     msg = "FOCUSED_LOCKED";
1270                     ret = 0;
1271                     break;
1272                 case ANDROID_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED:
1273                     msg = "NOT_FOCUSED_LOCKED";
1274                     ret = 0;
1275                     break;
1276                 case ANDROID_CONTROL_AF_STATE_PASSIVE_UNFOCUSED:
1277                     msg = "PASSIVE_UNFOCUSED";
1278                     ret = 0;
1279                     break;
1280                 default:
1281                     msg = "error: enum value out of range";
1282             }
1283             break;
1284         }
1285         case ANDROID_CONTROL_AF_TRIGGER_ID: {
1286             break;
1287         }
1288         case ANDROID_CONTROL_AWB_STATE: {
1289             switch (value) {
1290                 case ANDROID_CONTROL_AWB_STATE_INACTIVE:
1291                     msg = "INACTIVE";
1292                     ret = 0;
1293                     break;
1294                 case ANDROID_CONTROL_AWB_STATE_SEARCHING:
1295                     msg = "SEARCHING";
1296                     ret = 0;
1297                     break;
1298                 case ANDROID_CONTROL_AWB_STATE_CONVERGED:
1299                     msg = "CONVERGED";
1300                     ret = 0;
1301                     break;
1302                 case ANDROID_CONTROL_AWB_STATE_LOCKED:
1303                     msg = "LOCKED";
1304                     ret = 0;
1305                     break;
1306                 default:
1307                     msg = "error: enum value out of range";
1308             }
1309             break;
1310         }
1311         case ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS: {
1312             break;
1313         }
1314         case ANDROID_CONTROL_AE_LOCK_AVAILABLE: {
1315             switch (value) {
1316                 case ANDROID_CONTROL_AE_LOCK_AVAILABLE_FALSE:
1317                     msg = "FALSE";
1318                     ret = 0;
1319                     break;
1320                 case ANDROID_CONTROL_AE_LOCK_AVAILABLE_TRUE:
1321                     msg = "TRUE";
1322                     ret = 0;
1323                     break;
1324                 default:
1325                     msg = "error: enum value out of range";
1326             }
1327             break;
1328         }
1329         case ANDROID_CONTROL_AWB_LOCK_AVAILABLE: {
1330             switch (value) {
1331                 case ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE:
1332                     msg = "FALSE";
1333                     ret = 0;
1334                     break;
1335                 case ANDROID_CONTROL_AWB_LOCK_AVAILABLE_TRUE:
1336                     msg = "TRUE";
1337                     ret = 0;
1338                     break;
1339                 default:
1340                     msg = "error: enum value out of range";
1341             }
1342             break;
1343         }
1344         case ANDROID_CONTROL_AVAILABLE_MODES: {
1345             break;
1346         }
1347         case ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE: {
1348             break;
1349         }
1350         case ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST: {
1351             break;
1352         }
1353 
1354         case ANDROID_DEMOSAIC_MODE: {
1355             switch (value) {
1356                 case ANDROID_DEMOSAIC_MODE_FAST:
1357                     msg = "FAST";
1358                     ret = 0;
1359                     break;
1360                 case ANDROID_DEMOSAIC_MODE_HIGH_QUALITY:
1361                     msg = "HIGH_QUALITY";
1362                     ret = 0;
1363                     break;
1364                 default:
1365                     msg = "error: enum value out of range";
1366             }
1367             break;
1368         }
1369 
1370         case ANDROID_EDGE_MODE: {
1371             switch (value) {
1372                 case ANDROID_EDGE_MODE_OFF:
1373                     msg = "OFF";
1374                     ret = 0;
1375                     break;
1376                 case ANDROID_EDGE_MODE_FAST:
1377                     msg = "FAST";
1378                     ret = 0;
1379                     break;
1380                 case ANDROID_EDGE_MODE_HIGH_QUALITY:
1381                     msg = "HIGH_QUALITY";
1382                     ret = 0;
1383                     break;
1384                 case ANDROID_EDGE_MODE_ZERO_SHUTTER_LAG:
1385                     msg = "ZERO_SHUTTER_LAG";
1386                     ret = 0;
1387                     break;
1388                 default:
1389                     msg = "error: enum value out of range";
1390             }
1391             break;
1392         }
1393         case ANDROID_EDGE_STRENGTH: {
1394             break;
1395         }
1396         case ANDROID_EDGE_AVAILABLE_EDGE_MODES: {
1397             break;
1398         }
1399 
1400         case ANDROID_FLASH_FIRING_POWER: {
1401             break;
1402         }
1403         case ANDROID_FLASH_FIRING_TIME: {
1404             break;
1405         }
1406         case ANDROID_FLASH_MODE: {
1407             switch (value) {
1408                 case ANDROID_FLASH_MODE_OFF:
1409                     msg = "OFF";
1410                     ret = 0;
1411                     break;
1412                 case ANDROID_FLASH_MODE_SINGLE:
1413                     msg = "SINGLE";
1414                     ret = 0;
1415                     break;
1416                 case ANDROID_FLASH_MODE_TORCH:
1417                     msg = "TORCH";
1418                     ret = 0;
1419                     break;
1420                 default:
1421                     msg = "error: enum value out of range";
1422             }
1423             break;
1424         }
1425         case ANDROID_FLASH_COLOR_TEMPERATURE: {
1426             break;
1427         }
1428         case ANDROID_FLASH_MAX_ENERGY: {
1429             break;
1430         }
1431         case ANDROID_FLASH_STATE: {
1432             switch (value) {
1433                 case ANDROID_FLASH_STATE_UNAVAILABLE:
1434                     msg = "UNAVAILABLE";
1435                     ret = 0;
1436                     break;
1437                 case ANDROID_FLASH_STATE_CHARGING:
1438                     msg = "CHARGING";
1439                     ret = 0;
1440                     break;
1441                 case ANDROID_FLASH_STATE_READY:
1442                     msg = "READY";
1443                     ret = 0;
1444                     break;
1445                 case ANDROID_FLASH_STATE_FIRED:
1446                     msg = "FIRED";
1447                     ret = 0;
1448                     break;
1449                 case ANDROID_FLASH_STATE_PARTIAL:
1450                     msg = "PARTIAL";
1451                     ret = 0;
1452                     break;
1453                 default:
1454                     msg = "error: enum value out of range";
1455             }
1456             break;
1457         }
1458 
1459         case ANDROID_FLASH_INFO_AVAILABLE: {
1460             switch (value) {
1461                 case ANDROID_FLASH_INFO_AVAILABLE_FALSE:
1462                     msg = "FALSE";
1463                     ret = 0;
1464                     break;
1465                 case ANDROID_FLASH_INFO_AVAILABLE_TRUE:
1466                     msg = "TRUE";
1467                     ret = 0;
1468                     break;
1469                 default:
1470                     msg = "error: enum value out of range";
1471             }
1472             break;
1473         }
1474         case ANDROID_FLASH_INFO_CHARGE_DURATION: {
1475             break;
1476         }
1477 
1478         case ANDROID_HOT_PIXEL_MODE: {
1479             switch (value) {
1480                 case ANDROID_HOT_PIXEL_MODE_OFF:
1481                     msg = "OFF";
1482                     ret = 0;
1483                     break;
1484                 case ANDROID_HOT_PIXEL_MODE_FAST:
1485                     msg = "FAST";
1486                     ret = 0;
1487                     break;
1488                 case ANDROID_HOT_PIXEL_MODE_HIGH_QUALITY:
1489                     msg = "HIGH_QUALITY";
1490                     ret = 0;
1491                     break;
1492                 default:
1493                     msg = "error: enum value out of range";
1494             }
1495             break;
1496         }
1497         case ANDROID_HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES: {
1498             break;
1499         }
1500 
1501         case ANDROID_JPEG_GPS_COORDINATES: {
1502             break;
1503         }
1504         case ANDROID_JPEG_GPS_PROCESSING_METHOD: {
1505             break;
1506         }
1507         case ANDROID_JPEG_GPS_TIMESTAMP: {
1508             break;
1509         }
1510         case ANDROID_JPEG_ORIENTATION: {
1511             break;
1512         }
1513         case ANDROID_JPEG_QUALITY: {
1514             break;
1515         }
1516         case ANDROID_JPEG_THUMBNAIL_QUALITY: {
1517             break;
1518         }
1519         case ANDROID_JPEG_THUMBNAIL_SIZE: {
1520             break;
1521         }
1522         case ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES: {
1523             break;
1524         }
1525         case ANDROID_JPEG_MAX_SIZE: {
1526             break;
1527         }
1528         case ANDROID_JPEG_SIZE: {
1529             break;
1530         }
1531 
1532         case ANDROID_LENS_APERTURE: {
1533             break;
1534         }
1535         case ANDROID_LENS_FILTER_DENSITY: {
1536             break;
1537         }
1538         case ANDROID_LENS_FOCAL_LENGTH: {
1539             break;
1540         }
1541         case ANDROID_LENS_FOCUS_DISTANCE: {
1542             break;
1543         }
1544         case ANDROID_LENS_OPTICAL_STABILIZATION_MODE: {
1545             switch (value) {
1546                 case ANDROID_LENS_OPTICAL_STABILIZATION_MODE_OFF:
1547                     msg = "OFF";
1548                     ret = 0;
1549                     break;
1550                 case ANDROID_LENS_OPTICAL_STABILIZATION_MODE_ON:
1551                     msg = "ON";
1552                     ret = 0;
1553                     break;
1554                 default:
1555                     msg = "error: enum value out of range";
1556             }
1557             break;
1558         }
1559         case ANDROID_LENS_FACING: {
1560             switch (value) {
1561                 case ANDROID_LENS_FACING_FRONT:
1562                     msg = "FRONT";
1563                     ret = 0;
1564                     break;
1565                 case ANDROID_LENS_FACING_BACK:
1566                     msg = "BACK";
1567                     ret = 0;
1568                     break;
1569                 case ANDROID_LENS_FACING_EXTERNAL:
1570                     msg = "EXTERNAL";
1571                     ret = 0;
1572                     break;
1573                 default:
1574                     msg = "error: enum value out of range";
1575             }
1576             break;
1577         }
1578         case ANDROID_LENS_POSE_ROTATION: {
1579             break;
1580         }
1581         case ANDROID_LENS_POSE_TRANSLATION: {
1582             break;
1583         }
1584         case ANDROID_LENS_FOCUS_RANGE: {
1585             break;
1586         }
1587         case ANDROID_LENS_STATE: {
1588             switch (value) {
1589                 case ANDROID_LENS_STATE_STATIONARY:
1590                     msg = "STATIONARY";
1591                     ret = 0;
1592                     break;
1593                 case ANDROID_LENS_STATE_MOVING:
1594                     msg = "MOVING";
1595                     ret = 0;
1596                     break;
1597                 default:
1598                     msg = "error: enum value out of range";
1599             }
1600             break;
1601         }
1602         case ANDROID_LENS_INTRINSIC_CALIBRATION: {
1603             break;
1604         }
1605         case ANDROID_LENS_RADIAL_DISTORTION: {
1606             break;
1607         }
1608 
1609         case ANDROID_LENS_INFO_AVAILABLE_APERTURES: {
1610             break;
1611         }
1612         case ANDROID_LENS_INFO_AVAILABLE_FILTER_DENSITIES: {
1613             break;
1614         }
1615         case ANDROID_LENS_INFO_AVAILABLE_FOCAL_LENGTHS: {
1616             break;
1617         }
1618         case ANDROID_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION: {
1619             break;
1620         }
1621         case ANDROID_LENS_INFO_HYPERFOCAL_DISTANCE: {
1622             break;
1623         }
1624         case ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE: {
1625             break;
1626         }
1627         case ANDROID_LENS_INFO_SHADING_MAP_SIZE: {
1628             break;
1629         }
1630         case ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION: {
1631             switch (value) {
1632                 case ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED:
1633                     msg = "UNCALIBRATED";
1634                     ret = 0;
1635                     break;
1636                 case ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE:
1637                     msg = "APPROXIMATE";
1638                     ret = 0;
1639                     break;
1640                 case ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED:
1641                     msg = "CALIBRATED";
1642                     ret = 0;
1643                     break;
1644                 default:
1645                     msg = "error: enum value out of range";
1646             }
1647             break;
1648         }
1649 
1650         case ANDROID_NOISE_REDUCTION_MODE: {
1651             switch (value) {
1652                 case ANDROID_NOISE_REDUCTION_MODE_OFF:
1653                     msg = "OFF";
1654                     ret = 0;
1655                     break;
1656                 case ANDROID_NOISE_REDUCTION_MODE_FAST:
1657                     msg = "FAST";
1658                     ret = 0;
1659                     break;
1660                 case ANDROID_NOISE_REDUCTION_MODE_HIGH_QUALITY:
1661                     msg = "HIGH_QUALITY";
1662                     ret = 0;
1663                     break;
1664                 case ANDROID_NOISE_REDUCTION_MODE_MINIMAL:
1665                     msg = "MINIMAL";
1666                     ret = 0;
1667                     break;
1668                 case ANDROID_NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG:
1669                     msg = "ZERO_SHUTTER_LAG";
1670                     ret = 0;
1671                     break;
1672                 default:
1673                     msg = "error: enum value out of range";
1674             }
1675             break;
1676         }
1677         case ANDROID_NOISE_REDUCTION_STRENGTH: {
1678             break;
1679         }
1680         case ANDROID_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES: {
1681             break;
1682         }
1683 
1684         case ANDROID_QUIRKS_METERING_CROP_REGION: {
1685             break;
1686         }
1687         case ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO: {
1688             break;
1689         }
1690         case ANDROID_QUIRKS_USE_ZSL_FORMAT: {
1691             break;
1692         }
1693         case ANDROID_QUIRKS_USE_PARTIAL_RESULT: {
1694             break;
1695         }
1696         case ANDROID_QUIRKS_PARTIAL_RESULT: {
1697             switch (value) {
1698                 case ANDROID_QUIRKS_PARTIAL_RESULT_FINAL:
1699                     msg = "FINAL";
1700                     ret = 0;
1701                     break;
1702                 case ANDROID_QUIRKS_PARTIAL_RESULT_PARTIAL:
1703                     msg = "PARTIAL";
1704                     ret = 0;
1705                     break;
1706                 default:
1707                     msg = "error: enum value out of range";
1708             }
1709             break;
1710         }
1711 
1712         case ANDROID_REQUEST_FRAME_COUNT: {
1713             break;
1714         }
1715         case ANDROID_REQUEST_ID: {
1716             break;
1717         }
1718         case ANDROID_REQUEST_INPUT_STREAMS: {
1719             break;
1720         }
1721         case ANDROID_REQUEST_METADATA_MODE: {
1722             switch (value) {
1723                 case ANDROID_REQUEST_METADATA_MODE_NONE:
1724                     msg = "NONE";
1725                     ret = 0;
1726                     break;
1727                 case ANDROID_REQUEST_METADATA_MODE_FULL:
1728                     msg = "FULL";
1729                     ret = 0;
1730                     break;
1731                 default:
1732                     msg = "error: enum value out of range";
1733             }
1734             break;
1735         }
1736         case ANDROID_REQUEST_OUTPUT_STREAMS: {
1737             break;
1738         }
1739         case ANDROID_REQUEST_TYPE: {
1740             switch (value) {
1741                 case ANDROID_REQUEST_TYPE_CAPTURE:
1742                     msg = "CAPTURE";
1743                     ret = 0;
1744                     break;
1745                 case ANDROID_REQUEST_TYPE_REPROCESS:
1746                     msg = "REPROCESS";
1747                     ret = 0;
1748                     break;
1749                 default:
1750                     msg = "error: enum value out of range";
1751             }
1752             break;
1753         }
1754         case ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS: {
1755             break;
1756         }
1757         case ANDROID_REQUEST_MAX_NUM_REPROCESS_STREAMS: {
1758             break;
1759         }
1760         case ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS: {
1761             break;
1762         }
1763         case ANDROID_REQUEST_PIPELINE_DEPTH: {
1764             break;
1765         }
1766         case ANDROID_REQUEST_PIPELINE_MAX_DEPTH: {
1767             break;
1768         }
1769         case ANDROID_REQUEST_PARTIAL_RESULT_COUNT: {
1770             break;
1771         }
1772         case ANDROID_REQUEST_AVAILABLE_CAPABILITIES: {
1773             switch (value) {
1774                 case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE:
1775                     msg = "BACKWARD_COMPATIBLE";
1776                     ret = 0;
1777                     break;
1778                 case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR:
1779                     msg = "MANUAL_SENSOR";
1780                     ret = 0;
1781                     break;
1782                 case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING:
1783                     msg = "MANUAL_POST_PROCESSING";
1784                     ret = 0;
1785                     break;
1786                 case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_RAW:
1787                     msg = "RAW";
1788                     ret = 0;
1789                     break;
1790                 case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING:
1791                     msg = "PRIVATE_REPROCESSING";
1792                     ret = 0;
1793                     break;
1794                 case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS:
1795                     msg = "READ_SENSOR_SETTINGS";
1796                     ret = 0;
1797                     break;
1798                 case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE:
1799                     msg = "BURST_CAPTURE";
1800                     ret = 0;
1801                     break;
1802                 case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING:
1803                     msg = "YUV_REPROCESSING";
1804                     ret = 0;
1805                     break;
1806                 case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT:
1807                     msg = "DEPTH_OUTPUT";
1808                     ret = 0;
1809                     break;
1810                 case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO:
1811                     msg = "CONSTRAINED_HIGH_SPEED_VIDEO";
1812                     ret = 0;
1813                     break;
1814                 default:
1815                     msg = "error: enum value out of range";
1816             }
1817             break;
1818         }
1819         case ANDROID_REQUEST_AVAILABLE_REQUEST_KEYS: {
1820             break;
1821         }
1822         case ANDROID_REQUEST_AVAILABLE_RESULT_KEYS: {
1823             break;
1824         }
1825         case ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS: {
1826             break;
1827         }
1828 
1829         case ANDROID_SCALER_CROP_REGION: {
1830             break;
1831         }
1832         case ANDROID_SCALER_AVAILABLE_FORMATS: {
1833             switch (value) {
1834                 case ANDROID_SCALER_AVAILABLE_FORMATS_RAW16:
1835                     msg = "RAW16";
1836                     ret = 0;
1837                     break;
1838                 case ANDROID_SCALER_AVAILABLE_FORMATS_RAW_OPAQUE:
1839                     msg = "RAW_OPAQUE";
1840                     ret = 0;
1841                     break;
1842                 case ANDROID_SCALER_AVAILABLE_FORMATS_YV12:
1843                     msg = "YV12";
1844                     ret = 0;
1845                     break;
1846                 case ANDROID_SCALER_AVAILABLE_FORMATS_YCrCb_420_SP:
1847                     msg = "YCrCb_420_SP";
1848                     ret = 0;
1849                     break;
1850                 case ANDROID_SCALER_AVAILABLE_FORMATS_IMPLEMENTATION_DEFINED:
1851                     msg = "IMPLEMENTATION_DEFINED";
1852                     ret = 0;
1853                     break;
1854                 case ANDROID_SCALER_AVAILABLE_FORMATS_YCbCr_420_888:
1855                     msg = "YCbCr_420_888";
1856                     ret = 0;
1857                     break;
1858                 case ANDROID_SCALER_AVAILABLE_FORMATS_BLOB:
1859                     msg = "BLOB";
1860                     ret = 0;
1861                     break;
1862                 default:
1863                     msg = "error: enum value out of range";
1864             }
1865             break;
1866         }
1867         case ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS: {
1868             break;
1869         }
1870         case ANDROID_SCALER_AVAILABLE_JPEG_SIZES: {
1871             break;
1872         }
1873         case ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM: {
1874             break;
1875         }
1876         case ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS: {
1877             break;
1878         }
1879         case ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES: {
1880             break;
1881         }
1882         case ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS: {
1883             break;
1884         }
1885         case ANDROID_SCALER_AVAILABLE_RAW_SIZES: {
1886             break;
1887         }
1888         case ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP: {
1889             break;
1890         }
1891         case ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS: {
1892             switch (value) {
1893                 case ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT:
1894                     msg = "OUTPUT";
1895                     ret = 0;
1896                     break;
1897                 case ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_INPUT:
1898                     msg = "INPUT";
1899                     ret = 0;
1900                     break;
1901                 default:
1902                     msg = "error: enum value out of range";
1903             }
1904             break;
1905         }
1906         case ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS: {
1907             break;
1908         }
1909         case ANDROID_SCALER_AVAILABLE_STALL_DURATIONS: {
1910             break;
1911         }
1912         case ANDROID_SCALER_CROPPING_TYPE: {
1913             switch (value) {
1914                 case ANDROID_SCALER_CROPPING_TYPE_CENTER_ONLY:
1915                     msg = "CENTER_ONLY";
1916                     ret = 0;
1917                     break;
1918                 case ANDROID_SCALER_CROPPING_TYPE_FREEFORM:
1919                     msg = "FREEFORM";
1920                     ret = 0;
1921                     break;
1922                 default:
1923                     msg = "error: enum value out of range";
1924             }
1925             break;
1926         }
1927 
1928         case ANDROID_SENSOR_EXPOSURE_TIME: {
1929             break;
1930         }
1931         case ANDROID_SENSOR_FRAME_DURATION: {
1932             break;
1933         }
1934         case ANDROID_SENSOR_SENSITIVITY: {
1935             break;
1936         }
1937         case ANDROID_SENSOR_REFERENCE_ILLUMINANT1: {
1938             switch (value) {
1939                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT:
1940                     msg = "DAYLIGHT";
1941                     ret = 0;
1942                     break;
1943                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT:
1944                     msg = "FLUORESCENT";
1945                     ret = 0;
1946                     break;
1947                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN:
1948                     msg = "TUNGSTEN";
1949                     ret = 0;
1950                     break;
1951                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLASH:
1952                     msg = "FLASH";
1953                     ret = 0;
1954                     break;
1955                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER:
1956                     msg = "FINE_WEATHER";
1957                     ret = 0;
1958                     break;
1959                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER:
1960                     msg = "CLOUDY_WEATHER";
1961                     ret = 0;
1962                     break;
1963                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_SHADE:
1964                     msg = "SHADE";
1965                     ret = 0;
1966                     break;
1967                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT:
1968                     msg = "DAYLIGHT_FLUORESCENT";
1969                     ret = 0;
1970                     break;
1971                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT:
1972                     msg = "DAY_WHITE_FLUORESCENT";
1973                     ret = 0;
1974                     break;
1975                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT:
1976                     msg = "COOL_WHITE_FLUORESCENT";
1977                     ret = 0;
1978                     break;
1979                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT:
1980                     msg = "WHITE_FLUORESCENT";
1981                     ret = 0;
1982                     break;
1983                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A:
1984                     msg = "STANDARD_A";
1985                     ret = 0;
1986                     break;
1987                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B:
1988                     msg = "STANDARD_B";
1989                     ret = 0;
1990                     break;
1991                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C:
1992                     msg = "STANDARD_C";
1993                     ret = 0;
1994                     break;
1995                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D55:
1996                     msg = "D55";
1997                     ret = 0;
1998                     break;
1999                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D65:
2000                     msg = "D65";
2001                     ret = 0;
2002                     break;
2003                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D75:
2004                     msg = "D75";
2005                     ret = 0;
2006                     break;
2007                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D50:
2008                     msg = "D50";
2009                     ret = 0;
2010                     break;
2011                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN:
2012                     msg = "ISO_STUDIO_TUNGSTEN";
2013                     ret = 0;
2014                     break;
2015                 default:
2016                     msg = "error: enum value out of range";
2017             }
2018             break;
2019         }
2020         case ANDROID_SENSOR_REFERENCE_ILLUMINANT2: {
2021             break;
2022         }
2023         case ANDROID_SENSOR_CALIBRATION_TRANSFORM1: {
2024             break;
2025         }
2026         case ANDROID_SENSOR_CALIBRATION_TRANSFORM2: {
2027             break;
2028         }
2029         case ANDROID_SENSOR_COLOR_TRANSFORM1: {
2030             break;
2031         }
2032         case ANDROID_SENSOR_COLOR_TRANSFORM2: {
2033             break;
2034         }
2035         case ANDROID_SENSOR_FORWARD_MATRIX1: {
2036             break;
2037         }
2038         case ANDROID_SENSOR_FORWARD_MATRIX2: {
2039             break;
2040         }
2041         case ANDROID_SENSOR_BASE_GAIN_FACTOR: {
2042             break;
2043         }
2044         case ANDROID_SENSOR_BLACK_LEVEL_PATTERN: {
2045             break;
2046         }
2047         case ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY: {
2048             break;
2049         }
2050         case ANDROID_SENSOR_ORIENTATION: {
2051             break;
2052         }
2053         case ANDROID_SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS: {
2054             break;
2055         }
2056         case ANDROID_SENSOR_TIMESTAMP: {
2057             break;
2058         }
2059         case ANDROID_SENSOR_TEMPERATURE: {
2060             break;
2061         }
2062         case ANDROID_SENSOR_NEUTRAL_COLOR_POINT: {
2063             break;
2064         }
2065         case ANDROID_SENSOR_NOISE_PROFILE: {
2066             break;
2067         }
2068         case ANDROID_SENSOR_PROFILE_HUE_SAT_MAP: {
2069             break;
2070         }
2071         case ANDROID_SENSOR_PROFILE_TONE_CURVE: {
2072             break;
2073         }
2074         case ANDROID_SENSOR_GREEN_SPLIT: {
2075             break;
2076         }
2077         case ANDROID_SENSOR_TEST_PATTERN_DATA: {
2078             break;
2079         }
2080         case ANDROID_SENSOR_TEST_PATTERN_MODE: {
2081             switch (value) {
2082                 case ANDROID_SENSOR_TEST_PATTERN_MODE_OFF:
2083                     msg = "OFF";
2084                     ret = 0;
2085                     break;
2086                 case ANDROID_SENSOR_TEST_PATTERN_MODE_SOLID_COLOR:
2087                     msg = "SOLID_COLOR";
2088                     ret = 0;
2089                     break;
2090                 case ANDROID_SENSOR_TEST_PATTERN_MODE_COLOR_BARS:
2091                     msg = "COLOR_BARS";
2092                     ret = 0;
2093                     break;
2094                 case ANDROID_SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY:
2095                     msg = "COLOR_BARS_FADE_TO_GRAY";
2096                     ret = 0;
2097                     break;
2098                 case ANDROID_SENSOR_TEST_PATTERN_MODE_PN9:
2099                     msg = "PN9";
2100                     ret = 0;
2101                     break;
2102                 case ANDROID_SENSOR_TEST_PATTERN_MODE_CUSTOM1:
2103                     msg = "CUSTOM1";
2104                     ret = 0;
2105                     break;
2106                 default:
2107                     msg = "error: enum value out of range";
2108             }
2109             break;
2110         }
2111         case ANDROID_SENSOR_AVAILABLE_TEST_PATTERN_MODES: {
2112             break;
2113         }
2114         case ANDROID_SENSOR_ROLLING_SHUTTER_SKEW: {
2115             break;
2116         }
2117         case ANDROID_SENSOR_OPTICAL_BLACK_REGIONS: {
2118             break;
2119         }
2120         case ANDROID_SENSOR_DYNAMIC_BLACK_LEVEL: {
2121             break;
2122         }
2123         case ANDROID_SENSOR_DYNAMIC_WHITE_LEVEL: {
2124             break;
2125         }
2126         case ANDROID_SENSOR_OPAQUE_RAW_SIZE: {
2127             break;
2128         }
2129 
2130         case ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE: {
2131             break;
2132         }
2133         case ANDROID_SENSOR_INFO_SENSITIVITY_RANGE: {
2134             break;
2135         }
2136         case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT: {
2137             switch (value) {
2138                 case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB:
2139                     msg = "RGGB";
2140                     ret = 0;
2141                     break;
2142                 case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG:
2143                     msg = "GRBG";
2144                     ret = 0;
2145                     break;
2146                 case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG:
2147                     msg = "GBRG";
2148                     ret = 0;
2149                     break;
2150                 case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR:
2151                     msg = "BGGR";
2152                     ret = 0;
2153                     break;
2154                 case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB:
2155                     msg = "RGB";
2156                     ret = 0;
2157                     break;
2158                 default:
2159                     msg = "error: enum value out of range";
2160             }
2161             break;
2162         }
2163         case ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE: {
2164             break;
2165         }
2166         case ANDROID_SENSOR_INFO_MAX_FRAME_DURATION: {
2167             break;
2168         }
2169         case ANDROID_SENSOR_INFO_PHYSICAL_SIZE: {
2170             break;
2171         }
2172         case ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE: {
2173             break;
2174         }
2175         case ANDROID_SENSOR_INFO_WHITE_LEVEL: {
2176             break;
2177         }
2178         case ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE: {
2179             switch (value) {
2180                 case ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN:
2181                     msg = "UNKNOWN";
2182                     ret = 0;
2183                     break;
2184                 case ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME:
2185                     msg = "REALTIME";
2186                     ret = 0;
2187                     break;
2188                 default:
2189                     msg = "error: enum value out of range";
2190             }
2191             break;
2192         }
2193         case ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED: {
2194             switch (value) {
2195                 case ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED_FALSE:
2196                     msg = "FALSE";
2197                     ret = 0;
2198                     break;
2199                 case ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED_TRUE:
2200                     msg = "TRUE";
2201                     ret = 0;
2202                     break;
2203                 default:
2204                     msg = "error: enum value out of range";
2205             }
2206             break;
2207         }
2208         case ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE: {
2209             break;
2210         }
2211 
2212         case ANDROID_SHADING_MODE: {
2213             switch (value) {
2214                 case ANDROID_SHADING_MODE_OFF:
2215                     msg = "OFF";
2216                     ret = 0;
2217                     break;
2218                 case ANDROID_SHADING_MODE_FAST:
2219                     msg = "FAST";
2220                     ret = 0;
2221                     break;
2222                 case ANDROID_SHADING_MODE_HIGH_QUALITY:
2223                     msg = "HIGH_QUALITY";
2224                     ret = 0;
2225                     break;
2226                 default:
2227                     msg = "error: enum value out of range";
2228             }
2229             break;
2230         }
2231         case ANDROID_SHADING_STRENGTH: {
2232             break;
2233         }
2234         case ANDROID_SHADING_AVAILABLE_MODES: {
2235             break;
2236         }
2237 
2238         case ANDROID_STATISTICS_FACE_DETECT_MODE: {
2239             switch (value) {
2240                 case ANDROID_STATISTICS_FACE_DETECT_MODE_OFF:
2241                     msg = "OFF";
2242                     ret = 0;
2243                     break;
2244                 case ANDROID_STATISTICS_FACE_DETECT_MODE_SIMPLE:
2245                     msg = "SIMPLE";
2246                     ret = 0;
2247                     break;
2248                 case ANDROID_STATISTICS_FACE_DETECT_MODE_FULL:
2249                     msg = "FULL";
2250                     ret = 0;
2251                     break;
2252                 default:
2253                     msg = "error: enum value out of range";
2254             }
2255             break;
2256         }
2257         case ANDROID_STATISTICS_HISTOGRAM_MODE: {
2258             switch (value) {
2259                 case ANDROID_STATISTICS_HISTOGRAM_MODE_OFF:
2260                     msg = "OFF";
2261                     ret = 0;
2262                     break;
2263                 case ANDROID_STATISTICS_HISTOGRAM_MODE_ON:
2264                     msg = "ON";
2265                     ret = 0;
2266                     break;
2267                 default:
2268                     msg = "error: enum value out of range";
2269             }
2270             break;
2271         }
2272         case ANDROID_STATISTICS_SHARPNESS_MAP_MODE: {
2273             switch (value) {
2274                 case ANDROID_STATISTICS_SHARPNESS_MAP_MODE_OFF:
2275                     msg = "OFF";
2276                     ret = 0;
2277                     break;
2278                 case ANDROID_STATISTICS_SHARPNESS_MAP_MODE_ON:
2279                     msg = "ON";
2280                     ret = 0;
2281                     break;
2282                 default:
2283                     msg = "error: enum value out of range";
2284             }
2285             break;
2286         }
2287         case ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE: {
2288             switch (value) {
2289                 case ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE_OFF:
2290                     msg = "OFF";
2291                     ret = 0;
2292                     break;
2293                 case ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE_ON:
2294                     msg = "ON";
2295                     ret = 0;
2296                     break;
2297                 default:
2298                     msg = "error: enum value out of range";
2299             }
2300             break;
2301         }
2302         case ANDROID_STATISTICS_FACE_IDS: {
2303             break;
2304         }
2305         case ANDROID_STATISTICS_FACE_LANDMARKS: {
2306             break;
2307         }
2308         case ANDROID_STATISTICS_FACE_RECTANGLES: {
2309             break;
2310         }
2311         case ANDROID_STATISTICS_FACE_SCORES: {
2312             break;
2313         }
2314         case ANDROID_STATISTICS_HISTOGRAM: {
2315             break;
2316         }
2317         case ANDROID_STATISTICS_SHARPNESS_MAP: {
2318             break;
2319         }
2320         case ANDROID_STATISTICS_LENS_SHADING_CORRECTION_MAP: {
2321             break;
2322         }
2323         case ANDROID_STATISTICS_LENS_SHADING_MAP: {
2324             break;
2325         }
2326         case ANDROID_STATISTICS_PREDICTED_COLOR_GAINS: {
2327             break;
2328         }
2329         case ANDROID_STATISTICS_PREDICTED_COLOR_TRANSFORM: {
2330             break;
2331         }
2332         case ANDROID_STATISTICS_SCENE_FLICKER: {
2333             switch (value) {
2334                 case ANDROID_STATISTICS_SCENE_FLICKER_NONE:
2335                     msg = "NONE";
2336                     ret = 0;
2337                     break;
2338                 case ANDROID_STATISTICS_SCENE_FLICKER_50HZ:
2339                     msg = "50HZ";
2340                     ret = 0;
2341                     break;
2342                 case ANDROID_STATISTICS_SCENE_FLICKER_60HZ:
2343                     msg = "60HZ";
2344                     ret = 0;
2345                     break;
2346                 default:
2347                     msg = "error: enum value out of range";
2348             }
2349             break;
2350         }
2351         case ANDROID_STATISTICS_HOT_PIXEL_MAP: {
2352             break;
2353         }
2354         case ANDROID_STATISTICS_LENS_SHADING_MAP_MODE: {
2355             switch (value) {
2356                 case ANDROID_STATISTICS_LENS_SHADING_MAP_MODE_OFF:
2357                     msg = "OFF";
2358                     ret = 0;
2359                     break;
2360                 case ANDROID_STATISTICS_LENS_SHADING_MAP_MODE_ON:
2361                     msg = "ON";
2362                     ret = 0;
2363                     break;
2364                 default:
2365                     msg = "error: enum value out of range";
2366             }
2367             break;
2368         }
2369 
2370         case ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES: {
2371             break;
2372         }
2373         case ANDROID_STATISTICS_INFO_HISTOGRAM_BUCKET_COUNT: {
2374             break;
2375         }
2376         case ANDROID_STATISTICS_INFO_MAX_FACE_COUNT: {
2377             break;
2378         }
2379         case ANDROID_STATISTICS_INFO_MAX_HISTOGRAM_COUNT: {
2380             break;
2381         }
2382         case ANDROID_STATISTICS_INFO_MAX_SHARPNESS_MAP_VALUE: {
2383             break;
2384         }
2385         case ANDROID_STATISTICS_INFO_SHARPNESS_MAP_SIZE: {
2386             break;
2387         }
2388         case ANDROID_STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES: {
2389             break;
2390         }
2391         case ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES: {
2392             break;
2393         }
2394 
2395         case ANDROID_TONEMAP_CURVE_BLUE: {
2396             break;
2397         }
2398         case ANDROID_TONEMAP_CURVE_GREEN: {
2399             break;
2400         }
2401         case ANDROID_TONEMAP_CURVE_RED: {
2402             break;
2403         }
2404         case ANDROID_TONEMAP_MODE: {
2405             switch (value) {
2406                 case ANDROID_TONEMAP_MODE_CONTRAST_CURVE:
2407                     msg = "CONTRAST_CURVE";
2408                     ret = 0;
2409                     break;
2410                 case ANDROID_TONEMAP_MODE_FAST:
2411                     msg = "FAST";
2412                     ret = 0;
2413                     break;
2414                 case ANDROID_TONEMAP_MODE_HIGH_QUALITY:
2415                     msg = "HIGH_QUALITY";
2416                     ret = 0;
2417                     break;
2418                 case ANDROID_TONEMAP_MODE_GAMMA_VALUE:
2419                     msg = "GAMMA_VALUE";
2420                     ret = 0;
2421                     break;
2422                 case ANDROID_TONEMAP_MODE_PRESET_CURVE:
2423                     msg = "PRESET_CURVE";
2424                     ret = 0;
2425                     break;
2426                 default:
2427                     msg = "error: enum value out of range";
2428             }
2429             break;
2430         }
2431         case ANDROID_TONEMAP_MAX_CURVE_POINTS: {
2432             break;
2433         }
2434         case ANDROID_TONEMAP_AVAILABLE_TONE_MAP_MODES: {
2435             break;
2436         }
2437         case ANDROID_TONEMAP_GAMMA: {
2438             break;
2439         }
2440         case ANDROID_TONEMAP_PRESET_CURVE: {
2441             switch (value) {
2442                 case ANDROID_TONEMAP_PRESET_CURVE_SRGB:
2443                     msg = "SRGB";
2444                     ret = 0;
2445                     break;
2446                 case ANDROID_TONEMAP_PRESET_CURVE_REC709:
2447                     msg = "REC709";
2448                     ret = 0;
2449                     break;
2450                 default:
2451                     msg = "error: enum value out of range";
2452             }
2453             break;
2454         }
2455 
2456         case ANDROID_LED_TRANSMIT: {
2457             switch (value) {
2458                 case ANDROID_LED_TRANSMIT_OFF:
2459                     msg = "OFF";
2460                     ret = 0;
2461                     break;
2462                 case ANDROID_LED_TRANSMIT_ON:
2463                     msg = "ON";
2464                     ret = 0;
2465                     break;
2466                 default:
2467                     msg = "error: enum value out of range";
2468             }
2469             break;
2470         }
2471         case ANDROID_LED_AVAILABLE_LEDS: {
2472             switch (value) {
2473                 case ANDROID_LED_AVAILABLE_LEDS_TRANSMIT:
2474                     msg = "TRANSMIT";
2475                     ret = 0;
2476                     break;
2477                 default:
2478                     msg = "error: enum value out of range";
2479             }
2480             break;
2481         }
2482 
2483         case ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL: {
2484             switch (value) {
2485                 case ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED:
2486                     msg = "LIMITED";
2487                     ret = 0;
2488                     break;
2489                 case ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL:
2490                     msg = "FULL";
2491                     ret = 0;
2492                     break;
2493                 case ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY:
2494                     msg = "LEGACY";
2495                     ret = 0;
2496                     break;
2497                 case ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_3:
2498                     msg = "3";
2499                     ret = 0;
2500                     break;
2501                 default:
2502                     msg = "error: enum value out of range";
2503             }
2504             break;
2505         }
2506 
2507         case ANDROID_BLACK_LEVEL_LOCK: {
2508             switch (value) {
2509                 case ANDROID_BLACK_LEVEL_LOCK_OFF:
2510                     msg = "OFF";
2511                     ret = 0;
2512                     break;
2513                 case ANDROID_BLACK_LEVEL_LOCK_ON:
2514                     msg = "ON";
2515                     ret = 0;
2516                     break;
2517                 default:
2518                     msg = "error: enum value out of range";
2519             }
2520             break;
2521         }
2522 
2523         case ANDROID_SYNC_FRAME_NUMBER: {
2524             switch (value) {
2525                 case ANDROID_SYNC_FRAME_NUMBER_CONVERGING:
2526                     msg = "CONVERGING";
2527                     ret = 0;
2528                     break;
2529                 case ANDROID_SYNC_FRAME_NUMBER_UNKNOWN:
2530                     msg = "UNKNOWN";
2531                     ret = 0;
2532                     break;
2533                 default:
2534                     msg = "error: enum value out of range";
2535             }
2536             break;
2537         }
2538         case ANDROID_SYNC_MAX_LATENCY: {
2539             switch (value) {
2540                 case ANDROID_SYNC_MAX_LATENCY_PER_FRAME_CONTROL:
2541                     msg = "PER_FRAME_CONTROL";
2542                     ret = 0;
2543                     break;
2544                 case ANDROID_SYNC_MAX_LATENCY_UNKNOWN:
2545                     msg = "UNKNOWN";
2546                     ret = 0;
2547                     break;
2548                 default:
2549                     msg = "error: enum value out of range";
2550             }
2551             break;
2552         }
2553 
2554         case ANDROID_REPROCESS_EFFECTIVE_EXPOSURE_FACTOR: {
2555             break;
2556         }
2557         case ANDROID_REPROCESS_MAX_CAPTURE_STALL: {
2558             break;
2559         }
2560 
2561         case ANDROID_DEPTH_MAX_DEPTH_SAMPLES: {
2562             break;
2563         }
2564         case ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS: {
2565             switch (value) {
2566                 case ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_OUTPUT:
2567                     msg = "OUTPUT";
2568                     ret = 0;
2569                     break;
2570                 case ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_INPUT:
2571                     msg = "INPUT";
2572                     ret = 0;
2573                     break;
2574                 default:
2575                     msg = "error: enum value out of range";
2576             }
2577             break;
2578         }
2579         case ANDROID_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS: {
2580             break;
2581         }
2582         case ANDROID_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS: {
2583             break;
2584         }
2585         case ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE: {
2586             switch (value) {
2587                 case ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE_FALSE:
2588                     msg = "FALSE";
2589                     ret = 0;
2590                     break;
2591                 case ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE_TRUE:
2592                     msg = "TRUE";
2593                     ret = 0;
2594                     break;
2595                 default:
2596                     msg = "error: enum value out of range";
2597             }
2598             break;
2599         }
2600 
2601     }
2602 
2603     strncpy(dst, msg, size - 1);
2604     dst[size - 1] = '\0';
2605 
2606     return ret;
2607 }
2608 
2609 
2610 #define CAMERA_METADATA_ENUM_STRING_MAX_SIZE 29
2611