Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Entertainment » microsoft.public.windowsmedia.sdk
Thread: WMP Installed Codecs

HTVi
TV Discussion Newsgroups

WMP Installed Codecs
nick[ at ]eyecon 10/27/2008 8:35:01 PM
Hi,

I want to write an application that will go through the installed codecs for
WMP on a system and write out the mime types supported for that system. How
do you start? It seems there's a lot about how to start writing a codec, but
I haven't found much about managing them.

Nick
Re: WMP Installed Codecs
"Alessandro Angeli" <nobody[ at ]nowhere.in.the.net> 10/27/2008 8:54:53 PM
From: "nick[ at ]eyecon"

[Quoted Text]
> I want to write an application that will go through the
> installed codecs for WMP on a system and write out the
> mime types supported for that system. How do you start?
> It seems there's a lot about how to start writing a
> codec, but I haven't found much about managing them.

It's not the easy. WMP can use several kind of codecs:

- DMOs
- DSP plug-ins (a WMP-specific type of DMOs)
- WindowsMedia DMOs (they are special)
- ACM drivers
- VCM drivers
- hardware-accelerated decoders
- DirectShow filters
- MFTs (Vista-only)

Each is enumerated in a different way and some will end up
in more than one category will others will not be easy to
identify. Some will provide a static list of supported
inpit/output formats but for most you will need to try and
actually use them to query for the supported media types,
which may even vary depending on the usage.

If you are looking for supported file types instead of
supported decoders (codec refers to
compressors/decompressors but MIME type only makes sense for
file types), things are just as confused:

- DirectShow filters (readers, push sources or parsers,
which are not easy to identify)
- MF sources (Vista-only)
- RIFF handlers
- WMF

To actually be able to play a files you need a file type
parser *and* decoders for the audio/video streams.

Last, most of those component do not rely on a MIME type,
since a MIME type is often too vague, so associating MIME
types to the supported media types is a challenge in itself.

--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


Re: WMP Installed Codecs
"Neil Smith [MVP Digital Media]" <neil[ at ]nospam.com> 10/27/2008 10:36:56 PM
On Mon, 27 Oct 2008 13:35:01 -0700, nick[ at ]eyecon
<nick[ at ]eyecon[ at ]discussions.microsoft.com> wrote:

[Quoted Text]
>Hi,
>
>I want to write an application that will go through the installed codecs for
>WMP on a system and write out the mime types supported for that system. How
>do you start? It seems there's a lot about how to start writing a codec, but
>I haven't found much about managing them.

You could mail Marc Liron about the Sherlock utility :
http://www.updatexp.com/sherlock-codec-detective.html

He could possibly be persuaded to let you into the source code tree or
at least share some programming tips.

GSpot is another poplular, and apparently closed source project :
http://www.headbands.com/gspot/

HTH
Cheers - Neil
------------------------------------------------
Digital Media MVP : 2004-2008
http://mvp.support.microsoft.com/mvpfaqs
Re: WMP Installed Codecs
nick[ at ]eyecon 10/28/2008 1:40:03 AM
Ok, looks like it gets a little involved. I guess I could get away with file
types, since I have no intention of opening up and inspecting media files. So
which APIs would I need to use to list the various filters, sources,
handlers, etc? I'm already familiar with WMP 11 via C++/com but wasn't able
to find out how to access this information from there.

Nick
Re: WMP Installed Codecs
"Alessandro Angeli" <nobody[ at ]nowhere.in.the.net> 10/28/2008 10:31:14 PM
From: "nick[ at ]eyecon"

[Quoted Text]
> Ok, looks like it gets a little involved. I guess I could
> get away with file types, since I have no intention of
> opening up and inspecting media files. So which APIs
> would I need to use to list the various filters, sources,
> handlers, etc? I'm already familiar with WMP 11 via
> C++/com but wasn't able to find out how to access this
> information from there.

WMP has no API to do that. WMP has its own file extension
registry
(http://msdn.microsoft.com/en-us/library/bb262305(VS.85).aspx)
so you can use the registry API to enumerate the registered
extensions in both HKLM and HKCU. For each extension you
will find a subset of the following values:

MCIHandler = MCI driver name
Extension.Handler = [HKCR\<handler>]
Extension.MIME
PerceivedType = "audio"|"video"|"image"
MediaType.Description
MediaType.Icon
Runtime
Permissions = the file is playable only if((Permissions & 1)
!= 0)

WMP will also support whatever DirectShow supports
(http://msdn.microsoft.com/en-us/library/ms787558(VS.85).aspx)
and things get more complicated.

First, look up the extension and that will tell you the
"Source Filter" and (optionally) the "Media Type" and
"SubType", which are 2 GUIDs. The registered media types can
be found in [HKCR\Media Type\<majortype>\<subtype>] and they
will also give a "Source Filter". If you find the media type
under the extension, you should look it up and you should
also look it up if the source filter is
{E436EBB5-524F-11CE-9F53-0020AF0BA770} (case insensitive).
Since file types can also be registered only according to
their media type, you should also list the subtypes under
[HKCR\Media Type\{e436eb83-524f-11ce-9f53-0020af0ba770}].
The source filter can be looked up under [HKCR\CLSID\<source
filter>] and
[HKCR\CLSID\{083863F1-70DE-11d0-BD40-00A0C911CE86}\Instance],
where you can get a friendly name for it (in both places).

If the major type is {e436eb83-524f-11ce-9f53-0020af0ba770}
(MEDIATYPE_Stream), the subtype will tell you the file
format (you will have to match known GUIDs from
http://msdn.microsoft.com/en-us/library/ms787726(VS.85).aspx
to MIME types). Otherwise, if your source filter is not
{E436EBB5-524F-11CE-9F53-0020AF0BA770} (CLSID_AsyncReader),
you will need to match known filter CLSIDs to supported MIME
types.

--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen