Microsoft Windows CE 3.0  

IFilterMapper::RegisterFilter

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.

Adds a filter to the registry; the filter can then be enumerated.

HRESULT RegisterFilter(
CLSID
clsid, 
LPCWSTR
Name, 
DWORD
dwMerit
);

Parameters

clsid
[in] Globally unique identifier (GUID) of the filter.
Name
[in] Descriptive name for the filter.
dwMerit
[in] Position in the order of enumeration. Filters with higher merit are enumerated first.

Return Values

Returns an HRESULTvalue.

Remarks

The merit (as defined by the dwMeritparameter) 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.

The following predefined values exist for the dwMeritparameter. Other values, such as MERIT_NORMAL-1, can be used. Using the formula (MERIT_NORMAL+MERIT_UNLIKELY)/2 to calculate the merit value is advisable, because it leaves some low-order bits available for making even finer distinctions.

0x900000 Hardware renderer filter. Filters with this merit value are tried first.
MERIT_PREFERRED (0x800000) Filter, such as a renderer, that is likely to complete the operation directly.
0x680000 MPEG decompression filter. These are tried before AVI decompressors because the latter require more time to determine if they work in the filter graph.
MERIT_NORMAL (0x600000) Filter that may contribute to the completion of a connection. AVI decompression filters and splitter transform filters are registered to this value.
MERIT_UNLIKELY (0x400000) Filter that may contribute to the completion of a connection (a color space conversion filter, for example). The filter graph manager uses this filter only if other options have failed. Register source filters with this value.
MERIT_DO_NOT_USE (0x200000) Filter that will never contribute to the completion of a connection. Filters registered with this value (or less) will never be tried by the filter graph manager when automatically building a filter graph. Use this to register filters that must be added explicitly, either as part of a predefined filter graph or by adding them using IFilterGraph::AddFilter. Examples include tee filters or effects filters.
MERIT_HW_COMPRESSOR (0x100050) Hardware compressor filter. Filters registered with this value will never be tried by the filter graph manager when automatically building a filter graph.
MERIT_SW_COMPRESSOR (0x100000) Software compressor filter. Filters registered with this value will never be tried by the filter graph manager when automatically building a filter graph.