Declaration
function IEWICEnumerateCodecs(ComponentTypes: IE_WICComponentType; Callback: TIEWICEnumerateCodecsCallBack): Integer;
Description
Detects all the available WIC decoders and encoders on the system.
ComponentTypes must be either
IE_WICDecoder or
IE_WICEncoder.
Result will be -1 if an error occured, otherwise the number of codecs found.
// Declare our call-back event
procedure TForm1.EnumerateCodecsCallBack(const FriendlyName: WideString; const GUID: TGuid; const Extensions: WideString; const Version: WideString; const Author: WideString);
begin
memo1.Lines.Add( '[' + FriendlyName + ']' );
memo1.Lines.Add( 'Version: ' + Version );
memo1.Lines.Add( 'Author: ' + Author );
memo1.Lines.Add( 'Extensions: ' + Extensions );
memo1.Lines.Add( 'GUID: ' + GUIDToString( GUID ));
memo1.Lines.Add( '' );
end;
// Output list of WIC Decoders
procedure TForm1.btnListDecoders(Sender: TObject);
begin
memo1.Clear;
IEWicEnumerateCodecs( IE_WICDecoder, EnumerateCodecsCallBack );
end;
// Output list of WIC Encoders
procedure TForm1.btnListEncoders(Sender: TObject);
begin
memo1.Clear;
IEWicEnumerateCodecs( IE_WICEncoder, EnumerateCodecsCallBack );
end;
// Count only...
decoderCount := IEWicEnumerateCodecs( IE_WICDecoder, nil );
See Also
◼IEWICFormatSupported
◼DecoderInfo
◼EncoderInfo