mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
OpenCV example-tutorial1 does not work on Android emulator (Bug #2656)
Problems with Android 2.3.3 (API level 10) fixed; Android 2.2 does not work due to unsupported camera frame format (known android-2.2 emulator issue).
This commit is contained in:
parent
014a500f79
commit
9ca65ceef8
@ -124,7 +124,7 @@ public class JavaCameraView extends CameraBridgeViewBase implements PreviewCallb
|
|||||||
params.setPreviewSize((int)frameSize.width, (int)frameSize.height);
|
params.setPreviewSize((int)frameSize.width, (int)frameSize.height);
|
||||||
|
|
||||||
List<String> FocusModes = params.getSupportedFocusModes();
|
List<String> FocusModes = params.getSupportedFocusModes();
|
||||||
if (FocusModes.contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO))
|
if (FocusModes != null && FocusModes.contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO))
|
||||||
{
|
{
|
||||||
params.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);
|
params.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user