Infinite Pin Tee


The Infinite Pin Tee filter has multiple output pins and passes through type enumerators from source filters. The filter uses the CAutoLock, CBaseFilter, CBaseInputPin, CBaseOutputPin, CCritSec, and COutputQueue base classes.

The Infinite Pin Tee filter has one input pin and a variable number of output pins, typically two. It accepts data samples through the IMemInputPin transport which it implements. All data samples sent to the filter are delivered down all paths simultaneously, therefore teeing the input into multiple separate output streams. The data samples are not type-specific, so the input, for example, can be text lyrics, video images, or audio buffers.

When considering two output pins, the tee filter sends the same data down both of the pins; therefore the pins must have negotiated the same media type during connection. The Infinite Pin Tee filter handles this negotiation so that the input pin and both output pins converge when using the same media type. If a suitable media type cannot be found, then the connection is rejected.

The filter always uses the suggested allocator. The filter that provides the data suggests the allocator. The data arriving at the input pin is not copied before it is sent to the output pins. The filter also ensures that the data is delivered to the downstream filters to guarantee that both outputs receive timely service. In particular, if one of the outputs can block in the COutputQueue::Receive member function, then the tee spins off a thread to deliver the sample. If there were no thread to deliver the sample, then the thread that delivers the sample to the tee input pin might pass the data to a downstream filter at which point it might block, keeping data from the other downstream filter for long periods of time.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.