implemented zoom for camera2

pull/488/head
Suneet Agrawal 6 years ago
parent eaecc68f75
commit 2828c64faf
  1. 8
      cameraview/src/main/java/com/otaliastudios/cameraview/CameraOptions.java

@ -200,7 +200,10 @@ public class CameraOptions {
if (value != null) supportedHdr.add(value); if (value != null) supportedHdr.add(value);
} }
// TODO zoom //zoom
Float maxZoom = cameraCharacteristics.get(CameraCharacteristics.SCALER_AVAILABLE_MAX_DIGITAL_ZOOM);
zoomSupported = maxZoom != null && maxZoom > 1;
// autofocus // autofocus
int[] afModes = cameraCharacteristics.get(CameraCharacteristics.CONTROL_AF_AVAILABLE_MODES); int[] afModes = cameraCharacteristics.get(CameraCharacteristics.CONTROL_AF_AVAILABLE_MODES);
@ -219,8 +222,7 @@ public class CameraOptions {
exposureCorrectionMaxValue = exposureRange.getUpper(); exposureCorrectionMaxValue = exposureRange.getUpper();
} }
exposureCorrectionSupported = exposureCorrectionMinValue != 0 exposureCorrectionSupported = exposureCorrectionMinValue != 0 && exposureCorrectionMaxValue != 0;
|| exposureCorrectionMaxValue != 0;
// Picture Sizes // Picture Sizes

Loading…
Cancel
Save