CBaseFilter::JoinFilterGraph
Microsoft DirectShow 9.0 |
CBaseFilter::JoinFilterGraph
The JoinFilterGraph method notifies the filter that it has joined or left a filter graph. This method implements the IBaseFilter::JoinFilterGraph method.
Syntax
HRESULT JoinFilterGraph( IFilterGraph *pGraph, LPCWSTR pName );
Parameters
pGraph
Pointer to the filter graph manager's IFilterGraph interface, or NULL if the filter is leaving the graph.
pName
[in, string] Pointer to a Unicode string containing a name for the filter.
Return Value
Returns S_OK.
Remarks
This method sets the CBaseFilter::m_pGraph member variable equal to the pGraph parameter. It also queries for an IMediaEventSink interface pointer and stores it in the CBaseFilter::m_pSink member variable. However, the filter does not keep a reference count on either of these interfaces. Doing so would create a circular reference count, because the filter graph manager keeps a reference count on the filter.
The method copies the string specified by pName into the CBaseFilter::m_pName member variable.
Requirements
** Header:** Declared in Amfilter.h; include Streams.h.
** Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).
See Also