CTransInPlaceFilter::CompleteConnect (Compact 2013)

3/26/2014

Reconnects the input or output pin if necessary.

Syntax

HRESULT CompleteConnect(
  PIN_DIRECTION direction,
  IPin* pReceivePin 
);

Parameters

  • direction
    Pin direction.
  • pReceivePin
    Pointer to the output pin to which to connect.

Return Value

Returns NOERROR if successful; otherwise, returns VFW_E_NOT_IN_GRAPH if the filter is not part of a graph, or returns an HRESULT that indicates the error.

HRESULT can be one of the following standard constants, or other values not listed.

Value

Description

E_FAIL

Failure.

E_POINTER

Null pointer argument.

E_INVALIDARG

Invalid argument.

E_NOTIMPL

Method is not supported.

Remarks

This member function overrides the CTransformFilter::CompleteConnect member function. It is called by one of the pin classes at the end of a successful connection.

Because the input and output pins must both use the same allocator, this member function reconnects the opposite pin if necessary.

When the input pin is first connected, the output pin has not yet been connected and the downstream filter's allocator is unknown, so the allocator for the input pin is chosen to be the upstream pin's allocator.

However, when the transform filter's output pin is connected, it has access to the downstream filter's allocator and should force a reconnect on the input pin and offer that allocator.

When the input pin is reconnected, it forces a reconnect on the output pin if the allocator chosen for the input pin's connection differs from the output pin's connection.

This member function supplies the reconnection for either output or input pins.

Requirements

Header

dshow.h,
Streams.h

Library

ole32.lib,
Ole32auth.lib,
Strmbase.lib,
Strmiids.lib,
uuid.lib

See Also

Reference

CTransInPlaceFilter Class