|Microsoft DirectX 9.0|
The VMR employs a modular design that enables applications to configure it for many different rendering scenarios. Depending on its configuration, the VMR contains from two to five subcomponents (in addition to its input pins).
Mixer: The mixer is a COM object that is loaded by the VMR when multiple input streams are detected. The mixer collects information about each input stream and sorts the streams into the correct Z-order. It is responsible for determining when each input pin receives a sample, and for instructing the image compositor at the proper time to perform the actual blending. The mixer also calculates the time stamp to be applied to each output image. When the application is supplying a bitmap to be displayed on top of the composited image, the mixer is responsible for ensuring that the bitmap is displayed on top even if the Z-order of the input streams is modified.
Image Compositor: The Image Compositor is a COM object that performs the actual blending of the input streams onto a single DirectDraw or Direct3D surface provided by the allocator-presenter. The VMR provides a default image compositor that enables applications to perform 2-D alpha-blending effects. Applications can provide a custom image compositor to enable other 2-D and 3-D effects, such as applying textures to portions of the image, per-pixel alpha blending, mapping the image to stationary or moving 3-D objects, and so on.
Allocator-Presenter: The allocator-presenter is a COM object that allocates the DirectDraw or Direct3D object and handles the communication with the graphics card. The drawing can be performed either as a flip or as a blit. You can plug in your own allocator-presenter in order to create and control the DirectDraw or Direct3D object, and/or to obtain access to the video bits at presentation time.
Core Synchronization Unit: The core synchronization unit is a COM object that ensures that each frame is presented at the correct time. It uses the IReferenceClock interface provided by the Filter Graph Manager and performs quality-management and frame-reporting functions.
Window Manager: The Window Manager is used only when the VMR is operating in windowed mode. The Window Manager is implemented as a static library, and it supports the old DirectShow IVideoWindow and IBasicVideo interfaces for backward-compatibility.