Использование фильтров DirectShow в Windows 7 вместо Windows Media Foundation

3516
Ash M

Я начал использовать версию Windows 7 для RC1 и заметил, что для воспроизведения видео Windows 7 не использует ffdshow после установки. Я сузил проблему до того факта, что Windows 7 предпочитает использовать новый Windows Media Foundation, а не фильтры DirectShow, если таковые имеются.

Проблема в том, что у меня заикается декодер H.264 Windows Media Foundation, и я бы предпочел использовать декодер из ffdshow.

Кто-нибудь знает, как «заставить» Windows 7 использовать фильтр DirectShow вместо фильтра Windows Media Foundation?

Спасибо

0
Какое приложение вы используете для воспроизведения мультимедиа? Windows Media Player? heavyd 14 лет назад 0

2 ответа на вопрос

2
heavyd

Вот статья, показывающая, как делать то, что вы хотите сделать.

Другой вариант, который вы можете попробовать - это использовать медиаплеер, основанный исключительно на DirectShow, например, Media Player Classic . Я не уверен на 100%, что он не будет использовать встроенные кодеки, но его стоит попробовать, прежде чем испортить вашу систему.

1
Roman R.

DirectShow and Media Foundation are APIs and applications are built against one of the APIs, against both APIs with hardcoded priority or API at user choice/configuration. It is only last case where you might have options to switch between APIs. That is, your way out is to choose the application which you can set up to use specific codec of interest.

The change on Windows 7 you are referring to is a system priority to stock H.264 decoder. While in most cases codecs are fighting one with another for being picked up by registering themselves with higher merits, Windows 7 put a stop to this fight by putting stock decoder unconditionally on top of that.

To add to this, if you are playing with Windows Media Player, it attempt to play with Media Foundation and if only this attempt fails, then there is a second try with DirectShow. So you have to ruin Media Foundation API/components to be unusable to make WMP go to DirectShow for H.264. I certanly don't recommend this, and another more suitable player is the proper alternate option.