FilterGraphTools.ConnectFilters Method (IGraphBuilder, IPin, IPin, Boolean)

DirectShowLib.Utils

A Managed DirectShow Toolkit

FilterGraphTools.ConnectFilters Method (IGraphBuilder, IPin, IPin, Boolean)

Connect pins from two filters

public static void ConnectFilters(
   IGraphBuilder graphBuilder,
   IPin sourcePin,
   IPin destPin,
   bool useIntelligentConnect
);

Parameters

graphBuilder
the IGraphBuilder interface of the graph
sourcePin
the source (upstream / output) pin
destPin
the destination (downstream / input) pin
useIntelligentConnect
indicates 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, sourcePin or destPin are null
COMException Thrown if pins can't connect

See Also

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