DirectShow Animated Header -- Inftee Sample (Infinite-Pin Tee Filter) DirectShow Animated Header -- Inftee Sample (Infinite-Pin Tee Filter)* Microsoft DirectShow SDK
*Index  *Topic Contents
*Previous Topic: Transform Filters
*Next Topic: Renderer Filters

Inftee Sample (Infinite-Pin Tee Filter)


The Inftee sample 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.

Inftee 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 that point, it might block, keeping data from the other downstream filter for long periods of time.

This filter is installed with the DirectShow run time and is available through the Filter Graph Editor when you choose Insert Filters from the Graph menu, and select the DirectShow Filters category.

Sample Locations

MPGAudio Sample (MPEG Audio Decoder Filter)

The sample MPEG audio codec, MPGAudio, provides a prototype for an MPEG audio decoder. It uses the CTransformFilter class.

As supplied, this framework just consumes the passed-in audio frames. That is, audio frames do not produce any output from this framework. You would need to expand the framework with code specific to the outputs desired.

This filter is installed with the DirectShow run time and is available through the Filter Graph Editor when you choose Insert Filters from the Graph menu, and select the DirectShow Filters category.

Sample Locations

MPGVideo Sample (MPEG Video Decoder Filter)

The sample MPEG video codec, MPGVideo, provides a prototype for an MPEG video decoder. It uses the CTransformFilter class. The MPGVideo filter also shows the processing of quality-management messages.

As supplied, this framework just consumes the passed-in video frames. That is, video frames do not produce any output from this framework. You would need to expand the framework with code specific to the outputs desired.

This filter is installed with the DirectShow run time and is available through the Filter Graph Editor when you choose Insert Filters from the Graph menu, and select the DirectShow Filters category.

Sample Locations

Nullip Sample (Null In Place Filter)

The null in-place sample filter, Nullip, is an example of a transform-inplace filter. It illustrates how a transform filter can behave in a relatively transparent manner. Nullip is a simple filter that passes all data from its input pin to its output pin. No transformations are performed on the data.

The Nullip filter provides an example of using the CTransInPlaceInputPin class. It shows how to use the CAutoLock class to automatically release critical sections. Other classes used include CTransInPlaceFilter, CBasePropertyPage, CMediaType, and CTransInPlaceOutputPin. It also enables a user to select the media types that it can pass through itself. This filter has one input pin, one output pin, and performs its transform in place (without copying the data) in the push thread. In other words, the CTransInPlaceFilter::Receive method is called with a buffer, which it transforms and delivers to the next filter downstream. The Receive method is then blocked until that filter returns; it subsequently returns to its own calling member function.

This filter is installed with the DirectShow run time and is available through the Filter Graph Editor when you choose Insert Filters from the Graph menu, and select the DirectShow Filters category.

Sample Locations

Nullnull Sample (Minimal Null Filter)

The minimal null sample filter, Nullnull, illustrates a minimal filter. It does not support the media type selection that Nullip does. The Nullnull filter uses the CTransInPlaceFilter class.

This filter is installed with the DirectShow run time and is available through the Filter Graph Editor when you choose Insert Filters from the Graph menu, and select the DirectShow Filters category.

Sample Locations

Vcrctrl Sample (VCR Control Filter)

The VCR control sample filter, Vcrctrl, is a simple implementation of the external device control interfaces that DirectShow provides. Vcrctrl provides basic transport control and SMPTE timecode-reading capabilities for certain Betacam and SVHS videocassette recorders with RS-422 or RS-232 serial interfaces (see source code for specific machine types supported).

This sample is not intended to be a frame-accurate, system-ready implementation ready for professional applications. It is designed to show basic device control filter structure, and therefore does not implement several of the more sophisticated features of the interfaces, such as edit event control. Frame-accurate control is best achieved by writing a low-level, kernel-mode communications driver underneath the filter. Developers should refer to the Driver Development Kit (DDK) for the appropriate platform.

Using the Sample

With this sample, you can control a VCR through property pages. You should keep in mind the following:

This sample contains the following files:

This filter is installed with the DirectShow run time and is available through the Filter Graph Editor when you choose Insert Filters from the Graph menu, and select the DirectShow Filters category.

Sample Locations

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

*Top of Page