CBaseFilter.ReconnectPin 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 ReconnectPin
method breaks an existing pin connection and reconnects it to the same pin, using a specified media type.
Syntax
HRESULT ReconnectPin(
IPin *pPin,
AM_MEDIA_TYPE const *pmt
);
Parameters
-
pPin
-
Pointer to the pin's IPin interface.
-
pmt
-
Pointer to an AM_MEDIA_TYPE structure that specifies the media type, or NULL.
Return value
Returns an HRESULT value. Possible values include those listed in the following table.
Return code | Description |
---|---|
|
Success. |
|
m_pGraph member variable is NULL. |
Remarks
This method calls the IFilterGraph2::ReconnectEx method on the filter graph manager. If the IFilterGraph2 interface is not available, the method calls IFilterGraph::Reconnect.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|