Solved

How to Check DIVX MPEG-4 codec has installed on system or not?

Posted on 2006-06-12
8
1,080 Views
Last Modified: 2010-05-18
I have question, and hope you can help me.
That is, I write a program for install DIVX MPEG-4 codec for audio and video.
After running my program , i check the video(audio) codec by opening Device Manage and click right mouse in Video Codec and choose Property tab, then i see the line DIVX MPEG-4 video codec.

And now , i will run my program on another PC.
So , i want to my program can check this codec has existed on system or not?
If it has, i will not run Shellexecute and will run if it has not? Can you direct me how to check this codec ?

0
Comment
Question by:CongUan
  • 3
  • 2
8 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 16885785
Do you have the codec's GUID? If so, you can just check whether this entry is present in HKEY_CLASSES_ROOT\CLSID.
0
 
LVL 8

Expert Comment

by:mrblue
ID: 16887430
You can use DirectShow to enumerate codecs.
Create System Device Enumerator and then class enumerator for appropriate class:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directshow/htm/usingthesystemdeviceenumerator.asp

for video codecs use:
CLSID_VideoCompressorCategory

for audio codecs use:
CLSID_AudioCompressorCategory
0
 

Author Comment

by:CongUan
ID: 16892103
Thanks to mrblue.

And can you also help me for another asking??? I hope you can.

Now, my app can use DivX codec for encoding video.
But I also need to add some others codec for video : H.263 and MPEG4 and also AVI(uncompressed ???)
Can you help me how to get .ax or dll files for these adding codecs. And it will be good luck to me if you also show me  .inf file to install these adding codecs.  

 
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 8

Accepted Solution

by:
mrblue earned 250 total points
ID: 16892419
"also AVI(uncompressed ???)"

AVI is not data format - it's a container format (another container format is OGG for example). "uncompressed" means that there isn't used any codec for it.

This is from MSDN:

"Codecs may be implemented in one of three different ways:

As a Video for Windows-type audio or video installable codec that is loaded by the Video Compression Manager (VCM) or Audio Compression Manager (ACM). In general, this technology is considered deprecated and its use is not recommended. Installable codecs participate in DirectShow filter graphs through the AVI Decompressor wrapper filter.

As a DirectShow filter. Many third party codecs are implemented as native DirectShow filters. One such filter is the Frauenhofer MP3 decompressor filter. In general, these filters may be added to the filter graph in the usual ways. One exception to this rule is that some Windows Media™ Audio or Windows Media Video codecs, and the Microsoft MPEG-4 codec, cannot be added to a filter graph manually. These filters can only be added by the ASF Reader and ASF Writer filters.

As DirectX Media Objects (DMOs). DMOs are the recommended way to implement codecs because they can be used either within a DirectShow filter graph using the DMO Wrapper filter, or else independently in any other non-DirectShow-based streaming application. Some Windows Media Audio and Windows Media Video codecs are implemented as DMOs. As with the Windows Media filters, these DMOs cannot be used outside the context of the Windows Media SDK. That means that in DirectShow, they can only be added to a graph through the ASF Reader or ASF Writer filters."

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directshow/htm/workingwithcodecs.asp

So installation will depend on type of codec. I guess it will be:

1. For VFW codec you will probabely need to add entry to the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\windows NT\CurrentVersion\Drivers32

and copy codec file to for example system32 directory

I hope this is all what's necessary.

2. For DirectShow user mode filter you will need to copy .ax file (COM .dll in fact) to system32 folder. You will also need to register it (usually installation program will do it if appropriate option is selected).

For kernel mode filter you will need .inf file with some registry entries however I hope this is not your case.

And this is more or less all what I know. Good luck.
0
 

Author Comment

by:CongUan
ID: 16892658
Thanks mrblue very much.
i think i will do as 1.
But i donot know how to start to add entry to registry key by programmatically?
Can you help me this problem? Can you direct me a sample source code how to do this???
Hope you can reply soon.
Thank you again
0
 
LVL 8

Expert Comment

by:mrblue
ID: 16892862
In API you could use RegOpenKey(), RegQueryValue(), RegSetValue(), RegCloseKey() but installator (like Visual Studio Installer) has its own, higher level mechanizm - for example section with registry keys to add, remove, modify (search you installator doc for "registry").
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question