I try to use the MediaRecorder class to record a video but I get an exception : failed to get Camera parameters. Prepare failed.
Here's my code :
camera = Camera.open();
recorder = new MediaRecorder();
recorder.setCamera(camera);
recorder.setVideoSource(VideoSource.CAMERA);
recorder.setPreviewDisplay(m_holder.getSurface());
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setVideoEncoder(MediaRecorder.VideoEncoder.DEFAULT);
recorder.setMaxDuration(10000);
recorder.setOutputFile(file.getPath());
recorder.prepare();
Any idea ?