Event Notification Codes
A version of this page is also available for
4/8/2010
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 |
---|---|
An audio or video renderer is losing or gaining activation. |
|
Indicates that the capture buffer is full. |
|
The buffering status is changing. |
|
This notification indicates that still image capture has completed. |
|
Indicates that an error occurred while writing captured data to a file. |
|
Indicates that a frame of data has been captured. |
|
The filter graph has changed from one reference clock to another. |
|
All data has been rendered. |
|
Notifies when content protected by digital rights management (DRM) requests some form of analog content protection. |
|
Notifies that a segment end has been reached. |
|
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. |
|
An error forced the termination of a requested operation. |
|
The video renderer is switching out of full-screen mode. |
|
The current graph must be stopped and restarted. |
|
Pass the window handle around during pin connection. |
|
A filter is passing a text string to the application. |
|
The open file status is changing. |
|
The user has initiated an asynchronous request to play back the next track. |
|
The user has initiated an asynchronous request to play back the previous track. |
|
The video palette has changed. |
|
The playback quality has changed. |
|
A repaint is required. |
|
Notifies that a new segment has been started. |
|
The filter graph is starting to shut down. DirectShow passes this notification to any plug-in distributors that support the IMediaEventSink interface. |
|
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. |
|
The starting reference time from an earlier call to IAMStreamControl::StartAt passed. |
|
The stopping reference time from an earlier call to IAMStreamControl::StopAt passed. |
|
The stream is still playing, but should not be playing. |
|
The stream has stopped, but should not have stopped. |
|
The requested reference time occurred. |
|
A user has forced the termination of a requested operation. |
|
The size or aspect ratio of the native video has changed. |
|
The size of the native video has changed. |
|
The video renderer's filter is being removed or destroyed. |