On Android platform, use MediaCodec to encode camera preview data and decode it to surface after that.