Merit
[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.]
Merit values define the order in which the Filter Graph Manager tries to add filters during graph building.
- **MERIT\_PREFERRED** (0x800000)
**MERIT\_NORMAL** (0x600000)
**MERIT\_UNLIKELY** (0x400000)
**MERIT\_DO\_NOT\_USE** (0x200000)
**MERIT\_SW\_COMPRESSOR** (0x100000)
**MERIT\_HW\_COMPRESSOR** (0x100050)
Each filter is registered with a merit value. When the filter graph manager builds a graph, it enumerates all the filters registered with the correct media type. Then it tries them in order of merit, from highest to lowest. (It uses additional criteria to choose between filters with equal merit.) It never tries filters with a merit value less than or equal to MERIT_DO_NOT_USE.
A filter that should never be considered for ordinary playback should have a merit of MERIT_DO_NOT_USE or less. Filters can be registered with intermediate values not defined by this enumeration, such as MERIT_NORMAL + 1.
Requirement | Value |
---|---|
Header |
|