How to create a DirectShow graph which would wait for incoming i开发者_如何学Pythonmages and add them as frames into video file?
Using GraphEdit or with C\C++\C#
So I want to have a graph which would work and wait for images incoming into him in any way you think is most easy (for example We can have a folder from where DSfilter would be able to take images) and insert that images as new frames of our video.
So how to do it?
You need a source filter, multiplexor and file writer. The multiplexor and file writer are stock components, but the source filter will be a custom filter. Look at the app source example on www.gdcl.co.uk for an example of a custom source filter that you can feed with frames from your app.
The graph will not be time-sensitive: the multiplexing is based on the timestamps attached to the samples, not on the elapsed time. So you set the graph running, and as a frame arrives, you attach a timestamp to it and deliver it via the source filter to the mux.
G
精彩评论