次の方法で共有


Allocator Negotiation (Windows Embedded CE 6.0)

1/6/2010

(For information about the connection process, including media type and allocator negotiation, see Overview of the Filter Connection Process Process.)

When you are determining your transform filter characteristics, it might help for you to understand the model of allocator negotiation for transform filters.

If your transform filter requires copying, it will copy media samples from a buffer established by its input pin to a buffer established by its output pin. These buffers are provided by allocators that might be located in other filters, perhaps even several filters removed if the filters in between do not copy the data.

A copying transform filter typically tries to use the allocator of the upstream filter for its input pin, and the allocator of the downstream filter for its output pin.

During the connection process, the output pin of the upstream filter determines which allocator to use for the upstream transport, so the input pin of the copy transform must be prepared to create an allocator for the upstream transport if its IMemInputPin::GetAllocator method is called by the connecting output pin.

The base classes provide a way to create a new allocator from the input pin of any connection.

On the other hand, transform-inplace filters do not make copies, but modify the data in an existing buffer. These filters should always offer the allocator from the downstream filter to the upstream filter.

This requires a reconnection, because the filter does not know about the downstream filter when its input pin is first connected.

Also, because in-place transforms do not change the media type, the media type from the downstream filter should be offered to the upstream filter upon reconnection.

See Also

Concepts

Connecting Transform Filters