다음을 통해 공유


Allocators (Windows Embedded CE 6.0)

1/6/2010

When two filters connect, their pins must agree on the details of how the media sample objects will be transported from the upstream filter to the downstream filter. To "connect" means to determine the size, location and number of samples that will be used. The size of the samples will depend on the media type and format, and the buffer location may be either in main memory or else on a hardware device such as a video capture card. An allocator, a COM object that is itself usually created by the input pin on the downstream filter, handles the creation and management of the samples.

In certain video capture scenarios, an application may need to specify the size of buffers that should be allocated, and interfaces are provided for this purpose. For the vast majority of cases, the details of buffer allocation will be completely transparent to applications. It should be noted, however, that the "movement" of data in a filter graph does not always involve a copy operation. In the connection process, pins will "reuse" upstream buffers whenever possible in order to maximize throughput.

See Writing DirectShow Filters for details of allocator creation and the negotiations that input and output pins perform when connecting.

See Also

Concepts

Elements of the Filter Graph