CBasePin::Connect (Windows Embedded CE 6.0)
1/6/2010
Initiates a connection from this pin to the other pin.
Syntax
HRESULT Connect(
IPin* pReceivePin,
const AM_MEDIA_TYPE* pmt
);
Parameters
- pReceivePin
Input pin to connect to.
- pmt
Optional media type parameter.
Return Value
Returns one of the following arguments by default; if overridden, should return standard HRESULT values.
Value | Description |
---|---|
This output pin is already connected to another pin. |
|
The filter graph is not in a stopped state and connection cannot be performed. |
|
Other error value |
Returned from CBasePin::AgreeMediaType or CBasePin::CheckConnect or overridden versions of these member functions. |
Remarks
This member function implements the IPin::Connect method.
IPin::Connect is implemented on the output pin and calls the IPin::ReceiveConnection method for the connected input pin (implemented in the base classes as CBasePin::ReceiveConnection).
This member function calls the virtual CBasePin::CheckConnect member function, which can be overridden to verify that the connection is possible. CBasePin::CheckConnect then calls CBasePin::AgreeMediaType to negotiate a common media type with the connected pin.
CBasePin::AgreeMediaType calls CBasePin::TryMediaTypes twice, once for this pin's media type enumerator and once for the receiving pin's media type enumerator.
For each media type found, CBasePin::AttemptConnection is called, which in turn calls the receiving pin's IPin::ReceiveConnection method, and finally CBasePin::CompleteConnect if successful.
Requirements
Windows Embedded CE | Windows CE 2.12 and later |
Note | Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements For more information, see Setting Up the Build Environment, Version 2.12 requires DXPAK 1.0 or later |