In particular, this is the setup I want: The built-in camera on an Android device is recording live video. This video is being saved to a buffer, which holds a few seconds of video. When the buffer is full, the oldest frames from the buffer are added to a video file on disk to make room for the new frames coming from the camera. The data in the buffer could then be used to skip backwards briefly in the video.
I was thinking we'd use mediaRecorder (and mediaPlayer?) with a Surface to obtain the video, respectively, use addCallbackBuffer to create the buffer, and then use setPreviewCallbackWithBuffer to display the video from the buffer. I'm not entirely sure where to go from there or if that is the wrong track altogether; I am somewhat of a novice at this.