Skip to content
Snippets Groups Projects
Commit a5e37b81 authored by Leo Ma's avatar Leo Ma
Browse files

Camera audo focus feature


Signed-off-by: default avatarLeo Ma <begeekmyfriend@gmail.com>
parent 8917fbc5
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -8,6 +8,7 @@
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="true" />
<application
android:allowBackup="true"
Loading
Loading
Loading
Loading
@@ -274,6 +274,9 @@ public class SrsCameraView extends GLSurfaceView implements GLSurfaceView.Render
if (!supportedFocusModes.isEmpty()) {
if (supportedFocusModes.contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE)) {
params.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);
} else if (supportedFocusModes.contains(Camera.Parameters.FOCUS_MODE_AUTO)) {
params.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO);
mCamera.autoFocus(null);
} else {
params.setFocusMode(supportedFocusModes.get(0));
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment