Export (0) Print
Expand All
Expand Minimize

MF_MEDIA_ENGINE_EVENT enumeration

Defines event codes for the Media Engine.

Syntax


typedef enum MF_MEDIA_ENGINE_EVENT { 
  MF_MEDIA_ENGINE_EVENT_LOADSTART           = 1,
  MF_MEDIA_ENGINE_EVENT_PROGRESS            = 2,
  MF_MEDIA_ENGINE_EVENT_SUSPEND             = 3,
  MF_MEDIA_ENGINE_EVENT_ABORT               = 4,
  MF_MEDIA_ENGINE_EVENT_ERROR               = 5,
  MF_MEDIA_ENGINE_EVENT_EMPTIED             = 6,
  MF_MEDIA_ENGINE_EVENT_STALLED             = 7,
  MF_MEDIA_ENGINE_EVENT_PLAY                = 8,
  MF_MEDIA_ENGINE_EVENT_PAUSE               = 9,
  MF_MEDIA_ENGINE_EVENT_LOADEDMETADATA      = 10,
  MF_MEDIA_ENGINE_EVENT_LOADEDDATA          = 11,
  MF_MEDIA_ENGINE_EVENT_WAITING             = 12,
  MF_MEDIA_ENGINE_EVENT_PLAYING             = 13,
  MF_MEDIA_ENGINE_EVENT_CANPLAY             = 14,
  MF_MEDIA_ENGINE_EVENT_CANPLAYTHROUGH      = 15,
  MF_MEDIA_ENGINE_EVENT_SEEKING             = 16,
  MF_MEDIA_ENGINE_EVENT_SEEKED              = 17,
  MF_MEDIA_ENGINE_EVENT_TIMEUPDATE          = 18,
  MF_MEDIA_ENGINE_EVENT_ENDED               = 19,
  MF_MEDIA_ENGINE_EVENT_RATECHANGE          = 20,
  MF_MEDIA_ENGINE_EVENT_DURATIONCHANGE      = 21,
  MF_MEDIA_ENGINE_EVENT_VOLUMECHANGE        = 22,
  MF_MEDIA_ENGINE_EVENT_FORMATCHANGE        = 1000,
  MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS   = 1001,
  MF_MEDIA_ENGINE_EVENT_TIMELINE_MARKER     = 1002,
  MF_MEDIA_ENGINE_EVENT_BALANCECHANGE       = 1003,
  MF_MEDIA_ENGINE_EVENT_DOWNLOADCOMPLETE    = 1004,
  MF_MEDIA_ENGINE_EVENT_BUFFERINGSTARTED    = 1005,
  MF_MEDIA_ENGINE_EVENT_BUFFERINGENDED      = 1006,
  MF_MEDIA_ENGINE_EVENT_FRAMESTEPCOMPLETED  = 1007,
  MF_MEDIA_ENGINE_EVENT_NOTIFYSTABLESTATE   = 1008,
  MF_MEDIA_ENGINE_EVENT_FIRSTFRAMEREADY     = 1009,
  MF_MEDIA_ENGINE_EVENT_TRACKSCHANGE        = 1010,
  MF_MEDIA_ENGINE_EVENT_OPMINFO             =  1011
} MF_MEDIA_ENGINE_EVENT;

Constants

MF_MEDIA_ENGINE_EVENT_LOADSTART

The Media Engine has started to load the source. See IMFMediaEngine::Load.

MF_MEDIA_ENGINE_EVENT_PROGRESS

The Media Engine is loading the source.

MF_MEDIA_ENGINE_EVENT_SUSPEND

The Media Engine has suspended a load operation.

MF_MEDIA_ENGINE_EVENT_ABORT

The Media Engine cancelled a load operation that was in progress.

MF_MEDIA_ENGINE_EVENT_ERROR

An error occurred.

Event ParameterDescription
param1A member of the MF_MEDIA_ENGINE_ERR enumeration.
param2An HRESULT error code, or zero.

 

MF_MEDIA_ENGINE_EVENT_EMPTIED

The Media Engine has switched to the MF_MEDIA_ENGINE_NETWORK_EMPTY state. This can occur when the IMFMediaEngine::Load method is called, or if an error occurs during the Load method. See IMFMediaEngine::GetNetworkState.

MF_MEDIA_ENGINE_EVENT_STALLED

The Load algorithm is stalled, waiting for data.

MF_MEDIA_ENGINE_EVENT_PLAY

The Media Engine is switching to the playing state. See IMFMediaEngine::Play.

MF_MEDIA_ENGINE_EVENT_PAUSE

The media engine has paused. See IMFMediaEngine::Pause.

MF_MEDIA_ENGINE_EVENT_LOADEDMETADATA

The Media Engine has loaded enough source data to determine the duration and dimensions of the source.

MF_MEDIA_ENGINE_EVENT_LOADEDDATA

The Media Engine has loaded enough data to render some content (for example, a video frame).

MF_MEDIA_ENGINE_EVENT_WAITING

Playback has stopped because the next frame is not available.

MF_MEDIA_ENGINE_EVENT_PLAYING

Playback has started. See IMFMediaEngine::Play.

MF_MEDIA_ENGINE_EVENT_CANPLAY

Playback can start, but the Media Engine might need to stop to buffer more data.

MF_MEDIA_ENGINE_EVENT_CANPLAYTHROUGH

The Media Engine can probably play through to the end of the resource, without stopping to buffer data.

MF_MEDIA_ENGINE_EVENT_SEEKING

The Media Engine has started seeking to a new playback position. See IMFMediaEngine::SetCurrentTime.

MF_MEDIA_ENGINE_EVENT_SEEKED

The Media Engine has seeked to a new playback position. See IMFMediaEngine::SetCurrentTime.

MF_MEDIA_ENGINE_EVENT_TIMEUPDATE

The playback position has changed. See IMFMediaEngine::GetCurrentTime.

MF_MEDIA_ENGINE_EVENT_ENDED

Playback has reached the end of the source. This event is not sent if the GetLoopis TRUE.

MF_MEDIA_ENGINE_EVENT_RATECHANGE

The playback rate has changed. See IMFMediaEngine::SetPlaybackRate.

MF_MEDIA_ENGINE_EVENT_DURATIONCHANGE

The duration of the media source has changed. See IMFMediaEngine::GetDuration.

MF_MEDIA_ENGINE_EVENT_VOLUMECHANGE

The audio volume changed. See IMFMediaEngine::SetVolume.

MF_MEDIA_ENGINE_EVENT_FORMATCHANGE

The output format of the media source has changed.

Event ParameterDescription
param1Zero if the video format changed, 1 if the audio format changed.
param2Zero.

 

MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS

The Media Engine flushed any pending events from its queue.

MF_MEDIA_ENGINE_EVENT_TIMELINE_MARKER

The playback position reached a timeline marker. See IMFMediaEngineEx::SetTimelineMarkerTimer.

MF_MEDIA_ENGINE_EVENT_BALANCECHANGE

The audio balance changed. See IMFMediaEngineEx::SetBalance.

MF_MEDIA_ENGINE_EVENT_DOWNLOADCOMPLETE

The Media Engine has finished downloading the source data.

MF_MEDIA_ENGINE_EVENT_BUFFERINGSTARTED

The media source has started to buffer data.

MF_MEDIA_ENGINE_EVENT_BUFFERINGENDED

The media source has stopped buffering data.

MF_MEDIA_ENGINE_EVENT_FRAMESTEPCOMPLETED

The IMFMediaEngineEx::FrameStep method completed.

MF_MEDIA_ENGINE_EVENT_NOTIFYSTABLESTATE

The Media Engine's Load algorithm is waiting to start.

Event ParameterDescription
param1A handle to a waitable event, of type HANDLE.
param2Zero.

 

If Media Engine is created with the MF_MEDIA_ENGINE_WAITFORSTABLE_STATE flag, the Media Engine sends the MF_MEDIA_ENGINE_EVENT_NOTIFYSTABLESTATE event at the start of the Load algorithm. The param1 parameter is a handle to a waitable event. The Load thread waits for the application to signal the event by calling SetEvent.

If the Media Engine is not created with the MF_MEDIA_ENGINE_WAITFORSTABLE_STATE, it does not send this event, and the Load thread does not wait to be signalled.

MF_MEDIA_ENGINE_EVENT_FIRSTFRAMEREADY

The first frame of the media source is ready to render.

MF_MEDIA_ENGINE_EVENT_TRACKSCHANGE

Raised when a new track is added or removed.

Supported in Windows 8.1 and later.

MF_MEDIA_ENGINE_EVENT_OPMINFO

Raised when there is new information about the Output Protection Manager (OPM).

This event will be raised when an OPM failure occurs, but ITA allows fallback without the OPM. In this case, constriction can be applied.

This event will not be raised when there is an OPM failure and the fallback also fails. For example, if ITA blocks playback entirely when OPM cannot be established.

Supported in Windows 8.1 and later.

Remarks

The application receives Media Engine events through the IMFMediaEngineNotify::EventNotify method. The EventNotify method includes two event parameters, param1 and param2. The meaning of the parameters depends on the event code. If the event description does not list any parameters, ignore the values of param1 and param2.

Values below 1000 correspond to events defined in HTML 5 for media elements.

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Header

Mfmediaengine.h

See also

IMFMediaEngineNotify::EventNotify

 

 

Community Additions

ADD
Show:
© 2014 Microsoft