Bug 932295 - Android video capture should autofocus. r=gcp

This commit is contained in:
Randall Barker 2013-12-08 21:42:06 -05:00
parent 05c93ea881
commit b11db7ebaa

View File

@ -12,6 +12,7 @@ package org.webrtc.videoengine;
import java.io.IOException;
import java.util.Locale;
import java.util.List;
import java.util.concurrent.locks.ReentrantLock;
import org.webrtc.videoengine.CaptureCapabilityAndroid;
@ -285,6 +286,12 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback {
Camera.Parameters parameters = camera.getParameters();
List<String> focusModeList = parameters.getSupportedFocusModes();
if (focusModeList.contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO)) {
parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);
}
parameters.setPreviewSize(currentCapability.width,
currentCapability.height);
parameters.setPreviewFormat(PIXEL_FORMAT);