سؤال

I am trying to get a deeper understanding around the codec area and how it all works.

The primary drive is the uncertainty of installing codec packs to deal with certain unplayable videos, which ends up not allowing the playback of those files anyway. This is often later complicated by installing other codec packs on top. I have also noticed that sometimes simply reinstalling a codec pack can cause videos, which were playable before to be unplayable after codec pack reinstall.

What I am curious about the most is what is happening in the background when a codec pack is installed (Shark007, CCCP, K-Lite) - how are codecs registered with different players, windows media player in particular? Is there a list of known codecs in WMP internals which gets new codecs added to? How can I find out whether I have a particular codec for a particular encoding type? How does DirectShow and its filters work together with new codecs?

Most of the information that I have found has been quite top level, with most advice being playing around with codec pack settings and/or installing other codec packs.. :(

Any sort of advice or recommendations for further info on this area (books, links, etc) would be GREATLY appreciated! :)

هل كانت مفيدة؟

المحلول

In Windows the most widely used multimedia API is DirectShow, and as you indicated in question tag you perhaps target exactly it. There are other APIs too. Important note is that DirectShow is NOT the primary API for Windows Media Player: WMP would attempt to play a file through Media Foundation, and if failed, the second attempt would be to leverage legacy DirectShow. Still, DirectShow is the most commonly used in applications.

In DirectShow, the multimedia pipeline is built from filters which are connected into a graph through their pins. The connected structure has the data streamed through, e.g. from file to decoded video/audio delivered to the devices. The codecs are components that frequently used within this pipeline.

The registration of codecs is the scope of authority of Filter Mapper subsystem. It takes care of all registrations and provides connectivity options for Intelligent Connect - the subsystem which connects stuff together, including supplies codecs when they are needed and the application requests the codec to be provided automatically.

The best documentation of the internals you will find on MSDN, under DirectShow.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top