A bridge to the FFmpeg C libraries.
Based on: http://ffmpeg.org/doxygen/trunk/muxing_8c_source.html
Inspired by: http://www.roman10.net/how-to-build-android-applications-based-on-ffmpeg-by-an-example/
https://github.com/OnlyInAmerica/FFmpegTest
As this is designed to complement Android's MediaCodec class, the only supported formats for
jData in writeAVPacketFromEncodedData are: H264 (YUV420P pixel format) / AAC (16 bit signed
integer samples, one center channel)
Methods of this class must be called in the following order:
1. init
2. setAudioCodecExtraData and setVideoCodecExtraData
3. writeHeader
4. (repeat for each packet) writePacket
5. finalize