Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
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::Notifymethod, and the application retrieves them with the IMediaEvent::GetEventmethod.
When you retrieve an event by calling GetEvent, the event can contain interface pointers or pointers to allocated memory. Code that uses GetEventshould, therefore, call IMediaEvent::FreeEventParamsto 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::NotifyEventfunction. For example, consider the following statements.
Copy Code | |
---|---|
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 Runfailed 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 IMediaEventSinkinterface. |
|
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::StartAtpassed. |
|
The stopping reference time from an earlier call to IAMStreamControl::StopAtpassed. |
|
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. |