Microsoft Windows CE 3.0  

CSource Class

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.

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

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

AddPin Adds a pin to the source filter.
CSource Constructs a CSourceobject.
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

FindPin Retrieves a pointer to the pin with the specified identifier.