IMFSourceReaderCallback::OnEvent method (mfreadwrite.h)

Called when the source reader receives certain events from the media source.

Syntax

HRESULT OnEvent(
  [in] DWORD         dwStreamIndex,
  [in] IMFMediaEvent *pEvent
);

Parameters

[in] dwStreamIndex

For stream events, the value is the zero-based index of the stream that sent the event. For source events, the value is MF_SOURCE_READER_MEDIASOURCE.

[in] pEvent

A pointer to the IMFMediaEvent interface of the event.

Return value

Returns an HRESULT value. Currently, the source reader ignores the return value.

Remarks

In the current implementation, the source reader uses this method to forward the following events to the application:

This interface is available on Windows Vista if Platform Update Supplement for Windows Vista is installed.

Requirements

Requirement Value
Minimum supported client Windows 7, Windows Vista and Platform Update Supplement for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header mfreadwrite.h

See also

IMFSourceReaderCallback

Source Reader