Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013 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 | package android.hardware.photography; |
| 18 | |
| 19 | import static android.hardware.photography.CameraMetadata.Key; |
| 20 | |
| 21 | /** |
| 22 | * ! Do not edit this file directly ! |
| 23 | * |
| 24 | * Generated automatically from CameraPropertiesKeys.mako |
| 25 | * |
| 26 | * TODO: Include a hash of the input files here that the build can check. |
| 27 | */ |
| 28 | |
| 29 | /** |
| 30 | * The base class for camera controls and information. |
| 31 | * |
| 32 | * This class defines the basic key/value map used for querying for camera |
| 33 | * characteristics or capture results, and for setting camera request |
| 34 | * parameters. |
| 35 | * |
| 36 | * @see CameraProperties |
| 37 | * @see CameraMetadata |
| 38 | * @hide |
| 39 | **/ |
| 40 | public final class CameraPropertiesKeys { |
| 41 | public static final class Control { |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 42 | public static final Key<byte[]> AE_AVAILABLE_ANTIBANDING_MODES = |
| 43 | new Key<byte[]>("android.control.aeAvailableAntibandingModes", byte[].class); |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 44 | public static final Key<int[]> AE_AVAILABLE_TARGET_FPS_RANGES = |
| 45 | new Key<int[]>("android.control.aeAvailableTargetFpsRanges", int[].class); |
| 46 | public static final Key<int[]> AE_COMPENSATION_RANGE = |
| 47 | new Key<int[]>("android.control.aeCompensationRange", int[].class); |
| 48 | public static final Key<Rational> AE_COMPENSATION_STEP = |
| 49 | new Key<Rational>("android.control.aeCompensationStep", Rational.class); |
| 50 | public static final Key<byte[]> AF_AVAILABLE_MODES = |
| 51 | new Key<byte[]>("android.control.afAvailableModes", byte[].class); |
| 52 | public static final Key<byte[]> AVAILABLE_EFFECTS = |
| 53 | new Key<byte[]>("android.control.availableEffects", byte[].class); |
| 54 | public static final Key<byte[]> AVAILABLE_SCENE_MODES = |
| 55 | new Key<byte[]>("android.control.availableSceneModes", byte[].class); |
| 56 | public static final Key<byte[]> AVAILABLE_VIDEO_STABILIZATION_MODES = |
| 57 | new Key<byte[]>("android.control.availableVideoStabilizationModes", byte[].class); |
| 58 | public static final Key<byte[]> AWB_AVAILABLE_MODES = |
| 59 | new Key<byte[]>("android.control.awbAvailableModes", byte[].class); |
| 60 | public static final Key<Integer> MAX_REGIONS = |
| 61 | new Key<Integer>("android.control.maxRegions", int.class); |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 62 | |
| 63 | } |
Eino-Ville Talvala | 855ccce | 2013-07-15 15:19:22 -0700 | [diff] [blame] | 64 | |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 65 | public static final class Flash { |
| 66 | public static final class Info { |
| 67 | public static final Key<Byte> AVAILABLE = |
| 68 | new Key<Byte>("android.flash.info.available", byte.class); |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 69 | } |
| 70 | |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 71 | } |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 72 | |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 73 | public static final class Jpeg { |
Igor Murashkin | 27b62ae | 2013-07-17 19:15:57 -0700 | [diff] [blame] | 74 | public static final Key<android.hardware.photography.Size[]> AVAILABLE_THUMBNAIL_SIZES = |
| 75 | new Key<android.hardware.photography.Size[]>("android.jpeg.availableThumbnailSizes", android.hardware.photography.Size[].class); |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 76 | |
| 77 | } |
Eino-Ville Talvala | 855ccce | 2013-07-15 15:19:22 -0700 | [diff] [blame] | 78 | |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 79 | public static final class Lens { |
| 80 | public static final class Info { |
| 81 | public static final Key<float[]> AVAILABLE_APERTURES = |
| 82 | new Key<float[]>("android.lens.info.availableApertures", float[].class); |
| 83 | public static final Key<float[]> AVAILABLE_FILTER_DENSITIES = |
| 84 | new Key<float[]>("android.lens.info.availableFilterDensities", float[].class); |
| 85 | public static final Key<float[]> AVAILABLE_FOCAL_LENGTHS = |
| 86 | new Key<float[]>("android.lens.info.availableFocalLengths", float[].class); |
| 87 | public static final Key<byte[]> AVAILABLE_OPTICAL_STABILIZATION = |
| 88 | new Key<byte[]>("android.lens.info.availableOpticalStabilization", byte[].class); |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 89 | public static final Key<Float> HYPERFOCAL_DISTANCE = |
| 90 | new Key<Float>("android.lens.info.hyperfocalDistance", float.class); |
| 91 | public static final Key<Float> MINIMUM_FOCUS_DISTANCE = |
| 92 | new Key<Float>("android.lens.info.minimumFocusDistance", float.class); |
Igor Murashkin | 27b62ae | 2013-07-17 19:15:57 -0700 | [diff] [blame] | 93 | public static final Key<android.hardware.photography.Size> SHADING_MAP_SIZE = |
| 94 | new Key<android.hardware.photography.Size>("android.lens.info.shadingMapSize", android.hardware.photography.Size.class); |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 95 | } |
| 96 | |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 97 | public static final class FacingKey extends Key<Lens.FacingKey.Enum> { |
| 98 | public enum Enum { |
| 99 | FRONT, |
| 100 | BACK; |
| 101 | } |
| 102 | |
| 103 | public static final Enum FRONT = Enum.FRONT; |
| 104 | public static final Enum BACK = Enum.BACK; |
| 105 | |
| 106 | // TODO: remove requirement for constructor by making Key an interface |
| 107 | private FacingKey(String name) { |
| 108 | super(name, Lens.FacingKey.Enum.class); |
| 109 | } |
Igor Murashkin | d7bf177 | 2013-07-12 18:01:31 -0700 | [diff] [blame] | 110 | |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 111 | } |
| 112 | |
| 113 | public static final Key<Lens.FacingKey.Enum> FACING = |
| 114 | new FacingKey("android.lens.facing"); |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 115 | |
| 116 | } |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 117 | |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 118 | public static final class Request { |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 119 | public static final Key<int[]> MAX_NUM_OUTPUT_STREAMS = |
| 120 | new Key<int[]>("android.request.maxNumOutputStreams", int[].class); |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 121 | |
| 122 | } |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 123 | |
Eino-Ville Talvala | 855ccce | 2013-07-15 15:19:22 -0700 | [diff] [blame] | 124 | public static final class Scaler { |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 125 | |
| 126 | public static final class AvailableFormatsKey extends Key<Scaler.AvailableFormatsKey.Enum[]> { |
| 127 | public enum Enum { |
| 128 | RAW_SENSOR, |
| 129 | YV12, |
| 130 | YCrCb_420_SP, |
| 131 | IMPLEMENTATION_DEFINED, |
| 132 | YCbCr_420_888, |
| 133 | BLOB; |
| 134 | } |
| 135 | |
| 136 | public static final Enum RAW_SENSOR = Enum.RAW_SENSOR; |
| 137 | public static final Enum YV12 = Enum.YV12; |
| 138 | public static final Enum YCrCb_420_SP = Enum.YCrCb_420_SP; |
| 139 | public static final Enum IMPLEMENTATION_DEFINED = Enum.IMPLEMENTATION_DEFINED; |
| 140 | public static final Enum YCbCr_420_888 = Enum.YCbCr_420_888; |
| 141 | public static final Enum BLOB = Enum.BLOB; |
| 142 | |
| 143 | // TODO: remove requirement for constructor by making Key an interface |
| 144 | private AvailableFormatsKey(String name) { |
| 145 | super(name, Scaler.AvailableFormatsKey.Enum[].class); |
| 146 | } |
Igor Murashkin | d7bf177 | 2013-07-12 18:01:31 -0700 | [diff] [blame] | 147 | |
| 148 | static { |
| 149 | CameraMetadata.registerEnumValues(Scaler.AvailableFormatsKey.Enum.class, new int[] { |
| 150 | 0x20, // RAW_SENSOR |
| 151 | 0x32315659, // YV12 |
| 152 | 0x11, // YCrCb_420_SP |
| 153 | 0x22, // IMPLEMENTATION_DEFINED |
| 154 | 0x23, // YCbCr_420_888 |
| 155 | 0x21 // BLOB |
| 156 | }); |
| 157 | } |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 158 | } |
| 159 | |
| 160 | public static final Key<Scaler.AvailableFormatsKey.Enum[]> AVAILABLE_FORMATS = |
| 161 | new AvailableFormatsKey("android.scaler.availableFormats"); |
| 162 | public static final Key<long[]> AVAILABLE_JPEG_MIN_DURATIONS = |
| 163 | new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class); |
Igor Murashkin | 27b62ae | 2013-07-17 19:15:57 -0700 | [diff] [blame] | 164 | public static final Key<android.hardware.photography.Size[]> AVAILABLE_JPEG_SIZES = |
| 165 | new Key<android.hardware.photography.Size[]>("android.scaler.availableJpegSizes", android.hardware.photography.Size[].class); |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 166 | public static final Key<Float> AVAILABLE_MAX_DIGITAL_ZOOM = |
| 167 | new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class); |
| 168 | public static final Key<long[]> AVAILABLE_PROCESSED_MIN_DURATIONS = |
| 169 | new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class); |
Igor Murashkin | 27b62ae | 2013-07-17 19:15:57 -0700 | [diff] [blame] | 170 | public static final Key<android.hardware.photography.Size[]> AVAILABLE_PROCESSED_SIZES = |
| 171 | new Key<android.hardware.photography.Size[]>("android.scaler.availableProcessedSizes", android.hardware.photography.Size[].class); |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 172 | |
| 173 | } |
Eino-Ville Talvala | 855ccce | 2013-07-15 15:19:22 -0700 | [diff] [blame] | 174 | |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 175 | public static final class Sensor { |
| 176 | public static final class Info { |
Igor Murashkin | 27b62ae | 2013-07-17 19:15:57 -0700 | [diff] [blame] | 177 | public static final Key<android.graphics.Rect> ACTIVE_ARRAY_SIZE = |
| 178 | new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class); |
Zhijun He | d84bd0a | 2013-07-17 12:08:24 -0700 | [diff] [blame] | 179 | public static final Key<int[]> SENSITIVITY_RANGE = |
| 180 | new Key<int[]>("android.sensor.info.sensitivityRange", int[].class); |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 181 | public static final Key<long[]> EXPOSURE_TIME_RANGE = |
| 182 | new Key<long[]>("android.sensor.info.exposureTimeRange", long[].class); |
| 183 | public static final Key<Long> MAX_FRAME_DURATION = |
| 184 | new Key<Long>("android.sensor.info.maxFrameDuration", long.class); |
Igor Murashkin | 27b62ae | 2013-07-17 19:15:57 -0700 | [diff] [blame] | 185 | public static final Key<android.hardware.photography.Size> PHYSICAL_SIZE = |
| 186 | new Key<android.hardware.photography.Size>("android.sensor.info.physicalSize", android.hardware.photography.Size.class); |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 187 | } |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 188 | public static final Key<Rational> BASE_GAIN_FACTOR = |
| 189 | new Key<Rational>("android.sensor.baseGainFactor", Rational.class); |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 190 | public static final Key<Integer> MAX_ANALOG_SENSITIVITY = |
| 191 | new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class); |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 192 | public static final Key<Integer> ORIENTATION = |
| 193 | new Key<Integer>("android.sensor.orientation", int.class); |
| 194 | |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 195 | } |
Eino-Ville Talvala | 855ccce | 2013-07-15 15:19:22 -0700 | [diff] [blame] | 196 | |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 197 | public static final class Statistics { |
| 198 | public static final class Info { |
| 199 | public static final Key<byte[]> AVAILABLE_FACE_DETECT_MODES = |
| 200 | new Key<byte[]>("android.statistics.info.availableFaceDetectModes", byte[].class); |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 201 | public static final Key<Integer> MAX_FACE_COUNT = |
| 202 | new Key<Integer>("android.statistics.info.maxFaceCount", int.class); |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 203 | } |
| 204 | |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 205 | } |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 206 | |
Eino-Ville Talvala | 855ccce | 2013-07-15 15:19:22 -0700 | [diff] [blame] | 207 | public static final class Tonemap { |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 208 | public static final Key<Integer> MAX_CURVE_POINTS = |
| 209 | new Key<Integer>("android.tonemap.maxCurvePoints", int.class); |
| 210 | |
| 211 | } |
Eino-Ville Talvala | 855ccce | 2013-07-15 15:19:22 -0700 | [diff] [blame] | 212 | |
| 213 | /** |
| 214 | * @hide |
| 215 | */ |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 216 | public static final class Led { |
| 217 | |
Eino-Ville Talvala | 855ccce | 2013-07-15 15:19:22 -0700 | [diff] [blame] | 218 | /** |
| 219 | * @hide |
| 220 | */ |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 221 | public static final class AvailableLedsKey extends Key<Led.AvailableLedsKey.Enum[]> { |
| 222 | public enum Enum { |
| 223 | TRANSMIT; |
| 224 | } |
| 225 | |
| 226 | public static final Enum TRANSMIT = Enum.TRANSMIT; |
| 227 | |
| 228 | // TODO: remove requirement for constructor by making Key an interface |
| 229 | private AvailableLedsKey(String name) { |
| 230 | super(name, Led.AvailableLedsKey.Enum[].class); |
| 231 | } |
Igor Murashkin | d7bf177 | 2013-07-12 18:01:31 -0700 | [diff] [blame] | 232 | |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 233 | } |
| 234 | |
Eino-Ville Talvala | 855ccce | 2013-07-15 15:19:22 -0700 | [diff] [blame] | 235 | /** |
| 236 | * @hide |
| 237 | */ |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 238 | public static final Key<Led.AvailableLedsKey.Enum[]> AVAILABLE_LEDS = |
| 239 | new AvailableLedsKey("android.led.availableLeds"); |
| 240 | |
| 241 | } |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 242 | |
Eino-Ville Talvala | 855ccce | 2013-07-15 15:19:22 -0700 | [diff] [blame] | 243 | public static final class Info { |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 244 | |
| 245 | public static final class SupportedHardwareLevelKey extends Key<Info.SupportedHardwareLevelKey.Enum> { |
| 246 | public enum Enum { |
| 247 | LIMITED, |
| 248 | FULL; |
| 249 | } |
| 250 | |
| 251 | public static final Enum LIMITED = Enum.LIMITED; |
| 252 | public static final Enum FULL = Enum.FULL; |
| 253 | |
| 254 | // TODO: remove requirement for constructor by making Key an interface |
| 255 | private SupportedHardwareLevelKey(String name) { |
| 256 | super(name, Info.SupportedHardwareLevelKey.Enum.class); |
| 257 | } |
Igor Murashkin | d7bf177 | 2013-07-12 18:01:31 -0700 | [diff] [blame] | 258 | |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 259 | } |
| 260 | |
| 261 | public static final Key<Info.SupportedHardwareLevelKey.Enum> SUPPORTED_HARDWARE_LEVEL = |
| 262 | new SupportedHardwareLevelKey("android.info.supportedHardwareLevel"); |
| 263 | |
| 264 | } |
Eino-Ville Talvala | 855ccce | 2013-07-15 15:19:22 -0700 | [diff] [blame] | 265 | |
Igor Murashkin | b9dd637 | 2013-07-11 19:37:04 -0700 | [diff] [blame] | 266 | } |
| 267 | |
| 268 | |