We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我设置theCamera.setDisplayOrientation(90);也不起作用,不知道为什么
The text was updated successfully, but these errors were encountered:
CameraInfo info = new CameraInfo(); Camera.getCameraInfo(cameraId, info); int rotation = activity.getWindowManager().getDefaultDisplay().getRotation(); int degree = 0; switch (rotation) { case Surface.ROTATION_0: degree = 0; bSreenMirror = true; break; case Surface.ROTATION_90: degree = 90; bSreenMirror = false; break; case Surface.ROTATION_180: degree = 180; bSreenMirror = false; break; case Surface.ROTATION_270: degree = 270; bSreenMirror = true; break; } int result; if (info.facing == CameraInfo.CAMERA_FACING_FRONT) { result = (info.orientation + degree) % 360; result = (360 - result) % 360; // compensate the mirror } else { // back-facing result = (info.orientation - degree + 360) % 360; } mCamera.setDisplayOrientation(result);
Sorry, something went wrong.
No branches or pull requests
我设置theCamera.setDisplayOrientation(90);也不起作用,不知道为什么
The text was updated successfully, but these errors were encountered: