Share via


IMFPMediaPlayer interface (mfplay.h)

[The feature associated with this page, MFPlay, is a legacy feature. It has been superseded by MediaPlayer and IMFMediaEngine. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer and IMFMediaEngine instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Contains methods to play media files.

The MFPlay player object exposes this interface. To get a pointer to this interface, call MFPCreateMediaPlayer.

Inheritance

The IMFPMediaPlayer interface inherits from the IUnknown interface. IMFPMediaPlayer also has these types of members:

Methods

The IMFPMediaPlayer interface has these methods.

 
IMFPMediaPlayer::ClearMediaItem

Clears the current media item.
IMFPMediaPlayer::CreateMediaItemFromObject

Creates a media item from an object.
IMFPMediaPlayer::CreateMediaItemFromURL

Creates a media item from a URL.
IMFPMediaPlayer::FrameStep

Steps forward one video frame.
IMFPMediaPlayer::GetAspectRatioMode

Gets the current aspect-ratio correction mode. This mode controls whether the aspect ratio of the video is preserved during playback.
IMFPMediaPlayer::GetBalance

Gets the current audio balance.
IMFPMediaPlayer::GetBorderColor

Gets the current color of the video border.
IMFPMediaPlayer::GetDuration

Gets the playback duration of the current media item.
IMFPMediaPlayer::GetIdealVideoSize

Gets the range of video sizes that can be displayed without significantly degrading performance or image quality.
IMFPMediaPlayer::GetMediaItem

Gets a pointer to the current media item.
IMFPMediaPlayer::GetMute

Queries whether the audio is muted. (IMFPMediaPlayer.GetMute)
IMFPMediaPlayer::GetNativeVideoSize

Gets the size and aspect ratio of the video.
IMFPMediaPlayer::GetPosition

Gets the current playback position. (IMFPMediaPlayer.GetPosition)
IMFPMediaPlayer::GetRate

Gets the current playback rate. (IMFPMediaPlayer.GetRate)
IMFPMediaPlayer::GetState

Gets the current playback state of the MFPlay player object.
IMFPMediaPlayer::GetSupportedRates

Gets the range of supported playback rates.
IMFPMediaPlayer::GetVideoSourceRect

Gets the video source rectangle.
IMFPMediaPlayer::GetVideoWindow

Gets the window where the video is displayed.
IMFPMediaPlayer::GetVolume

Gets the current audio volume.
IMFPMediaPlayer::InsertEffect

Applies an audio or video effect to playback.
IMFPMediaPlayer::Pause

Pauses playback. (IMFPMediaPlayer.Pause)
IMFPMediaPlayer::Play

Starts playback. (IMFPMediaPlayer.Play)
IMFPMediaPlayer::RemoveAllEffects

Removes all effects that were added with the IMFPMediaPlayer::InsertEffect method.
IMFPMediaPlayer::RemoveEffect

Removes an effect that was added with the IMFPMediaPlayer::InsertEffect method.
IMFPMediaPlayer::SetAspectRatioMode

Specifies whether the aspect ratio of the video is preserved during playback.
IMFPMediaPlayer::SetBalance

Sets the audio balance. (IMFPMediaPlayer.SetBalance)
IMFPMediaPlayer::SetBorderColor

Sets the color for the video border.
IMFPMediaPlayer::SetMediaItem

Queues a media item for playback.
IMFPMediaPlayer::SetMute

Mutes or unmutes the audio. (IMFPMediaPlayer.SetMute)
IMFPMediaPlayer::SetPosition

Sets the playback position.
IMFPMediaPlayer::SetRate

Sets the playback rate. (IMFPMediaPlayer.SetRate)
IMFPMediaPlayer::SetVideoSourceRect

Sets the video source rectangle.
IMFPMediaPlayer::SetVolume

Sets the audio volume.
IMFPMediaPlayer::Shutdown

Shuts down the MFPlay player object and releases any resources the object is using.
IMFPMediaPlayer::Stop

Stops playback.
IMFPMediaPlayer::UpdateVideo

Updates the video frame. (IMFPMediaPlayer.UpdateVideo)

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header mfplay.h

See also

Media Foundation Interfaces

Using MFPlay for Audio/Video Playback