本文整理了Java中android.media.MediaRecorder.setOnInfoListener()
方法的一些代码示例,展示了MediaRecorder.setOnInfoListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MediaRecorder.setOnInfoListener()
方法的具体详情如下:
包路径:android.media.MediaRecorder
类名称:MediaRecorder
方法名:setOnInfoListener
暂无
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onStart() {
super.onStart();
recorder=new MediaRecorder();
recorder.setOnErrorListener(this);
recorder.setOnInfoListener(this);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onStart() {
super.onStart();
recorder=new MediaRecorder();
recorder.setOnErrorListener(this);
recorder.setOnInfoListener(this);
}
代码示例来源:origin: robolectric/robolectric
@Test
public void testOnInfoListener() throws Exception {
assertThat(shadowMediaRecorder.getInfoListener()).isNull();
TestInfoListener listener = new TestInfoListener();
mediaRecorder.setOnInfoListener(listener);
assertThat(shadowMediaRecorder.getInfoListener()).isNotNull();
assertThat(shadowMediaRecorder.getInfoListener()).isSameAs((MediaRecorder.OnInfoListener) listener);
}
代码示例来源:origin: stackoverflow.com
recorder.setOnErrorListener(errorListener);
OnInfoListener infoListener = null;
recorder.setOnInfoListener(infoListener);
代码示例来源:origin: florent37/CameraFragment
videoRecorder.setOnInfoListener(this);
videoRecorder.setOnInfoListener(this);
代码示例来源:origin: florent37/CameraFragment
videoRecorder.setMaxFileSize(configurationProvider.getVideoFileSize());
videoRecorder.setOnInfoListener(this);
videoRecorder.setOnInfoListener(this);
代码示例来源:origin: stackoverflow.com
recorder.setOutputFile(getFilename());
recorder.setOnErrorListener(errorListener);
recorder.setOnInfoListener(infoListener);
代码示例来源:origin: guoxiaoxing/phoenix
mMediaRecorder.setOnInfoListener(this);
mMediaRecorder.setOnInfoListener(this);
代码示例来源:origin: guoxiaoxing/phoenix
mMediaRecorder.setMaxFileSize(cameraConfigProvider.getVideoFileSize());
mMediaRecorder.setOnInfoListener(this);
mMediaRecorder.setOnInfoListener(this);
代码示例来源:origin: termux/termux-api
/**
* Returns our MediaPlayer instance and ensures it has all the necessary callbacks
*/
protected static void getMediaRecorder(MicRecorderService service) {
mediaRecorder = new MediaRecorder();
mediaRecorder.setOnErrorListener(service);
mediaRecorder.setOnInfoListener(service);
}
代码示例来源:origin: huangfangyi/YiChat
public void stopRecording() {
if (mediaRecorder != null) {
mediaRecorder.setOnErrorListener(null);
mediaRecorder.setOnInfoListener(null);
try {
mediaRecorder.stop();
} catch (IllegalStateException e) {
Log.e("video", "stopRecording error:" + e.getMessage());
}
}
releaseRecorder();
if (mCamera != null) {
mCamera.stopPreview();
releaseCamera();
}
}
代码示例来源:origin: huangfangyi/FanXin
public boolean startRecording(){
if (mediaRecorder == null){
if(!initRecorder())
return false;
}
mediaRecorder.setOnInfoListener(this);
mediaRecorder.setOnErrorListener(this);
mediaRecorder.start();
return true;
}
代码示例来源:origin: huangfangyi/YiChat
public boolean startRecording(){
if (mediaRecorder == null){
if(!initRecorder())
return false;
}
mediaRecorder.setOnInfoListener(this);
mediaRecorder.setOnErrorListener(this);
mediaRecorder.start();
return true;
}
代码示例来源:origin: WuXiaolong/WoChat
public boolean startRecording(){
if (mediaRecorder == null){
if(!initRecorder())
return false;
}
mediaRecorder.setOnInfoListener(this);
mediaRecorder.setOnErrorListener(this);
mediaRecorder.start();
return true;
}
代码示例来源:origin: easemob/kefu-android-demo
public boolean startRecording(){
if (mediaRecorder == null){
if(!initRecorder())
return false;
}
try{
mediaRecorder.setOnInfoListener(this);
mediaRecorder.setOnErrorListener(this);
mediaRecorder.start();
}catch (Exception e){
return false;
}
return true;
}
代码示例来源:origin: huangfangyi/FanXin
public void stopRecording() {
if (mediaRecorder != null) {
mediaRecorder.setOnErrorListener(null);
mediaRecorder.setOnInfoListener(null);
try {
mediaRecorder.stop();
} catch (IllegalStateException e) {
EMLog.e("video", "stopRecording error:" + e.getMessage());
}
}
releaseRecorder();
if (mCamera != null) {
mCamera.stopPreview();
releaseCamera();
}
}
代码示例来源:origin: WuXiaolong/WoChat
public void stopRecording() {
if (mediaRecorder != null) {
mediaRecorder.setOnErrorListener(null);
mediaRecorder.setOnInfoListener(null);
try {
mediaRecorder.stop();
} catch (IllegalStateException e) {
EMLog.e("video", "stopRecording error:" + e.getMessage());
}
}
releaseRecorder();
if (mCamera != null) {
mCamera.stopPreview();
releaseCamera();
}
}
代码示例来源:origin: stackoverflow.com
MediaRecorder recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
/* recorder.setAudioEncodingBitRate(32);
recorder.setAudioSamplingRate(44100);*/
recorder.setOutputFile(file.getPath());
recorder.setOnErrorListener(errorListener);
recorder.setOnInfoListener(infoListener);
代码示例来源:origin: AppLozic/Applozic-Android-SDK
public MediaRecorder prepareMediaRecorder() {
audioRecorder = new MediaRecorder();
audioRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
audioRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
audioRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
audioRecorder.setAudioEncodingBitRate(256);
audioRecorder.setAudioChannels(1);
audioRecorder.setAudioSamplingRate(44100);
audioRecorder.setOutputFile(outputFile);
audioRecorder.setOnInfoListener(this);
audioRecorder.setOnErrorListener(this);
return audioRecorder;
}
代码示例来源:origin: QuickBlox/ChatMessagesAdapter-android
private void initMediaRecorder() {
recorder = new MediaRecorder();
recorder.setAudioSource(configurationBuilder.audioSource);
recorder.setOutputFormat(configurationBuilder.outputFormat);
recorder.setOutputFile(configurationBuilder.filePath);
recorder.setAudioChannels(configurationBuilder.channels);
recorder.setAudioEncoder(configurationBuilder.audioEncoder);
recorder.setAudioEncodingBitRate(configurationBuilder.bitRate);
recorder.setAudioSamplingRate(configurationBuilder.samplingRate);
recorder.setMaxDuration(configurationBuilder.duration);
recorder.setOnInfoListener(new OnInfoListenerImpl());
recorder.setOnErrorListener(new OnErrorListenerImpl());
}
内容来源于网络,如有侵权,请联系作者删除!