In the built-in example of DirectShow, There Is A Pull Mode Source Filter Example.Program(Async), The read () function is called in its load () function (load source file, here it reads the entire source file into the memory (So playing a small file does not affect the playing of large files and it takes a long time to start)
My original processing is:
Let the read () function first read the appropriate data, then start a sub-thread and then read the data, and the main thread starts to connect to the graph for playing, which can be achieved, but there are two problems: a. although a small amount of data is read-only, the parameter passed down is the total size of the file, as if it is very time-consuming (its size (), setpoinyer () when the stream class uses it (), REAG () All three functions use the file size parameter), but it is much faster than B. at this time, if the Sub-thread data has not been read, there will be a problem with the fast forward, because the fast forward to the position where there is no data, the screen will remain unchanged.
Later I used the memory ing file to solve the problem :)