I am attempting to split a recording into 10 min movie clips while not interrupting the video recording. The application does not use any other activities to record, following the google tutorial for this. While recording, every 10 minutes I want to save the current 10min block to a file and continue recording. The next 10 minute block would be recorded at the 20min mark and so on.
EDIT: Added a snippet of code that I am currently using.
mMediaRecorder.setup(mCamera, mPreview);
mMediaRecorder.setMaxDuration(10 * 60 * 1000);
mMediaRecorder.setOnInfoListener(new MediaRecorder.OnInfoListener() {
@Override
public void onInfo(MediaRecorder mr, int what, int extra) {
if(what == MediaRecorder.MEDIA_RECORDER_INFO_MAX_DURATION_REACHED) {
releaseMediaRecorder();
prepareVideoRecorder();
mMediaRecorder.start();
}
}
});
This allows the functionality that I want, however, it is not seamless. The user sees the video pause briefly. Is there a way to allow the preview surface to continue running seamlessly while stoping and restarting the media recorder?