Event Notification Codes
DirectShow supports system-defined events, which filters in the filter graph pass to the Filter Graph Manager. Filters pass these events to the Filter Graph Manager by using the IMediaEventSink::Notify method, and the application retrieves them with the IMediaEvent::GetEvent method.
When you retrieve an event by calling GetEvent, the event can contain interface pointers or pointers to allocated memory. Code that uses GetEvent should, therefore, call IMediaEvent::FreeEventParams to free any resources associated with the event's parameters after it handles the event.
The system-defined event notification codes are listed in the Evcode.h header file.
The parameters listed with an event notification code are the ones passed with the code in the CBaseFilter::NotifyEvent function. For example, consider the following statements.
NotifyEvent(EC_OLE_EVENT, (DWORD) bstr, NULL); NotifyEvent(EC_COMPLETE, S_OK, 0); NotifyEvent(EC_ERRORABORT, E_FAIL, 0);
|Event notification code||Description|
|EC_ACTIVATE||An audio or video renderer is losing or gaining activation.|
|EC_BUFFERING_DATA||The buffering status is changing.|
|EC_CLOCK_CHANGED||The filter graph has changed from one reference clock to another.|
|EC_COMPLETE||All data has been rendered.|
|EC_END_OF_SEGMENT||Notifies that a segment end has been reached.|
|EC_ERROR_STILLPLAYING||At least one call to Run failed in an active filter graph. The current state of any underlying filter graph or graphs is indeterminate; they might be running, but some are almost certainly not.|
|EC_ERRORABORT||An error forced the termination of a requested operation.|
|EC_FULLSCREEN_LOST||The video renderer is switching out of full-screen mode.|
|EC_NEED_RESTART||The current graph must be stopped and restarted.|
|EC_NOTIFY_WINDOW||Pass the window handle around during pin connection.|
|EC_OLE_EVENT||A filter is passing a text string to the application.|
|EC_OPENING_FILE||The open file status is changing.|
|EC_PALETTE_CHANGED||The video palette has changed.|
|EC_QUALITY_CHANGE||The playback quality has changed.|
|EC_REPAINT||A repaint is required.|
|EC_SEGMENT_STARTED||Notifies that a new segment has been started.|
|EC_SHUTTING_DOWN||The filter graph is starting to shut down. DirectShow passes this notification to any plug-in distributors that support the IMediaEventSink interface.|
|EC_STARVATION||One of the filters (usually a parser or file source filter) is not receiving enough data. By default, the filter graph manager will pause all running filters, and then return to normal operation when enough data is available.|
|EC_STREAM_CONTROL_STARTED||The starting reference time from an earlier call to IAMStreamControl::StartAt passed.|
|EC_STREAM_CONTROL_STOPPED||The stopping reference time from an earlier call to IAMStreamControl::StopAt passed.|
|EC_STREAM_ERROR_STILLPLAYING||The stream is still playing, but should not be playing.|
|EC_STREAM_ERROR_STOPPED||The stream has stopped, but should not have stopped.|
|EC_TIME||The requested reference time occurred.|
|EC_USERABORT||A user has forced the termination of a requested operation.|
|EC_VIDEO_SIZE_CHANGED||The size of the native video has changed.|
|EC_VIDEO_SIZE_AR_CHANGED||The size or aspect ratio of the native video has changed.|
|EC_WINDOW_DESTROYED||The video renderer's filter is being removed or destroyed.|
Last updated on Wednesday, April 13, 2005
© 2005 Microsoft Corporation. All rights reserved.