List of installed audio codecs

Hi,

I am deploying an application that includes video content which is compressed using Windows Video and Audio Codecs. I want to include the codec installation packages with the software.

During installation, I want to check whether the necessary codecs are installed on the host machine, and if not, run the codec installation.

I have managed to do this for the video codecs using some code I got here at experts-exchange using VFW (Video for Windows). It builds a list of installed video codecs and I just step through them and check whether the particular codec is installed or not.

Now I need to do the same for audio, but I can't find anything that will do the same as above...
LVL 1
LiveBootlegAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Newt6398Commented:
Check the systems registry (Regedit). I presume you only have X number of codecs and they must
be registered so check if there key exists or not.

Not sure about this but another maybe to check the file NSPlayer.inf.

I know the system information utility displays codec drivers this has to be stored somewhere.
0
calinutzCommented:
You will have to get a component from torry:
http://www.torry.net/vcl/mmedia/video/vfw.zip

// And the code for your list is....

procedure TForm1.Button1Click(Sender: TObject);
var
 Count: Integer;
 Info: TICInfo;
 ic: HIC;
begin
ListBox1.Items.Clear;
Count:=0;
repeat
if not ICInfo(0,Count,@Info) then
Break;
ic:=ICOpen(Info.fccType,Info.fccHandler,ICMODE_QUERY);
ICGetInfo(ic,@Info,SizeOf(TICInfo));
ICClose(ic);
ListBox1.Items.Add(Info.szDescription);
Inc(Count);
until
 false;
end;





And your answer Your answer is right here:
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20303992.html?query=list+video+codecs&topics=85
0
LiveBootlegAuthor Commented:
Yes indeed. This does list the installed VIDEO codecs. What I need is something that lists the installed AUDIO codecs for me.

Currently I am looking at an example I got from http://www.undu.com/Articles/010323c.html. This uses Windows ACM, but unfortunately the example does not compile, becuae I have a different version of MSAcm.pas.
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

sdmasonCommented:
I was able to get a list of audio codecs using the undu article you mentioned.  

I got ACM.zip from Delphi-Jedi (http://www.delphi-jedi.org/APILIBRARY:882067)

function ACMCodecEnum(hACMDrvId : HACMDRIVERID; dwInstance : DWord; fdwSupport :DWord): bool; stdcall;
var
  ACMDriver : TACMDriverDetails;
begin
  ACMDriver.cbStruct := SizeOf(ACMDriver);
  if acmDriverDetails(hACMDrvId, ACMDriver, 0) = 0 then
    frmMain.memCodecs.Lines.Add(ACMDriver.szLongName);  // You can do what ever you want here
  Result := True;
end;

procedure TfrmMain.btnLoadCodecsClick(Sender: TObject);
begin
  memCodecs.Lines.Clear;
  acmDriverEnum(ACMCodecEnum, integer(Self), ACM_DRIVERENUMF_DISABLED);
end;

I had a problem with the application stopping while running it in the IDE.  I fixed this by adding NTDLLDebugNoOp.pas (http://216.101.185.148/scripts/isapi.dll/article?id=05872F5A&article=4393663) to the project.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LiveBootlegAuthor Commented:
Thanx sdmason.

I had no problem stopping the app while running from the IDE. Couldn't get the file NTDLLDebugNoOp.pas  from the site as well.
0
sdmasonCommented:
Sorry about the bum link.  If you go to http://www.fulltextsearch.com and search for PatchINT3 in the borland groups you should be able to find it.  I think the problem depends on the codecs you have loaded . . .
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.