IMFMediaEngine interface

Enables an application to play audio or video files.


The IMFMediaEngine interface has these methods.

Method Description
IMFMediaEngine::CanPlayType Queries how likely it is that the Media Engine can play a specified type of media resource.
IMFMediaEngine::GetAutoPlay Queries whether the Media Engine automatically begins playback.
IMFMediaEngine::GetBuffered Queries how much resource data the media engine has buffered.
IMFMediaEngine::GetCurrentSource Gets the URL of the current media resource, or an empty string if no media resource is present.
IMFMediaEngine::GetCurrentTime Gets the current playback position.
IMFMediaEngine::GetDefaultPlaybackRate Gets the default playback rate.
IMFMediaEngine::GetDuration Gets the duration of the media resource.
IMFMediaEngine::GetError Gets the most recent error status.
IMFMediaEngine::GetLoop Queries whether the Media Engine will loop playback.
IMFMediaEngine::GetMuted Queries whether the audio is muted.
IMFMediaEngine::GetNativeVideoSize Gets the size of the video frame, adjusted for aspect ratio.
IMFMediaEngine::GetNetworkState Gets the current network state of the media engine.
IMFMediaEngine::GetPlaybackRate Gets the current playback rate.
IMFMediaEngine::GetPlayed Gets the time ranges that have been rendered.
IMFMediaEngine::GetPreload Gets the preload flag.
IMFMediaEngine::GetReadyState Gets the ready state, which indicates whether the current media resource can be rendered.
IMFMediaEngine::GetSeekable Gets the time ranges to which the Media Engine can currently seek.
IMFMediaEngine::GetStartTime Gets the initial playback position.
IMFMediaEngine::GetVideoAspectRatio Gets the picture aspect ratio of the video stream.
IMFMediaEngine::GetVolume Gets the audio volume level.
IMFMediaEngine::HasAudio Queries whether the current media resource contains an audio stream.
IMFMediaEngine::HasVideo Queries whether the current media resource contains a video stream.
IMFMediaEngine::IsEnded Queries whether playback has ended.
IMFMediaEngine::IsPaused Queries whether playback is currently paused.
IMFMediaEngine::IsSeeking Queries whether the Media Engine is currently seeking to a new playback position.
IMFMediaEngine::Load Loads the current media source.
IMFMediaEngine::OnVideoStreamTick Queries the Media Engine to find out whether a new video frame is ready.
IMFMediaEngine::Pause Pauses playback.
IMFMediaEngine::Play Starts playback.
IMFMediaEngine::SetAutoPlay Specifies whether the Media Engine automatically begins playback.
IMFMediaEngine::SetCurrentTime Seeks to a new playback position.
IMFMediaEngine::SetDefaultPlaybackRate Sets the default playback rate.
IMFMediaEngine::SetErrorCode Sets the current error code.
IMFMediaEngine::SetLoop Specifies whether the Media Engine loops playback.
IMFMediaEngine::SetMuted Mutes or unmutes the audio.
IMFMediaEngine::SetPlaybackRate Sets the current playback rate.
IMFMediaEngine::SetPreload Sets the preload flag.
IMFMediaEngine::SetSource Sets the URL of a media resource.
IMFMediaEngine::SetSourceElements Sets a list of media sources.
IMFMediaEngine::SetVolume Sets the audio volume level.
IMFMediaEngine::Shutdown Shuts down the Media Engine and releases the resources it is using.
IMFMediaEngine::TransferVideoFrame Copies the current video frame to a DXGI surface or WIC bitmap.


The Media Engine implements this interface. To create an instance of the Media Engine, call IMFMediaEngineClassFactory::CreateInstance.

This interface is extended with IMFMediaEngineEx.


Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header mfmediaengine.h

See Also

Media Engine Sample

Media Foundation Interfaces