IWMCodecLeakyBucket::SetBufferSizeBits method (wmcodecdsp.h)

Sets the buffer size in bits.

Syntax

HRESULT SetBufferSizeBits(
  [in] ULONG ulBufferSize
);

Parameters

[in] ulBufferSize

The buffer size, in bits.

Return value

This method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.

Remarks

This method is not implemented on the audio encoder objects. If you call this method from the IWMCodecLeakyBucket interface it returns E_NOTIMPL.

The buffer size is equal to the bit rate of the stream multiplied by the buffer window. For example, a stream with a bit rate of 28 kilobits per second with a buffer window of 3 seconds would have a buffer of 28000 bits per second x 3 seconds = 84000 bits.

This method is an alternative to setting the MFPKEY_VIDEOWINDOW property. Using this method does not alter the bit rate of the stream, but does alter the buffer window. Using the stream with a bit rate of 28000 bits per second from the previous example, setting the buffer size to 84000 using this method would have exactly the same effect as setting MFPKEY_VIDEOWINDOW to 3000 milliseconds (3 seconds).

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header wmcodecdsp.h

See also

IWMCodecLeakyBucket Interface

IWMCodecLeakyBucket::GetBufferSizeBits