How to record the video using camera preview on TextureView

北战南征 提交于 2019-11-30 12:08:09

According to this issue, on Jelly Bean and higher, you simply don't call setPreviewDisplay(), and MediaRecorder will automatically use the preview used by the Camera. I can confirm that not calling setPreviewDisplay() does indeed work, at least on Android 4.2, when the Camera preview is set to be a TextureView. I have not yet tried this on older Android versions to confirm that 4.1 works.

This does leave a bit of a gap, in that Android 3.0-4.0 devices perhaps cannot use TextureView for previews.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!