[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

List of installed audio codecs

Posted on 2004-11-15
6
Medium Priority
?
1,229 Views
Last Modified: 2008-01-09
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...
0
Comment
Question by:LiveBootleg
6 Comments
 
LVL 1

Expert Comment

by:Newt6398
ID: 12589112
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
 
LVL 11

Expert Comment

by:calinutz
ID: 12593025
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
 
LVL 1

Author Comment

by:LiveBootleg
ID: 12593816
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 2

Accepted Solution

by:
sdmason earned 1000 total points
ID: 12596019
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
 
LVL 1

Author Comment

by:LiveBootleg
ID: 12602829
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
 
LVL 2

Expert Comment

by:sdmason
ID: 12605936
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Integration Management Part 2
Suggested Courses
Course of the Month18 days, 10 hours left to enroll

834 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