protected void encodeWithMediaCodec() throws RuntimeException, IOException {
  if (mMode == MODE_MEDIACODEC_API_2) {
    encodeWithMediaCodecMethod2();
  }
 else {
    encodeWithMediaCodecMethod1();
  }
}

protected void encodeWithMediaCodec ( ) throws RuntimeException , IOException { if ( mMode == MODE_MEDIACODEC_API_2 ) { encodeWithMediaCodecMethod2 ( ) ; } else { encodeWithMediaCodecMethod1 ( ) ; } }
video encoding is done by a mediacodec .
