Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This class and its corresponding class, CSourceStream, simplify the construction of source filters that produce continuous streams of data comparable to the way the CTransformFilterclass assists in the creation of transform filters.

The CSourceclass provides a wrapper for the CBaseFilterclass that performs the pin management and works with the CSourceStreamclass to provide the pins.

To use the CSourceclass to build a filter:

Derive your filter-level class from the CSourceclass. Provide a CreateInstancemember function in it to create a new object of the class.

Provide a means of adding objects that are derived from the CSourceStreamclass to support the output pins during construction of the class. You can either create them yourself during construction or provide the developer with a means of creating them later.

For an example of using the CSourceclass, see the Ball sample in the Samples\Multimedia\DShow\Src\Ball subdirectory of the DirectX Media Software Development Kit (SDK).

This class does not help build an asynchronous file reader source filter, which requires support of an IAsyncReaderinterface and a downstream parser filter that supports the CPullPinclass.

Protected Data Members

Member Description

m_cStateLock

Locks this data member to serialize access to the filter state.

m_iPins

Number of pins on this filter; updated by the CSource::AddPinand CSource::RemovePinmember functions.

m_paStreams

Array of streams associated with this filter.

Member Functions

Member function Description

AddPin

Adds a pin to the source filter.

CSource

Constructs a CSource object.

FindPinNumber

Retrieves the number of the pin through the IPinparameter.

GetPin

Returns a pointer to a specified pin.

GetPinCount

Gets the number of pins contained by the filter.

pStateLock

Returns a pointer to the filter-critical section.

RemovePin

Removes a pin from the source filter.

Implemented IBaseFilter Methods

Method Description

FindPin

Retrieves a pointer to the pin with the specified identifier.

Requirements

Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment