Fastest way to draw a MediaCodec-decoded video frame to screen?

回眸只為那壹抹淺笑 提交于 2019-12-03 14:44:15

Your best bet is to decode directly to a Surface. Decoding to a ByteBuffer is going to slow you down quite a bit. A number of examples on bigflake (e.g. ExtractMpegFramesTest) send the output of a decoder to an off-screen surface and examine it with GLES, but it's a simple change to make it work with an on-screen SurfaceView.

Update: Grafika has two different MediaCodec-based video players that send the output to SurfaceView and TextureView, respectively.

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