CBaseInputPin::ReceiveCanBlock
Microsoft DirectShow 9.0 |
CBaseInputPin::ReceiveCanBlock
The ReceiveCanBlock method determines whether calls to the IMemInputPin::Receive method might block. This method implements the IMemInputPin::ReceiveCanBlock method.
Syntax
HRESULT ReceiveCanBlock(void);
Return Value
Returns an HRESULT value. Possible value include those listed in the following table.
Value | Description |
S_FALSE | The pin will not block on a call to Receive. |
S_OK | The pin might block on a call to Receive. |
Remarks
Return S_FALSE if calls to the Receive method are guaranteed not to block. Otherwise, return S_OK or an error code. If the Receive method calls Receive on a downstream pin, the downstream pin might block; ReceiveCanBlock must take that factor into account.
An upstream filter can use this method to determine its threading strategy. If the Receive method might block, the upstream filter might decide to use a worker thread that buffers data. See the COutputQueue class for an implementation of this strategy.
In the base class, this method returns S_OK when any of the following are true:
- The filter has no output pins.
- An input pin connected to this filter signals that it might block.
- An input pin connected to this filter does not support the IMemInputPin interface.
Requirements
** Header:** Declared in Amfilter.h; include Streams.h.
** Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).
See Also