IMediaControl interface (control.h)
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
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.
Inheritance
The IMediaControl interface inherits from the IDispatch interface. IMediaControl also has these types of members:
Methods
The IMediaControl interface has these methods.
IMediaControl::AddSourceFilter The AddSourceFilter method adds a source filter to the filter graph. |
IMediaControl::get_FilterCollection The get_FilterCollection method retrieves a collection of the filters in the filter graph. |
IMediaControl::get_RegFilterCollection The get_RegFilterCollection method retrieves a collection of all the filters listed in the registry. |
IMediaControl::GetState The GetState method retrieves the state of the filter graph�paused, running, or stopped. |
IMediaControl::Pause The Pause method pauses all the filters in the filter graph. |
IMediaControl::RenderFile The RenderFile method builds a filter graph that renders the specified file. (IMediaControl.RenderFile) |
IMediaControl::Run The Run method runs all the filters in the filter graph. While the graph is running, data moves through the graph and is rendered. |
IMediaControl::Stop The Stop method stops all the filters in the graph. |
IMediaControl::StopWhenReady The StopWhenReady method pauses the filter graph, allowing filters to queue data, and then stops the filter graph. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | control.h (include Dshow.h) |