Share via


IMediaEvent Object

Note  This topic is deprecated. It applies to Visual Basic 6.0. DirectShow is not supported for Visual Basic .NET or C#.

The IMediaEvent object contains methods for retrieving event notifications and for overriding the Filter Graph Manager's default handling of events. Applications can use this object to respond to events that occur in the filter graph, such as the end of a stream or a rendering error.

To use this object, declare a variable of type IMediaEvent and set it equal to the FilgraphManager object:

Dim mGraph As New FilgraphManager
Dim iEvent As IMediaEvent
Set iEvent = mGraph

For more information about event notification, see Event Notification in DirectShow. For a list of system-defined event notifications, see Event Notification Codes.

Include a reference in your project to "ActiveMovie control type library" (Quartz.dll).

The IMediaEvent object exposes the following methods.

Method Description
CancelDefaultHandling Cancels the Filter Graph Manager's default handling for a specified event.
FreeEventParams Frees resources associated with the parameters of an event.
GetEvent Retrieves the next event notification from the event queue.
GetEventHandle Retrieves a handle to a manual-reset event that remains signaled while the queue contains event notifications.
RestoreDefaultHandling Restores the Filter Graph Manager's default handling for a specified event.
WaitForCompletion Waits for the filter graph to render all available data.

 

 

 

Send comments about this topic to Microsoft

Build date: 8/31/2010