This may be a dumb question but I'm having a hard time conceptualizing what I need to do here...In the past I've used DirectShow to connect to a camera and capture an AVI using a source filter, AVI mux, compression filter, run the graph, etc...piece of cake. In this particular case I am getting notified when my non DirectShow camera driver has a buffer ready. I get notification and then I go and grab the BYTE* and render it using GDI. I now also need to create an AVI with these buffers. Conceptually it makes sense for me to use something like vfw and write to an AVI stream every time I receive a buffer, of course vfw is old technology and I was also having some problems getting that to work (as I posted in a different forum). How can I push these buffers into a DirectShow AVI Mux and write to a file? Do I have to create my own source filter to receive these buffers, then add my source filter and avi mux to a filter graph? Thanks for any tips
1
votes
1 Answers
2
votes
So you have BYTE*
with video frame data. It is very close to what you supposed. Your choices are to either use VFW AVIFileOpen
and friends to write into AVI
file, or inject data into DirectShow pipeline. To do the latter, you typically make your PushSource-like filter and push video frames from there (through AVI Mux to File Writer).