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