Microsoft DirectX 8.1 (C++) |
This topic applies to Windows XP Home Edition and Windows XP Professional only.
To configure the VMR for windowed mode with multiple streams, the application first creates an instance of the VMR, and then calls IVMRFilterConfig::SetNumberOfStreams to inform the VMR that it will be processing multiple input streams. This causes the VMR to load the mixer and compositor and to create the specified number of input pins. The application then calls IVMRFilterConfig::SetRenderingPrefs to specify various rendering preferences.
After the pins are connected, the application uses the IVMRMixerControl methods on each pin to control parameters on the mixer such as the alpha value to be applied to the entire image, the Z-ordering, and the output rectangle for the stream. Pins cannot be removed once they have been created, but they can be inactivated through a call to IVMRVideoStreamControl::SetStreamActiveState so that their output is not processed for rendering. This should only be done by upstream filters, never by applications.
The application then uses the IBasicVideo and IVideoWindow interfaces, obtained through the Filter Graph Manager, to configure the window in which the blended output will be rendered. The filter graph can now be run.