How to capture video in Android?

后端 未结 7 403
天命终不由人
天命终不由人 2020-12-07 15:52

I would like to create a video recorder and so far haven\'t figured out how to set parameters in order to successfully go through MediaRecorder.prepare() method.

Exe

7条回答
  •  既然无缘
    2020-12-07 16:36

    In my case, copying and pasting the samples above didn't work. Then, viewing the methods in MediaRecorder, I found setPreviewDisplay. I called this method passing the surface used in Camera.setPreviewDisplay, the IOException in .prepare is gone and I was able to record video. Try yourself and post your results.

提交回复
热议问题