FilterGraphTools.RenderPin Method

DirectShowLib.Utils

A Managed DirectShow Toolkit

FilterGraphTools.RenderPin Method 

Render a filter's pin in a DirectShow Graph

public static bool RenderPin(
   IGraphBuilder graphBuilder,
   IBaseFilter source,
   string pinName
);

Parameters

graphBuilder
the IGraphBuilder interface of the graph
source
the filter containing the pin to render
pinName
the pin name

Return Value

true if rendering is a success, false if not

Remarks

This method assumes that the filter is part of the given graph

Exceptions

Exception Type Condition
ArgumentNullException Thrown if graphBuilder or source is null

Example

hr = graphBuilder.AddSourceFilter(@"foo.avi", "Source Filter", out filter);
DsError.ThrowExceptionForHR(hr);

if (!FilterGraphTools.RenderPin(graphBuilder, filter, "Output"))
{
  // Something went wrong...
}

See Also

FilterGraphTools Class | DirectShowLib.Utils Namespace