android - 一个关于MediaRecorder.setMaxDuration()的问题
阿神
阿神 2017-04-17 15:43:48
0
0
896

void android.media.MediaRecorder.setMaxDuration(int max_duration_ms) throws IllegalArgumentException

Sets the maximum duration (in ms) of the recording session. Call this after setOutFormat() but before prepare(). After recording reaches the specified duration, a notification will be sent to the android.media.MediaRecorder.OnInfoListener with a "what" code of MEDIA_RECORDER_INFO_MAX_DURATION_REACHED and recording will be stopped. Stopping happens asynchronously, there is no guarantee that the recorder will have stopped by the time the listener is notified.
google这里解释的最后一句话的意思大概是当监听被通知的时候不能保证recorder已经完成了,不理解,既然这个监听是不准的, 那我要这个还有卵用? 我要实现的功能很简单,就是类似微信的一样Camera拍摄15s的视频之后停止,我要监听Camera什么时候真正完成录制视频了。

阿神
阿神

闭关修行中......

全部回复(0)
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!