MediaRecorder and VideoSource.SURFACE, stop failed: -1007 (a serious Android bug)

佐手、 提交于 2019-11-26 18:01:23

I guess there is no solution

so the answer: MediaRecorder/Android is buggy or Mobile companies didn't care of all Android features while developing their devices

Update

MediaCodec is also buggy with canvas

mSurface = mMediaCodec.createInputSurface();
mSurface.lockHardwareCanvas()

It works on much more devices with MediaCodec but still some devices may fail to record video correctly using this method

So final answer: don't ever use lockCanvas or lockHardwareCanvas when working with MediaCodec or MediaRecorder, it's buggy..

The only way - OpenGl ES

other links about issue:

https://github.com/googlesamples/android-Camera2Video/issues/86 https://issuetracker.google.com/issues/111433520

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