pull/1/head
Mattia Iavarone 7 years ago
parent f14f866c96
commit 2502909a6c
  1. 3
      README.md
  2. 5
      camerakit/src/main/api16/com/flurgle/camerakit/Camera1.java

@ -404,8 +404,9 @@ These are things that need to be done, off the top of my head:
- [x] better threading, for example ensure callbacks are called in the ui thread - [x] better threading, for example ensure callbacks are called in the ui thread
- [x] pinch to zoom support - [x] pinch to zoom support
- [ ] exposure correction APIs - [ ] exposure correction APIs
- [ ] add a `sizingMethod` API to choose the capture size? Could be `max`, `4:3`, `16:9`... Right now it's `max`
- [ ] `Camera2` integration - [ ] `Camera2` integration
- [ ] check onPause / onStop / onSaveInstanceState consistency
- [ ] add a `setPreferredAspectRatio` API to choose the capture size. Preview size will adapt, and then, if let free, the CameraView will adapt as well
- [ ] animate grid lines similar to stock camera app - [ ] animate grid lines similar to stock camera app
- [ ] add onRequestPermissionResults for easy permission callback - [ ] add onRequestPermissionResults for easy permission callback
- [ ] better error handling, maybe with a onError(e) method in the public listener, or have each public method return a boolean - [ ] better error handling, maybe with a onError(e) method in the public listener, or have each public method return a boolean

@ -682,13 +682,14 @@ class Camera1 extends CameraController {
List<Camera.Area> meteringAreas1 = meteringAreas2.subList(0, 1); List<Camera.Area> meteringAreas1 = meteringAreas2.subList(0, 1);
synchronized (mLock) { synchronized (mLock) {
Camera.Parameters params = mCamera.getParameters(); Camera.Parameters params = mCamera.getParameters();
boolean autofocusSupported = params.getSupportedFocusModes().contains(Camera.Parameters.FOCUS_MODE_AUTO); // TODO remove this check once CameraView.setFocus TODO is fixed.
boolean autofocusSupported = mOptions.getSupportedFocus().contains(CameraConstants.FOCUS_TAP);
if (autofocusSupported) { if (autofocusSupported) {
int maxAF = params.getMaxNumFocusAreas(); int maxAF = params.getMaxNumFocusAreas();
int maxAE = params.getMaxNumMeteringAreas(); int maxAE = params.getMaxNumMeteringAreas();
if (maxAF > 0) params.setFocusAreas(maxAF > 1 ? meteringAreas2 : meteringAreas1); if (maxAF > 0) params.setFocusAreas(maxAF > 1 ? meteringAreas2 : meteringAreas1);
if (maxAE > 0) params.setMeteringAreas(maxAE > 1 ? meteringAreas2 : meteringAreas1); if (maxAE > 0) params.setMeteringAreas(maxAE > 1 ? meteringAreas2 : meteringAreas1);
params.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO); params.setFocusMode((String) mMapper.mapFocus(FOCUS_TAP)); // auto
mCamera.setParameters(params); mCamera.setParameters(params);
mCameraCallbacks.dispatchOnFocusStart(x, y); mCameraCallbacks.dispatchOnFocusStart(x, y);
mCamera.autoFocus(new Camera.AutoFocusCallback() { mCamera.autoFocus(new Camera.AutoFocusCallback() {

Loading…
Cancel
Save