Video Encoder Core
This class wraps up the core components used for surface-input video MediaMuxer.releaseencoding.
Once created, frames are fed to the input surface. Remember to provide the presentation time stamp, and always call drainEncoder() before swapBuffers() to ensure that the producer side doesn't get backed up.
This class is not thread-safe, with one exception: it is valid to use the input surface on one thread, and drain the output on a different thread.