Media Foundation Interfaces


IMFPMediaPlayer Interface

Contains methods to play media files.

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

Methods

The IMFPMediaPlayer interface inherits the methods of the IUnknown interface.

In addition, IMFPMediaPlayer defines the following methods.

MethodDescription

ClearMediaItem

Clears the current media item.

CreateMediaItemFromObject

Creates a media item from an object.

CreateMediaItemFromURL

Creates a media item from a URL.

FrameStep

Steps forward one video frame.

GetAspectRatioMode

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

GetBalance

Gets the current audio balance.

GetBorderColor

Gets the current color of the video border.

GetDuration

Gets the playback duration of the current media item.

GetIdealVideoSize

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

GetMediaItem

Gets a pointer to the current media item.

GetMute

Queries whether the audio is muted.

GetNativeVideoSize

Gets the size and aspect ratio of the video.

GetPosition

Gets the current playback position.

GetRate

Gets the current playback rate.

GetState

Gets the current playback state.

GetVideoSourceRect

Gets the video source rectangle.

GetVideoWindow

Gets the window where the video is displayed.

GetVolume

Gets the current audio volume.

InsertEffect

Applies an audio or video effect to playback.

Pause

Pauses playback.

Play

Starts playback.

RemoveAllEffects

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

RemoveEffect

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

SetAspectRatioMode

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

SetBalance

Sets the audio balance.

SetBorderColor

Sets the color for the video border.

SetMediaItem

Queues a media item for playback.

SetMute

Mutes or unmutes the audio.

SetPosition

Sets the playback position.

SetRate

Sets the playback rate.

SetVideoSourceRect

Sets the video source rectangle.

SetVolume

Sets the audio volume.

Shutdown

Shuts down the MFPlay player object and releases any resources that the object is using.

Stop

Stops playback.

UpdateVideo

Updates the video frame. Call this method when your application receives a WM_PAINT or WM_SIZE message.

 

Requirements

Minimum supported clientWindows 7
Minimum supported serverWindows Server 2008 R2
HeaderMfplay.h

See Also

Media Foundation Interfaces
Using MFPlay for Audio/Video Playback

Send comments about this topic to Microsoft

Build date: 10/8/2009

Tags :


Page view tracker