FrameBuffer Progress Project
I am really new to directshow, and I want to use YUV filter to render raw yuv file to screen. How can I do it in C++ program? please give me some hint. it is very appreciated.
Thanks for the good work.
If you simply want to render a YUV file, you can use the GraphEdit tool that comes with the SDK, or a similar tool called GraphStudio (http://blog.monogram.sk/janos/tools/monogram-graphstudio/). In these applications you can "manually" create a filter graph by inserting the YUV filter. Upon inserting the YUV filter into the graph, you will see a dialog box that allows you to select the specific YUV file. You should then be able to render the output pin of the source filter. See http://devcon-1.blogspot.de/2012/03/introducing-directshow-yuv-source.html
If you *need* to write a c++ program as you state in your question, it's not too difficult. You need to create the same filter graph, as in GraphEdit. Have a look at http://msdn.microsoft.com/en-us/library/windows/desktop/dd389098(v=vs.85).aspx to get a rough idea of what you need to do. Before trying this, I would make sure everything works ok in GraphEdit though. It can happen that there are issues using a filter on a machine, e.g. say due to a missing conversion filter, etc. and I would recommend that you make sure the YUV filter is working correctly beforehand, especially if you're new to DirectShow.
Further, it's probably a good idea to go through the DirectShow documentation on MSDN, and perhaps also look through the relevant examples in the SDK.