StartUsingOutputPin method obtains access to the pin for a streaming operation.
virtual HRESULT StartUsingOutputPin();
This method has no parameters.
Returns an HRESULT value. Possible values include those shown in the following table.
||The filter was stopped, or the pin has begun flushing.
Call this method before calling any methods that deliver data to the connected input pin or that change the connection's media type. For example, this rule applies to the following methods:
Afterward, call the CDynamicOutputPin::StopUsingOutputPin method to release the access to the pin.
If the pin is blocked,
StartUsingOutputPin waits for the pin to become unblocked. If the filter stops while the method is waiting, the method immediately returns VFW_E_STATE_CHANGED. The pin maintains a count of how many times
StartUsingOutputPin has been called without a corresponding call to StopUsingOutputPin. If another thread tries to block the pin while this count is non-zero, the pin sets its blocking status to "pending." The pin becomes blocked once all of the streaming operations have completed, in the final call to StopUsingOutputPin.
Do not hold the CDynamicOutputPin::m_BlockStateLock critical section when you call this method. Otherwise, if the pin is blocked, it can never become unblocked, causing a deadlock.