implemented exposure correction for Camera2

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

@ -12,6 +12,8 @@ import android.media.CamcorderProfile;
import android.media.ImageReader;
import android.media.MediaRecorder;
import android.os.Build;
import android.util.Range;
import android.util.Rational;
import com.otaliastudios.cameraview.controls.Audio;
import com.otaliastudios.cameraview.controls.Control;
@ -210,7 +212,15 @@ public class CameraOptions {
}
}
// TODO exposure correction
// Exposure correction
Range<Integer> exposureRange = cameraCharacteristics.get(CameraCharacteristics.CONTROL_AE_COMPENSATION_RANGE);
if(exposureRange != null) {
exposureCorrectionMinValue = exposureRange.getLower();
exposureCorrectionMaxValue = exposureRange.getUpper();
}
exposureCorrectionSupported = exposureCorrectionMinValue != 0
|| exposureCorrectionMaxValue != 0;
// Picture Sizes

Loading…
Cancel
Save