MFP_MF_EVENT structure (mfplay.h)

Important  Deprecated. This API may be removed from future releases of Windows. Applications should use the Media Session for playback.

Event structure for the MFP_EVENT_TYPE_MF event. The MFPlay player object uses this event to forward certain events from the Media Foundation pipeline to the application.


typedef struct MFP_MF_EVENT {
  MediaEventType   MFEventType;
  IMFMediaEvent    *pMFMediaEvent;
  IMFPMediaItem    *pMediaItem;



MFP_EVENT_HEADER structure that contains data common to all IMFPMediaPlayer events.


Media Foundation event type. Currently, the MFPlay player object forwards the following pipeline events to the application:

Event Description
MEBufferingStarted The source has started buffering data.
MEBufferingStopped The source has stopped buffering data.
MEExtendedType Custom event type.
MEReconnectEnd The source has completed an attempt to reconnect to the server.
MEReconnectStart The source is attempting to reconnect to the server.
MERendererEvent Event sent by a renderer, such as the Enhanced Video Renderer (EVR).
MEStreamSinkFormatChanged A stream format has changed.


Pointer to the IMFMediaEvent interface of the Media Foundation event.


Pointer to the IMFPMediaItem interface of the current media item.


To get a pointer to this structure, cast the pEventHeader parameter of the IMFPMediaPlayerCallback::OnMediaPlayerEvent method. You can use the MFP_GET_MF_EVENT macro for this purpose.

If MFEventType is MEStreamSinkFormatChanged, the following property may be stored in the event property store, which can be accessed through the header.pPropertyStore member.

Property Description
MFP_PKEY_StreamIndex The index of the stream whose format changed.


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

See also


Media Foundation Structures

Using MFPlay for Audio/Video Playback