Microsoft DirectX 9.0

Event Notification Codes

This sections lists the DirectShow events that are not specific to DVD. For events specific to DVD, see DVD Event Notification Codes.

Filters send events to the Filter Graph Manager by calling the IMediaEventSink::Notify method. The Filter Graph Manager handles some events and queues others for the application. The application retrieves them by calling the IMediaEvent::GetEvent method.

In the sections that follow, each entry lists the event code, the meaning of the event parameters, and the Filter Graph Manager's default action for the event, if any. To override the default action, call IMediaEvent::CancelDefaultHandling. Event codes are defined in the header files Evcode.h and Audevcod.h. If there is no default action, the Filter Graph Manager automatically forwards the event to the application (through the event queue).

Custom Events

Filters can define custom events with event codes in the range EC_USER and higher. The Filter Graph Manager will place these directly in the event queue. However, the following caveats apply:

Event notification code Description
EC_ACTIVATE A video window is being activated or deactivated.
EC_BUFFERING_DATA The graph is buffering data, or has stopped buffering data.
EC_BUILT Send by the Video Control when a graph has been built. Not forwarded to applications.
EC_CLOCK_CHANGED The reference clock has changed.
EC_CLOCK_UNSET The clock provider was disconnected.
EC_CODECAPI_EVENT Sent by an encoder to signal an encoding event.
EC_COMPLETE All data from a particular stream has been rendered.
EC_DEVICE_LOST A Plug and Play device was removed or has become available again.
EC_DISPLAY_CHANGED The display mode has changed.
EC_END_OF_SEGMENT The end of a segment has been reached.
EC_ERROR_STILLPLAYING An asynchronous command to run the graph has failed.
EC_ERRORABORT An operation was aborted because of an error.
EC_FULLSCREEN_LOST The video renderer is switching out of full-screen mode.
EC_GRAPH_CHANGED The filter graph has changed.
EC_LENGTH_CHANGED The length of a source has changed.
EC_NEED_RESTART A filter is requesting that the graph be restarted.
EC_NOTIFY_WINDOW Notifies a filter of the video renderer's window.
EC_OLE_EVENT A filter is passing a text string to the application.
EC_OPENING_FILE The graph is opening a file, or has finished opening a file.
EC_PALETTE_CHANGED The video palette has changed.
EC_PAUSED A pause request has completed.
EC_QUALITY_CHANGE The graph is dropping samples, for quality control.
EC_REPAINT A video renderer requires a repaint.
EC_SEGMENT_STARTED A new segment has started.
EC_SHUTTING_DOWN The filter graph is shutting down, prior to being destroyed.
EC_SNDDEV_IN_ERROR An audio device error has occurred on an input pin.
EC_SNDDEV_OUT_ERROR An audio device error has occurred on an output pin.
EC_STARVATION A filter is not receiving enough data.
EC_STATE_CHANGE The filter graph has changed state.
EC_STEP_COMPLETE A filter performing frame stepping has stepped the specified number of frames.
EC_STREAM_CONTROL_STARTED A stream-control start command has taken effect.
EC_STREAM_CONTROL_STOPPED A stream-control start command has taken effect.
EC_STREAM_ERROR_STILLPLAYING An error has occurred in a stream. The stream is still playing.
EC_STREAM_ERROR_STOPPED A stream has stopped because of an error.
EC_UNBUILT Send by the Video Control when a graph has been torn down. Not forwarded to applications.
EC_USERABORT The user has terminated playback.
EC_VIDEO_SIZE_CHANGED The native video size has changed.
EC_VMR_RENDERDEVICE_SET Sent when the VMR has selected its rendering mechanism.
EC_VMR_SURFACE_FLIPPED Sent when the VMR-7's allocator presenter has called the DirectDraw Flip method on the surface being presented.
EC_VMR_RECONNECTION_FAILED Sent by the VMR-7 and the VMR-9 when it was unable to accept a dynamic format change request from the upstream decoder.
EC_WINDOW_DESTROYED The video renderer was destroyed or removed from the graph.
EC_WMT_EVENT Sent by the Windows Media Format SDK when an application uses the ASF Reader filter to play ASF files protected by digital rights management (DRM).
EC_WMT_INDEX_EVENT Sent by the Windows Media Format SDK when an application uses the ASF Writer to index Windows Media Video files.

See Also