Commit 7ea2dae5 authored by Simon Morlat's avatar Simon Morlat

enable autofocus mode, when available, during video calls.

parent bd305549
......@@ -57,6 +57,18 @@ public class AndroidVideoApi9JniWrapper {
try {
Camera camera = Camera.open(cameraId);
Parameters params = camera.getParameters();
for (String focusMode : params.getSupportedFocusModes()) {
if (focusMode.equalsIgnoreCase(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO)) {
params.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);
break;
}
}
if (params.isVideoStabilizationSupported()) {
params.setVideoStabilization(true);
}
params.setPreviewSize(width, height);
int[] chosenFps = findClosestEnclosingFpsRange(fps*1000, params.getSupportedPreviewFpsRange());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment