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

Adjust SDK level for video display upside down


Signed-off-by: default avatarLeo Ma <begeekmyfriend@gmail.com>
parent 3700fc7f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -197,9 +197,9 @@ public class SrsCameraView extends GLSurfaceView implements GLSurfaceView.Render
Camera.getCameraInfo(mCamId, info);
if (info.facing == Camera.CameraInfo.CAMERA_FACING_BACK) {
if (orientation == Configuration.ORIENTATION_PORTRAIT) {
mPreviewRotation = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M ? 270 : 90;
mPreviewRotation = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N ? 270 : 90;
} else if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
mPreviewRotation = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M ? 180 : 0;
mPreviewRotation = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N ? 180 : 0;
}
} else if (info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) {
if (orientation == Configuration.ORIENTATION_PORTRAIT) {
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