Microsoft DirectX 9.0

Building a Filter Graph for ASF Output

You can build a filter graph using the WM ASF Writer in two ways. The first way is to manually add each filter to the graph and connect the pins. After adding the WM ASF Writer, configure it through the IConfigAsfWriter methods, if the default profile is not suitable, and connect the WM ASF Writer input pins to the corresponding output pins on the upstream filters.

The second way is to call the IGraphBuilder::RenderFile method with the name of the file to convert to ASF. RenderFile automatically builds a complete graph for rendering the file. In your application code, you then manually remove the renderer filters and insert the WM ASF Writer. This involves five basic steps:

  1. Add the WM ASF Writer to the graph.
  2. Disconnect the renderer filters and store the output pins they were connected to.
  3. Remove the renderer filters from the graph.
  4. Configure the WM ASF Writer.
  5. Connect the WM ASF Writer input pins to the output pins by using IGraphBuilder::Connect.

The following illustration shows typical WM ASF Writer filter graph configurations.

ASF Writer filter graphs