?
Solved

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

Posted on 2006-06-12
8
Medium Priority
?
1,083 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Accepted Solution

by:
mrblue earned 1000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

752 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