Wednesday, April 25, 2007

Push mode and Pull mode...

PushMode
Pull mode


Push mode works this way: the upstream filter's output pin
delivers samples to the downstream filter's input pin by
calling IMemInputPin::Receive() or
IMemInputPin::ReceiveMultiple() on it. (The CNetworkSend
class uses CBaseInputPin as base for its input pins and
CBaseInputPin implements IMemInputPin.)

Pull mode works this way: the downstream filter's input pin
reads samples from the upstream filter's output pin by
calling IAsyncReader::SyncRead(),
IAsyncReader::SyncReadAligned() or
IAsyncReader::Request()/IAsyncReader::WaitForNext() on it.


The filter that initiates a data transfer (that is, the
upstream one in push mode and the downstream one in pull
mode) must do it on a separate thread. This thread may be
spawned internally or by, respectively, a preceding or
following filter.

No comments: