I'm working on writing a small application using the WPF MediaKit, and I would like to record some video - my plan is, to store the last n seconds as raw audio/video frames, then write them out as an AVI when the user requests it.
Is there an easy way to actually pipe the data I've gathered from the Webcam into an AVI file? The trick is, I have to use buffered data, I can't directly just write a new DirectShow scene graph to write out the AVI file - for my app, the camera is running all the time, and the user signals the end of the capture (and we take the last few seconds or so).
The AVI doesn't have to be compressed in any way, I'm going to run it through Expression Encoder to do that. Any ideas?