Using getInputImage with MediaCodec for encoding
问题 Background: I do video file demuxing, decode the video track, apply some changes to frames received, decode and mux them again. The known issue doing this in Android are the number of vendor specify encoder / decoder color formats. Android 4.3 introduced surfaces to get device independent, but I found it hard to work with them as my frame changing routines require a Canvas to write to. Since Android 5.0, the use of flexible YUV420 color formats is promising. Jointly with getOutputImage for