Solved

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

Posted on 2006-06-12
8
1,081 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
Industry Leaders: 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 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

Suggested Solutions

Title # Comments Views Activity
Dialogbox API leak? 18 114
VS2015 Redefinition errors 4 100
C++ Code Issue 4 45
Bitwise and to sum elements 2 48
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

740 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