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