Im looking for a easy way to record video (including audio) into a circular buffer stored in RAM.
So I can leave the video recording it will keep the feed in RAM the last 2 minutes and then have the option to commit it to memory if required.
Unfortunately, I cannot see an easy way to do this. So far I have investigated using:
MediaRecorder - I could not see a way to store the output data in a buffer. Only option is setOutputFile()
JavaCV FFmpegFrameRecorder - again the constructor for this requires passing in a file.
android.hardware.Camera.PreviewCallback - this gives a byte array for every frame which I could add to a buffer. However, this approach does not provide any audio data.
I feel like there must be a easy way to do this but so far I've not had much luck. Any help with this would be very appreciated.