|
16 | 16 |
|
17 | 17 | /** An interface allowing access to the different characteristics of the device's camera. */
|
18 | 18 | public interface CameraProperties {
|
| 19 | + |
| 20 | + /** |
| 21 | + * Returns the name (or identifier) of the camera device. |
| 22 | + * |
| 23 | + * @return String The name of the camera device. |
| 24 | + */ |
19 | 25 | String getCameraName();
|
20 | 26 |
|
| 27 | + /** |
| 28 | + * Returns the list of frame rate ranges for @see android.control.aeTargetFpsRange supported by |
| 29 | + * this camera device. |
| 30 | + * |
| 31 | + * <p>By default maps to the @see |
| 32 | + * android.hardware.camera2.CameraCharacteristics#CONTROL_AE_TARGET_FPS_RANGE key. |
| 33 | + * |
| 34 | + * @return android.util.Range<Integer>[] List of frame rate ranges supported by this camera |
| 35 | + * device. |
| 36 | + */ |
21 | 37 | Range<Integer>[] getControlAutoExposureAvailableTargetFpsRanges();
|
22 | 38 |
|
| 39 | + /** |
| 40 | + * Returns the maximum and minimum exposure compensation values for @see |
| 41 | + * android.control.aeExposureCompensation, in counts of @see android.control.aeCompensationStep, |
| 42 | + * that are supported by this camera device. |
| 43 | + * |
| 44 | + * <p>By default maps to the @see |
| 45 | + * android.hardware.camera2.CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE key. |
| 46 | + * |
| 47 | + * @return android.util.Range<Integer> Maximum and minimum exposure compensation supported by this |
| 48 | + * camera device. |
| 49 | + */ |
23 | 50 | Range<Integer> getControlAutoExposureCompensationRange();
|
24 | 51 |
|
| 52 | + /** |
| 53 | + * Returns the smallest step by which the exposure compensation can be changed. |
| 54 | + * |
| 55 | + * <p>By default maps to the @see |
| 56 | + * android.hardware.camera2.CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP key. |
| 57 | + * |
| 58 | + * @return double Smallest step by which the exposure compensation can be changed. |
| 59 | + */ |
25 | 60 | double getControlAutoExposureCompensationStep();
|
26 | 61 |
|
| 62 | + /** |
| 63 | + * Returns a list of auto-focus modes for @see android.control.afMode that are supported by this |
| 64 | + * camera device. |
| 65 | + * |
| 66 | + * <p>By default maps to the @see |
| 67 | + * android.hardware.camera2.CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES key. |
| 68 | + * |
| 69 | + * @return int[] List of auto-focus modes supported by this camera device. |
| 70 | + */ |
27 | 71 | int[] getControlAutoFocusAvailableModes();
|
28 | 72 |
|
| 73 | + /** |
| 74 | + * Returns the maximum number of metering regions that can be used by the auto-exposure routine. |
| 75 | + * |
| 76 | + * <p>By default maps to the @see |
| 77 | + * android.hardware.camera2.CameraCharacteristics#CONTROL_MAX_REGIONS_AE key. |
| 78 | + * |
| 79 | + * @return Integer Maximum number of metering regions that can be used by the auto-exposure |
| 80 | + * routine. |
| 81 | + */ |
29 | 82 | Integer getControlMaxRegionsAutoExposure();
|
30 | 83 |
|
| 84 | + /** |
| 85 | + * Returns the maximum number of metering regions that can be used by the auto-focus routine. |
| 86 | + * |
| 87 | + * <p>By default maps to the @see |
| 88 | + * android.hardware.camera2.CameraCharacteristics#CONTROL_MAX_REGIONS_AF key. |
| 89 | + * |
| 90 | + * @return Integer Maximum number of metering regions that can be used by the auto-focus routine. |
| 91 | + */ |
31 | 92 | Integer getControlMaxRegionsAutoFocus();
|
32 | 93 |
|
| 94 | + /** |
| 95 | + * Returns a list of distortion correction modes for @see android.distortionCorrection.mode that |
| 96 | + * are supported by this camera device. |
| 97 | + * |
| 98 | + * <p>By default maps to the @see |
| 99 | + * android.hardware.camera2.CameraCharacteristics#DISTORTION_CORRECTION_AVAILABLE_MODES key. |
| 100 | + * |
| 101 | + * @return int[] List of distortion correction modes supported by this camera device. |
| 102 | + */ |
| 103 | + @RequiresApi(api = VERSION_CODES.P) |
33 | 104 | int[] getDistortionCorrectionAvailableModes();
|
34 | 105 |
|
| 106 | + /** |
| 107 | + * Returns whether this camera device has a flash unit. |
| 108 | + * |
| 109 | + * <p>By default maps to the @see |
| 110 | + * android.hardware.camera2.CameraCharacteristics#FLASH_INFO_AVAILABLE key. |
| 111 | + * |
| 112 | + * @return Boolean Whether this camera device has a flash unit. |
| 113 | + */ |
35 | 114 | Boolean getFlashInfoAvailable();
|
36 | 115 |
|
| 116 | + /** |
| 117 | + * Returns the direction the camera faces relative to device screen. |
| 118 | + * |
| 119 | + * <p><string>Possible values:</string> |
| 120 | + * |
| 121 | + * <ul> |
| 122 | + * <li>@see android.hardware.camera2.CameraMetadata.LENS_FACING_FRONT |
| 123 | + * <li>@see android.hardware.camera2.CameraMetadata.LENS_FACING_BACK |
| 124 | + * <li>@see android.hardware.camera2.CameraMetadata.LENS_FACING_EXTERNAL |
| 125 | + * </ul> |
| 126 | + * |
| 127 | + * By default maps to the @see android.hardware.camera2.CameraCharacteristics.LENS_FACING key. |
| 128 | + * |
| 129 | + * @return int Direction the camera faces relative to device screen. |
| 130 | + */ |
37 | 131 | int getLensFacing();
|
38 | 132 |
|
| 133 | + /** |
| 134 | + * Returns the shortest distance from front most surface of the lens that can be brought into |
| 135 | + * sharp focus. |
| 136 | + * |
| 137 | + * <p>By default maps to the @see |
| 138 | + * android.hardware.camera2.CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE key. |
| 139 | + * |
| 140 | + * @return Float Shortest distance from front most surface of the lens that can be brought into |
| 141 | + * sharp focus. |
| 142 | + */ |
39 | 143 | Float getLensInfoMinimumFocusDistance();
|
40 | 144 |
|
| 145 | + /** |
| 146 | + * Returns the maximum ratio between both active area width and crop region width, and active area |
| 147 | + * height and crop region height, for @see android.scaler.cropRegion. |
| 148 | + * |
| 149 | + * <p>By default maps to the @see |
| 150 | + * android.hardware.camera2.CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM key. |
| 151 | + * |
| 152 | + * @return Float Maximum ratio between both active area width and crop region width, and active |
| 153 | + * area height and crop region height |
| 154 | + */ |
41 | 155 | Float getScalerAvailableMaxDigitalZoom();
|
42 | 156 |
|
| 157 | + /** |
| 158 | + * Returns the area of the image sensor which corresponds to active pixels after any geometric |
| 159 | + * distortion correction has been applied. |
| 160 | + * |
| 161 | + * <p>By default maps to the @see |
| 162 | + * android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE key. |
| 163 | + * |
| 164 | + * @return android.graphics.Rect area of the image sensor which corresponds to active pixels after |
| 165 | + * any geometric distortion correction has been applied. |
| 166 | + */ |
43 | 167 | Rect getSensorInfoActiveArraySize();
|
44 | 168 |
|
| 169 | + /** |
| 170 | + * Returns the dimensions of the full pixel array, possibly including black calibration pixels. |
| 171 | + * |
| 172 | + * <p>By default maps to the @see |
| 173 | + * android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE key. |
| 174 | + * |
| 175 | + * @return android.util.Size Dimensions of the full pixel array, possibly including black |
| 176 | + * calibration pixels. |
| 177 | + */ |
45 | 178 | Size getSensorInfoPixelArraySize();
|
46 | 179 |
|
| 180 | + /** |
| 181 | + * Returns the area of the image sensor which corresponds to active pixels prior to the |
| 182 | + * application of any geometric distortion correction. |
| 183 | + * |
| 184 | + * <p>By default maps to the @see |
| 185 | + * android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE |
| 186 | + * key. |
| 187 | + * |
| 188 | + * @return android.graphics.Rect Area of the image sensor which corresponds to active pixels prior |
| 189 | + * to the application of any geometric distortion correction. |
| 190 | + */ |
| 191 | + @RequiresApi(api = VERSION_CODES.M) |
47 | 192 | Rect getSensorInfoPreCorrectionActiveArraySize();
|
48 | 193 |
|
| 194 | + /** |
| 195 | + * Returns the clockwise angle through which the output image needs to be rotated to be upright on |
| 196 | + * the device screen in its native orientation. |
| 197 | + * |
| 198 | + * <p>By default maps to the @see |
| 199 | + * android.hardware.camera2.CameraCharacteristics#SENSOR_ORIENTATION key. |
| 200 | + * |
| 201 | + * @return int Clockwise angle through which the output image needs to be rotated to be upright on |
| 202 | + * the device screen in its native orientation. |
| 203 | + */ |
49 | 204 | int getSensorOrientation();
|
50 | 205 |
|
| 206 | + /** |
| 207 | + * Returns a level which generally classifies the overall set of the camera device functionality. |
| 208 | + * |
| 209 | + * <p><strong>Possible values:</strong> |
| 210 | + * |
| 211 | + * <ul> |
| 212 | + * <li>@see android.hardware.camera2.CameraMetadata.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY |
| 213 | + * <li>@see android.hardware.camera2.CameraMetadata.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED |
| 214 | + * <li>@see android.hardware.camera2.CameraMetadata.INFO_SUPPORTED_HARDWARE_LEVEL_FULL |
| 215 | + * <li>@see android.hardware.camera2.CameraMetadata.INFO_SUPPORTED_HARDWARE_LEVEL_LEVEL_3 |
| 216 | + * <li>@see android.hardware.camera2.CameraMetadata.INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL |
| 217 | + * </ul> |
| 218 | + * |
| 219 | + * By default maps to the @see |
| 220 | + * android.hardware.camera2.CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL key. |
| 221 | + * |
| 222 | + * @return int Level which generally classifies the overall set of the camera device |
| 223 | + * functionality. |
| 224 | + */ |
51 | 225 | int getHardwareLevel();
|
52 | 226 |
|
| 227 | + /** |
| 228 | + * Returns a list of noise reduction modes for @see android.noiseReduction.mode that are supported |
| 229 | + * by this camera device. |
| 230 | + * |
| 231 | + * <p>By default maps to the @see |
| 232 | + * android.hardware.camera2.CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES |
| 233 | + * key. |
| 234 | + * |
| 235 | + * @return int[] List of noise reduction modes that are supported by this camera device. |
| 236 | + */ |
53 | 237 | int[] getAvailableNoiseReductionModes();
|
54 | 238 | }
|
55 | 239 |
|
|
0 commit comments