|
| Detecting codecs |
 |
Tue, 27 Nov 2007 13:38:18 +000 |
Hi
I need to determine at runtime if a codec for MPEG2 video is installed.
Can anyone tell me where this is stored in the registry or point me in
the direction of some information about this?
Thanks in advance
|
| Post Reply
|
| Re: Detecting codecs |
 |
Wed, 28 Nov 2007 10:03:04 +110 |
With DSPack: http://progdigy.com/modules.php?name=DSPack
Code:
function FindFilter(const CategoryName, FilterName: String): Boolean;
var
SysDevEnum: TSysDevEnum;
i, j: Integer;
begin
Result := False;
SysDevEnum := TSysDevEnum.Create;
try
for i := 0 to SysDevEnum.CountCategories - 1 do
begin
SysDevEnum.SelectIndexCategory(i);
if SysDevEnum.Categories[i].FriendlyName = CategoryName then
begin
if SysDevEnum.CountFilters > 0 then
begin
for j := 0 to SysDevEnum.CountFilters - 1 do
if SysDevEnum.Filters[j].FriendlyName = FilterName then
begin
Result := True;
Exit;
end;
end;
end;
end;
finally
SysDevEnum.Free;
end;
end;
Usage:
if FindFilter('DirectShow Filters', 'Elecard MPEG-2 Video Decoder') then
Although this is a DirectShow solution, AFAIK Vfw codecs are listed in
the 'Video Compressors' Category.
Pete wrote:
> Hi
>
> I need to determine at runtime if a codec for MPEG2 video is installed.
> Can anyone tell me where this is stored in the registry or point me in
> the direction of some information about this?
>
> Thanks in advance
>
|
| Post Reply
|
| Re: Detecting codecs |
 |
Wed, 28 Nov 2007 10:36:22 +000 |
Many thanks for that
|
| Post Reply
|
| Re: Detecting codecs |
 |
Wed, 28 Nov 2007 11:55:29 +000 |
Had a look at DSPack, but I couldn't get any of the available versions
or patches to install into D2007 on vista.
harrie wrote:
> With DSPack: http://progdigy.com/modules.php?name=DSPack
|
| Post Reply
|
| Re: Detecting codecs |
 |
Thu, 29 Nov 2007 07:51:45 -080 |
Hi Pete,
This is the code from my CodeRage speech. I also have included a DSPack
version I have hacked to compile in D2007, so I can make the presentation :
http://www.mitov.com/CodeRage2Code.zip
Cheers,
Boian
Pete wrote:
> I found this. I managed to get the packages to compile, but the bpl
> wouldn't install into D2007.
> My problem is I want to find if ANY mpeg2 codec exists not just a
|
| Post Reply
|
|
|
|
|
|
|
|
|
|