case R.id.rv_stop:
if(record){
record = false;
mediaRecorder.stop();
mediaRecorder.reset();
Log.i(TAG,"TAG-1");
if(camera!=null){
camera.lock();
camera.stopPreview();
Camera.Parameters myParameters = camera.getParameters();
myParameters.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);
camera.setParameters(myParameters);
camera.release();
camera = null;
}
// 秒表线程控制
if(myChronograph!=null){
myChronograph.exit();
myChronograph = null;
}
((Button)findViewById(R.id.rv_record)).setEnabled(true);
}
break;
}
} catch (Exception e) {
Toast.makeText(RecordVideoActivity.this, "发生异常", 1).show();
e.printStackTrace();
}
}
}
private Handler mHandler = new Handler(){
Android开发之打开闪光灯录制视频(7)
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:https://www.heiqu.com/3df54699eaa3a4a4ed50b82b6c428756.html