Microsoft DirectX 8.0

IPinFlowControl Interface

Blocks data flow from an active output pin. This interface is exposed by output pins that can reconnect dynamically. Use this interface to start a dynamic reconnection within the filter graph. For more information, see Dynamic Graph Building.

Filter developers: Parser and capture filters that support dynamic reconnection should support this interface on their output pins. Generally, other types of filters do not need to implement this interface.

Methods in Vtable Order

IUnknown methodsDescription
QueryInterfaceRetrieves pointers to supported interfaces.
AddRefIncrements the reference count.
ReleaseDecrements the reference count.
IPinFlowControl methodsDescription
BlockBlocks or unblocks the flow of data from the pin.

IPinFlowControl::Block

IPinFlowControl Interface

Blocks or unblocks the flow of data from the pin.

Syntax

HRESULT Block(
    DWORD dwBlockFlags,
    HANDLE hEvent,
);

Parameters

dwBlockFlags
[in] 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
[in] Handle to an event object, or NULL. If this parameter is non-NULL, the method is asynchronous and returns immediately. The event is signaled when the operation completes. If this parameter is NULL, the method is synchronous and does not complete until the pin is blocked. If dwBlockFlags is zero, this parameter must be NULL.

Return Value

Returns an HRESULT value. Possible values include the following.

S_FALSEPin is already unblocked.
S_OKSuccess.
VFW_E_PIN_ALREADY_BLOCKEDPin is already blocked on another thread.
VFW_E_PIN_ALREADY_BLOCKED_ON_THIS_THREADPin is already blocked on the calling thread.

Remarks

This method can be synchronous or asynchronous: