一. at android.media.MediaRecorder.start(Native Method)解決方法
1. 注釋掉 //mRecorder.setVideoFrameRate(15);
2. 設置屏幕分辨率
1)獲取屏幕分辨率:
[java]
DisplayMetrics displaysMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics( displaysMetrics );
width = displaysMetrics.widthPixels;
height = displaysMetrics.heightPixels;
2)設置長,寬
[java]
mRecorder.setVideoSize(height,width);
二.預覽被旋轉90度
[java]
Camera camera = Camera.open();
Camera.Parameters parameters = camera.getParameters();
// parameters.setRotation(90);
parameters.setPreviewSize(height, width);
parameters.setPictureSize(height, width);
camera.setParameters(parameters);
camera.setDisplayOrientation(90);
camera.unlock();
mRecorder = new MediaRecorder();
mRecorder.setCamera(camera);
mRecorder.reset();