IAMBufferNegotiation interface (strmif.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The IAMBufferNegotiation interface requests the number of buffers for a filter to create and size of each buffer. This interface can be exposed by any pin that connects using the IMemInputPin pin interface, but is typically exposed on the output pins of capture filters.

When two pins connect through IMemInputPin, they agree on an allocator object that is responsible for creating buffers. Normally this process is transparent to the application, but in some situations the application needs more control. If a pin exposes IAMBufferNegotiation, the application can suggest how many buffers to create, the size of the buffers, and other properties. If your application performs preview of captured audio, you can specify a smaller buffer size to reduce latency. Teleconferencing applications should specify a minimal number of buffers.

To use this interface, call the SuggestAllocatorProperties method before the pins connect. After the pins connect, call the GetAllocatorProperties method to determine whether the pin honored the request.

Filter developers: Capture filters should always support this interface when possible.

Inheritance

The IAMBufferNegotiation interface inherits from the IUnknown interface. IAMBufferNegotiation also has these types of members:

Methods

The IAMBufferNegotiation interface has these methods.

 
IAMBufferNegotiation::GetAllocatorProperties

The GetAllocatorProperties method retrieves the allocator properties that the pin is using.
IAMBufferNegotiation::SuggestAllocatorProperties

The SuggestAllocatorProperties method informs the pin of the application's preferred allocator properties. Call this method before the pin connects.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)

See also

Interfaces