I want to be able to record a video, stop, then start again immediately (i.e. no lag). The problem is that between a stop and start, my phone loses up to 1.5 seconds while the MediaRecorder is stopped, set to the right state and restarted.
I posted the basis of my code on StackOverflow here.
An automated stop start of this code produced these key timings:
- 510 (fractional seconds to stop the recording)
- 490 (fs to release the camera)
- 710 (fs to start a recording)
I have tried 2 mediarecorders, but end up with illegalstateexceptions and don't think the media recorder can be re-used.
According to the Android documentation, the mediarecorder object cannot be reused.
Is there a way to start another video recording immediately?