I derived from CTransformFilter and Pins classes. In the Receive() method of the filter I pull the sample, and copy contents of sample to a "queue". Then I have another thread that wakes up every 10 ms and pulls the sample data from the "queue". I then use the output pins' allocator Getbuffer () to pull a IMediaSample and I fill it with the media and modify the properties of the sample, and on the same worker thread I send that sample to the output pin via m_pOutput->Deliver(). What is happening is that the m_pOutput->Deliver will "stall" after about 20 to 40 sucessful frame samples until I actually stop the filter graph. Then that stalled Deliver() will return and I'll finish processing the queue frames. Any ideas? /Loren
On Tue, 8 Jul 2008 09:12:05 -0700 (PDT), Loren Rogers wrote: > I derived from CTransformFilter and Pins classes. In the Receive() > method of the filter I pull the sample, and copy contents of sample to > a "queue". Then I have another thread that wakes up every 10 ms and > pulls the sample data from the "queue". I then use the output pins' > allocator Getbuffer () to pull a IMediaSample and I fill it with the > media and modify the properties of the sample, and on the same worker > thread I send that sample to the output pin via m_pOutput->Deliver(). > What is happening is that the m_pOutput->Deliver will "stall" after > about 20 to 40 sucessful frame samples until I actually stop the > filter graph. Then that stalled Deliver() will return and I'll finish > processing the queue frames. Any ideas? The graph segment between your output pin and the downstream filter(s) is out of samples. Why it is out of samples is what you have to figure out. Either you are setting sample time stamps incorrectly (causing a block at the renderer) or something else similar. -- http://www.chrisnet.net/code.htm [MS MVP for DirectShow / MediaFoundation]