Microsoft DirectX 8.1 (C++)

IMediaControl Interface

The IMediaControl interface provides methods for controlling the flow of data through the filter graph. It includes methods for running, pausing, and stopping the graph. The Filter Graph Manager implements this interface. For more information on filter graph states, see Data Flow in the Filter Graph.

IMediaControl also provides Automation-compatible methods for building graphs. Applications written in Microsoft® Visual Basic® can use these methods to construct filter graphs or retrieve information about the graph. Applications written in C or C++ should use the methods in IGraphBuilder and IFilterGraph2 instead, because they are more efficient.

In addition to the methods inherited from IDispatch, the IMediaControl interface exposes the following methods.

Method Description
Run Runs all the filters in the filter graph.
Pause Pauses all filters in the filter graph.
Stop Stops all the filters in the filter graph.
StopWhenReady Pauses the filter graph, allowing filters to queue data, and then stops the filter graph.
GetState Retrieves the state of the filter graph.
RenderFile Builds a filter graph that renders the specified file. (For Visual Basic.)
AddSourceFilter Adds a source filter to the filter graph, for a specified file. (For Visual Basic.)
get_FilterCollection Retrieves a collection of the filters in the filter graph. (For Visual Basic.)
get_RegFilterCollection Retrieves a collection of all the filters listed in the registry. (For Visual Basic.)