Поделиться через


IFilterGraph::ConnectDirect

 
Microsoft DirectShow 9.0

IFilterGraph::ConnectDirect

The ConnectDirect method connects the two pins directly (without intervening filters).

Syntax

  HRESULT ConnectDirect(
  IPin *ppinOut,
  IPin *ppinIn,
  const AM_MEDIA_TYPE *pmt
);

Parameters

ppinOut

[in] Pointer to the output pin.

ppinIn

[in] Pointer to the input pin.

pmt

[in] Pointer to the media type to use for the connection (optional; can be NULL).

Return Values

Returns one of the following values, or an error value returned by IPin::Connect.

Value Description
S_OK Success.
E_POINTER Null pointer argument.
VFW_E_NOT_IN_GRAPH One of the specified pins is not in the graph.
VFW_E_CIRCULAR_GRAPH The input pin is upstream of the output pin, which would result in a circular graph.

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also