mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 932295 - Android video capture should autofocus. r=gcp
This commit is contained in:
parent
05c93ea881
commit
b11db7ebaa
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user