|Microsoft DirectX 9.0|
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:
The following illustration shows typical WM ASF Writer filter graph configurations.