Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The filter graph exposes the IMediaControlinterface to allow applications to control the streaming of media through the filters in the graph. The interface provides methods for running, pausing, and stopping the streaming of data. It also provides applications with a simple method of building graphs to play back media files.
When to Implement
This interface is implemented by the filter graph manager. Implement this only if you are writing a plug-in distributor that needs to export the control methods. The CMediaControlbase class implements this interface and handles the IDispatchinterface.
When to Use
Use this interface from any application that wants to control the playing of media through DirectShow filter graphs. Applications can also use it to enumerate the filters in the filter graph and all the filters in the registry, to add a source filter to the filter graph, and to instruct the filter graph manager to build a filter graph capable of rendering the media type in a file.
Remarks
As the IFilterInfoand IAMCollectioninterfaces are not supported on Windows Embedded CE, the get_FilterCollectionand get_RegFilterCollectionmembers of the IMediaControlinterface are not supported on Windows Embedded CE either. Attempting to access either member will generate an E_NOTIMPLerror.
Methods in Vtable Order
The following table shows the methods that appear in the Vtable beneath the standard COM methods inherited from IUnknown.
IDispatch method | Description |
---|---|
Determines whether there is type information available for this dispinterface. |
|
Retrieves the type information for this dispinterface if GetTypeInfoCountreturned successfully. |
|
Converts text names of properties and methods (including arguments) to their corresponding DISPIDs. |
|
Calls a method or accesses a property in this dispinterface if given a DISPID and any other necessary parameters. |
IMediaControl method | Description |
---|---|
Switches the entire filter graph into running mode. |
|
Pauses all filters in the filter graph. |
|
Switches all filters in the filter graph to a stopped state. |
|
Waits for an operation such as Pause to complete, allowing filters to queue up data, then stops the filter graph. |
|
Retrieves the state of the filter graph. |
|
Adds and connects filters needed to play the specified file. |
|
Adds to the graph the source filter that can read the given file name, and returns an IDispatchinterface pointer representing the filter object. |
Requirements
Windows Embedded CE | Windows CE 2.12 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
Note | Microsoft DirectShow applications and DirectShow filters have
different include file and Library requirements
For more information, see Setting Up the Build Environment See Also |