Export (0) Print
Expand All

IPin::ReceiveConnection method

The ReceiveConnection method accepts a connection from another pin.

Applications should not call this method. This method is called by other filters during the pin connection process.

Syntax


HRESULT ReceiveConnection(
  [in]  IPin *pConnector,
  [in]  const AM_MEDIA_TYPE *pmt
);

Parameters

pConnector [in]

Pointer to the connecting pin's IPin interface.

pmt [in]

Pointer to an AM_MEDIA_TYPE structure that specifies the media type for the connection.

Return value

Returns an HRESULT value. Possible values include the following.

Return codeDescription
S_OK

Success.

E_POINTER

NULL pointer argument.

VFW_E_ALREADY_CONNECTED

The pin is already connected.

VFW_E_NOT_STOPPED

Cannot connect while filter is active.

VFW_E_TYPE_NOT_ACCEPTED

The specified media type is not acceptable.

 

Remarks

When an output pin connects, it calls this method on the input pin. The input pin should verify that the specified media type is acceptable. It may also need to check for other connection requirements specific to the owning filter. If the connection is suitable, the input pin should return S_OK, and also do the following:

If the connection is unsuitable, the pin should return an error code.

The CBasePin class implements the basic framework for this method, including storing the media type and IPin pointers.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Strmif.h (include Dshow.h)

Library

Strmiids.lib

See also

Error and Success Codes
How Filters Connect
IPin Interface

 

 

Community Additions

ADD
Show:
© 2014 Microsoft