CBaseFilter::CBaseFilter

 
Microsoft DirectShow 9.0

CBaseFilter::CBaseFilter

Constructor method.

Syntax

  CBaseFilter(
    const TCHAR *pName,
    LPUNKNOWN pUnk,
    CCritSec *pLock,
    REFCLSID clsid
);

CBaseFilter(
    const TCHAR *pName,
    LPUNKNOWN pUnk,
    CCritSec *pLock,
REFCLSID clsid,
HRESULT *phr
);

Parameters

pName

Pointer to a string containing the name of the filter, for debugging purposes.

pUnk

Pointer to the owner of this object. If the object is aggregated, pass a pointer to the aggregating object's IUnknown interface. Otherwise, set this parameter to NULL.

pLock

Pointer to a CCritSec lock, used to serialize state changes.

clsid

Class identifier (CLSID) of the filter.

phr

Pointer to an HRESULT value. The constructor ignores this parameter.

Remarks

For the critical section object, you would typically do one of the following:

  • Derive a class that inherits both CBaseFilter and CCritSec. For pLock, pass the this pointer.
  • Derive a class that inherits CBaseFilter and contains a CCritSec member variable. For pLock, pass the address of that variable.

Requirements

**  Header:** Declared in Amfilter.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also