FilterGraphTools.ConnectFilters Method (IGraphBuilder, IBaseFilter, String, IBaseFilter, String, Boolean)

DirectShowLib.Utils

A Managed DirectShow Toolkit

FilterGraphTools.ConnectFilters Method (IGraphBuilder, IBaseFilter, String, IBaseFilter, String, Boolean)

Connect pins from two filters

public static void ConnectFilters(
   IGraphBuilder graphBuilder,
   IBaseFilter upFilter,
   string sourcePinName,
   IBaseFilter downFilter,
   string destPinName,
   bool useIntelligentConnect
);

Parameters

graphBuilder
the IGraphBuilder interface of the graph
upFilter
the upstream filter
sourcePinName
the upstream filter pin name
downFilter
the downstream filter
destPinName
the downstream filter pin name
useIntelligentConnect
indicate if the method should use DirectShow's Intelligent Connect

Remarks

If useIntelligentConnect is true, this method can add missing filters between the two pins.
If useIntelligentConnect is false, this method works only if the two media types are compatible.

Exceptions

Exception Type Condition
ArgumentNullException Thrown if graphBuilder, upFilter or downFilter are null
ArgumentException Thrown if pin names are not found in filters
COMException Thrown if pins can't connect

See Also

FilterGraphTools Class | DirectShowLib.Utils Namespace | FilterGraphTools.ConnectFilters Overload List