CBaseFilter.NotifyEvent method
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The NotifyEvent
method sends an event notification to the filter graph manager.
Syntax
HRESULT NotifyEvent(
long EventCode,
LONG_PTR EventParam1,
LONG_PTR EventParam2
);
Parameters
-
EventCode
-
Event notification code.
-
EventParam1
-
First parameter of the event.
-
EventParam2
-
Second parameter of the event.
Return value
Returns an HRESULT value. Possible values include those in the following table.
Return code | Description |
---|---|
|
The filter graph manager is not accepting event notifications. |
|
Success. |
|
Filter does not have a pointer to the IMediaEventSink interface. |
Remarks
For a list of notification codes and parameter values, see Event Notification Codes.
In the base class, if the event code is EC_COMPLETE, the method sets the EventParam2 parameter to a pointer to the filter's IBaseFilter interface.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|