增加异常捕获

serial
Matthew 1 year ago
parent c351e407ed
commit 9f7f89673c

@ -725,7 +725,11 @@ public class VideoFragment extends Fragment implements View.OnClickListener, Med
camcorderProfile = CamcorderProfile.get(mCameraId, quality); camcorderProfile = CamcorderProfile.get(mCameraId, quality);
} }
try {
mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT); mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
} catch (Exception ex) {
ex.printStackTrace();
}
mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE); mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE);
mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
if (mNextVideoAbsolutePath == null || mNextVideoAbsolutePath.isEmpty()) { if (mNextVideoAbsolutePath == null || mNextVideoAbsolutePath.isEmpty()) {

Loading…
Cancel
Save