CTransInPlaceFilter.CompleteConnect method

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The CompleteConnect method completes a pin connection.

Syntax

HRESULT CompleteConnect(
   PIN_DIRECTION direction,
   IPin          *pReceivePin
);

Parameters

direction

Member of the PIN_DIRECTION enumerated type, specifying which pin on the filter is making the connection.

pReceivePin

Pointer to the IPin interface of the other pin in this connection attempt.

Return value

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

Return code Description
S_OK
Success.
VFW_E_NOT_IN_GRAPH
The filter is not in a filter graph.

Remarks

This method overrides the CTransformFilter::CompleteConnect method.

The behavior of the filter depends on the order of the pin connections:

  • If the input pin is connected first, the connection uses a temporary allocator. When the output pin is connected, the filter reconnects the input pin. Reconnecting the input pin causes the upstream filter to renegotiate the allocator. At that point, the input pin proposes an allocator from the downstream filter. For more information, see CTransInPlaceInputPin::GetAllocator.
  • If the output pin is connected first, the output pin does not select an allocator. When the input pin is connected, it negotiates an allocator for both connections. If the input and output media types are not the same, the filter reconnects the output pin using the input type.

The filter performs all pin reconnections by calling the CBaseFilter::ReconnectPin method. The ReconnectPin method, in turn, calls the IFilterGraph2::ReconnectEx method on the filter graph manager.

Requirements

Requirement Value
Header
Transip.h (include Streams.h)
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CTransInPlaceFilter Class