Understanding DirectShow Merits
Every DirectShow Filter on your system has a merit associated with it. These merit’s determine which filter will be used in order to build the filter graph, which then enables video/audio to be decoded and rendered. Below are merit values in DirectShow…
MERIT_PREFERRED = 0x800000
MERIT_NORMAL = 0x600000
MERIT_UNLIKELY = 0x400000
MERIT_DO_NOT_USE = 0x200000
MERIT_SW_COMPRESSOR = 0x100000
MERIT_HW_COMPRESSOR = 0x100050
Just a quick example here, I have mpgdec.ax and nvviddec.ax both registered on my system. These are both MPEG-2 decoders, mpgdec.ax is Moonlight/Elecard’s and nvviddec.ax is NVIDIAs. I would prefer NVIDIAs to be used over Elecard’s at all times, in fact I want to force that to happen.
Thus, setting the merit as 0x800000 for nvviddec.ax would tell any application that uses DirectShow to use NVIDIAs decoder over Elecard’s. Some applications might manually override this, most don’t. In addition, I could set the merit for Elecard’s decoder to 0x200000 and it would never be constructed into a graph.
However, be aware that if you set a merit at the lowest and for whatever reason the filter you wanted to be used is not available (Reasons: Unregistered, deleted, etc) most applications will let you know, generally in a non-user friendly way, that DirectShow can not build that graph at all, leaving you trying to play a file that can not be decoded/rendered.
Some companies now ship configuration programs to set the merit through their own software applications, others don’t. There are many applications to you can use the set the merits of filters, for example RadLight Filter Manager.
Merit's can be used Unregistering filters in order to troubleshoot playback also, but you need to know what you are doing in order to correctly change merit values.
Warning: Changing or messing with filters and/or merit’s can leave you at a point where you are basically screwed for getting correct media playback. The information presented above should only be used if (1) You know what you are doing (2) Have backed up your system before hand. This is very basic information, if you would like to know more about DirectShow please visit MSDN.