The Video Window

When you render a video file, the filter graph will contain a video renderer filter. The video renderer takes uncompressed video data as input and renders it to the screen inside a window. Unless you specify otherwise, the video playback window is a top-level window with its own borders and title bar. It is more likely, however, that you will want the video to appear in a particular window created by your application. The solution is to make the renderer's video window a child of the application window. You can accomplish this by setting properties on the video window to specify the owner, style, and position of the window.

The video renderer filter supports the IVideoWindow interface, which contains methods for setting and retrieving properties on the video window. However, if you constructed your filter graph using the filter graph manager, you will not necessarily have a pointer to the video renderer filter. Therefore, the filter graph manager also supports IVideoWindow. It keeps a list of which filters in the graph expose IVideoWindow. When you call an IVideoWindow method on the filter graph manager, the filter graph manager distributes the call to those filters. In this way, the filter graph manager can support operations on individual filters, without the application needing to locate the right filter.

The filter graph manager uses the same mechanism to expose the IBasicVideo and IBasicAudio interfaces. These interfaces contain methods for setting audio and video properties. Call these methods on the filter graph manager, rather than calling them on individual filters.

© 2005 Microsoft Corporation. All rights reserved.