I am new to android. I have been looking for ways to record a video using Camera2 api and MediaCodec but no luck. I saw a sample by Google(https://github.com/googlesamples/android-Camera2Video) using MediaRecorder. My question is how to replace this MediaRecorder with MediaCodec.