IFilterMapper::RegisterFilter method (strmif.h)
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
Syntax
HRESULT RegisterFilter(
[in] CLSID clsid,
[in] LPCWSTR Name,
[in] DWORD dwMerit
);
Parameters
[in] clsid
Globally unique identifier (GUID) of the filter.
[in] Name
Descriptive name for the filter.
[in] dwMerit
Position in the order of enumeration. Filters with higher merit are enumerated first.
Return value
Returns an HRESULT value.
Remarks
The merit (as defined by the dwMerit parameter) controls the order in which the filter graph manager tries filters when performing an operation as a result of a call to IGraphBuilder::Connect, IGraphBuilder::Render, or IGraphBuilder::RenderFile. The filter graph manager finds all filters registered with the correct media type and then tries the one with the highest merit, using other criteria in the registration to choose between filters with equal merit.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | strmif.h (include Dshow.h) |