0
votes

There is MediaRecorder in Android. I can write something like this:

MediaRecorder recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264); // VideoEncoder???
recorder.setOutputFile(PATH_NAME);
recorder.prepare();
recorder.start();   // Recording is now started

We can use MediaRecorder to write video or audio, or audio & video. It will be usefull to have congifuration for audio, video:

MediaRecorder(VideoRecoder?, AudioRecorder?, outputFormat)

Is there the reason to mix 2 configurations in one place? What is the reason?