Compartilhar via


Allocators (Windows CE 5.0)

Send Feedback

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.

See Writing DirectShow Filters for details of allocator creation and the negotiations that input and output pins perform when connecting. 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 Also

Elements of the Filter Graph

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.