DirectShow provides several filters that render video:
DirectShow 提供几种 filter 播放 video :
· Video Renderer filter. This filter is available for all platforms that support DirectX, and has no particular system requirements. The Video Renderer uses DirectDraw whenever possible to render the video; otherwise, it uses GDI. This filter is the default video renderer on platforms earlier than Windows XP.
· Video Mixing Renderer Filter 7 (VMR-7). The VMR-7 is available on Windows XP, where it is the default video renderer. The VMR-7 always uses DirectDraw 7 for rendering. It provides many powerful features not available in the older Video Renderer filter, including a plug-in model where the application controls the DirectDraw surfaces used for rendering.
· Video Mixing Renderer Filter 9 (VMR-9). The VMR-9 is a newer version of the Video Mixing Renderer that uses Direct3D 9 for rendering. It is available for all platforms that support DirectX. It is not the default renderer, however, because it has higher system requirements than the Video Renderer filter.
· The Overlay Mixer filter is designed specifically for DVD playback and broadcast video. It also supports Video Port Extensions (VPEs), enabling it to work with hardware MPEG-2 decoders or analog TV tuners that send video directly to the graphics card.
· Video Renderer filter . 这个 filter 在支持 DirectX 的所有平台上都有效,并且没有特殊的系统需求。 Video Renderer 在系统支持的时候使用 DirectDraw 播放视频,系统不支持的时候使用 GDI 。在 Windows XP 之前的系统中默认使用这个 filter 播放视频。
· Video Mixing Renderer Filter 7(VMR-7) 。 VMR-7 在 Windows XP 系统上有效,是默认 video Renderer 。 VMR-7 总是使用 DirectDraw 7 播放。它提供在老的 Video Renderer filter 上不支持的强大的功能。
· Video Mixing Renderer Filter 9(VMR-9) 。 VMR-9 是一个使用 Direct3D 9 来播放的新版本 Video Mixing Renderer 。这个 filter 在所有支持 DirectX 的平台上有效。这个 filter 不是默认的 renderer ,因为它对系统的要求比 Video Renderer filter 高。
· Overlay Mixer filter 是为 DVD 回放和广播视频专门设计的。它也支持 VPEs ,使它能和硬件 MPEG-2 解码器或 TV tuner 一起工作。
Generally, the VMR-9 is preferred whenever possible, because it provides the best features, using the newest graphics APIs. For more information about using the VMR-7 and VMR-9 filters, see Using the Video Mixing Renderer .
通常,尽可能使用 VMR-9 ,因为它使用最新的图形 API ,提供最佳的效果。
Windowed Mode and Windowless Mode
A DirectShow video renderer can operate in either windowed mode or windowless mode.
DirectShow video renderer 可以操作 windowed 模式和 windowless 模式。
· In windowed mode, the renderer creates its own window to display the video. Typically you will make this window the child of an application window. For more information, see Using Windowed Mode .
· In windowless mode, the renderer draws the video directly onto an application window. It does not create its own window. For more information about this mode, see Using Windowless Mode .
· 在 windowed 模式中, renderer 创建属于它自己的窗口显示视频。你将使这个窗口成为应用程序的子窗口。
· 在 windowless 模式中, renderer 直接把视频画在应用程序窗口上。不会创建属于自己的窗口。
The Video Renderer filter supports windowed mode only. The VMR-7 and VMR-9 filters support both modes. They default to windowed mode for backward compatibility.
Video Renderer filter 仅支持 windowed 模式。 VMR-7 和 VMR-9 支持两种模式。为向后兼容,默认 windowed 模式。