Writing an Alternative Renderer

DirectShow provides a window-based video renderer; it also provides a full-screen renderer in the run-time installation. You can use the DirectShow base classes to write alternative video renderers. For alternative renderers to interact correctly with DirectShow-based applications, the renderers must adhere to the guidelines outlined in this topic. You can use the CBaseRenderer and CBaseVideoRenderer classes to help follow these guidelines when implementing an alternative video render. Because of the ongoing development of DirectShow, review your implementation periodically to ensure that the renderers are compatible with the most recent version of DirectShow.

This topic discusses many notifications that a renderer is responsible for handling. A brief review of DirectShow notifications might help to set the stage. There are essentially three kinds of notifications that occur in DirectShow:

  • Stream notifications, which are events that occur in the media stream and are passed from one filter to the next. These can be begin-flushing, end-flushing or end-of-stream notifications and are sent by calling the appropriate method on the downstream filter's input pin (for example IPin::BeginFlush).
  • Filter graph manager notifications, which are events sent from a filter to the filter graph manager such as EC_COMPLETE. This is accomplished by calling the IMediaEventSink::Notify method on the filter graph manager.
  • Application notifications, which are retrieved from the filter graph manager by the controlling application. An application calls the IMediaEvent::GetEvent method on the filter graph manager to retrieve these events. Often, the filter graph manager passes through the events it receives to the application.

This topic discusses the responsibility of the renderer filter in handling stream notifications it receives and in sending appropriate filter graph manager notifications.

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.