CDynamicOutputPin::Block

 
Microsoft DirectShow 9.0

CDynamicOutputPin::Block

The Block method blocks or unblocks the flow of data from the pin. This method implements the IPinFlowControl::Block method.

Syntax

  HRESULT Block(
    DWORD dwBlockFlags, 
    HANDLE hEvent
);

Parameters

dwBlockFlags

Flag that indicates whether to block or unblock the pin. Must be one of the following values:

Zero: Unblock data flow from the pin.

AM_PIN_FLOW_CONTROL_BLOCK: Block data flow from the pin.

hEvent

Handle to an event object, or NULL.

Return Value

Returns an HRESULT value. Possible values include those shown in the following table.

Value Description
S_FALSE Pin is already unblocked.
S_OK Success.
E_INVALIDARG Invalid argument.
VFW_E_PIN_ALREADY_BLOCKED Pin is already blocked on another thread.
VFW_E_PIN_ALREADY_BLOCKED_ON_THIS_THREAD Pin is already blocked on the calling thread.

Remarks

For more information about this method, see IPinFlowControl::Block. Internally, this method calls one of the following protected methods:

Unblocking is always performed synchronously.

Requirements

**  Header:** Declared in Amfilter.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also