SetNumberOfStreams method sets the number of streams to be mixed and instructs the VMR to go into mixer mode.
HRESULT SetNumberOfStreams( DWORD dwMaxStreams );
Double word containing the maximum number of input streams that the VMR will be required to mix.
The method returns an HRESULT. Possible values include those in the following table.
||The method succeeded.|
||The mixer is already configured.|
||An attempt was made to configure the mixer for more than 16 input streams.|
||Memory to manage the streams could not be allocated.|
dwMaxStreams should be equal to the number of input pins required. Pins cannot be added or removed after the VMR has been connected. If you do not know in advance how many input streams will be required, set dxMaxStreams to the maximum number that might be required. A value of 1 is valid for dwMaxStreams. This value does not cause any extra pins to be created, but it does force the VMR to go into "mixer mode."
The VMR creates as many input pins as are specified without attempting to determine whether there is enough video memory to support them all. This is because it has no way of knowing the media type or rectangle dimensions at this time. Later, when an upstream filter attempts to connect to a pin, at that point the media type is known and the VMR will examine the video memory and fail the connection if there is not enough memory to process the stream.
|Minimum supported client||Windows XP with SP2 [desktop apps only]|
|Minimum supported server||Windows Server 2003 R2 [desktop apps only]|