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.