Partager via


CBaseMediaFilter Class (Windows Embedded CE 6.0)

1/6/2010

Ee493531.5a3220f6-1052-4646-a8b1-efb2382bb725(en-US,WinEmbedded.60).gif

This is an abstract base class that provides support for the IMediaFilter interface.

The CBaseMediaFilter class handles State_Stopped, State_Paused, and State_Running state transitions.

Typically, this class is used for plug-in distributors rather than filters with pins. Derive your filter classes from the CBaseFilter class (or base classes derived from this) instead of from this class.

All member functions in this class that return HRESULT and accept a pointer as a parameter return E_POINTER when passed a null pointer.

Protected Data Members

Member Description

m_clsid

Class identifier (CLSID) used for serialization using IPersist.

m_pClock

Pointer to a reference clock used for synchronization.

The reference count of the clock object must be incremented using AddRef.

Pass NULL if no reference clock is available.

m_State

Current state of the filter, which can be State_Stopped, State_Paused, or State_Running.

m_tStart

Offset from the stream time to the reference time.

Member Functions

Member function Description

CBaseMediaFilter

Constructs a CBaseMediaFilter object.

IsActive

Determines if the filter is active (running or paused) or stopped.

Overrideable Member Functions

Member function Description

StreamTime

Returns the current stream time.

Implemented IPersist Methods

Method Description

GetClassID

Returns the class identifier of this filter.

Implemented IMediaFilter Methods

Method Description

GetState

Retrieves the current state of the filter.

GetSyncSource

Retrieves the current reference clock in use by this filter.

Pause

Instructs the filter to transition to the new (paused) state.

Run

Instructs the filter to transition to the new (running) state.

SetSyncSource

Informs the filter of the reference clock it should synchronize activity with.

Stop

Instructs the filter to transition to the new (stopped) state.

Implemented INonDelegatingUnknown Methods

Method Description

NonDelegatingQueryInterface

Passes out references to interfaces supported by CBaseFilter.

To pass out pointers to interfaces supported in a derived filter class, override this.

Requirements

Windows Embedded CE Windows CE 2.12 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

See Also

Reference

DirectShow Classes