Does anyone have any sample code to get the all the available
codecs on a system?
Here's a skeleton function that loops through the compressors without
doing anything with them:
void ListCompressors(void){
ComponentDescription lComponentDescription =
{compressorComponentType, 0, 0, 0, 0};
long lComponentCount = CountComponents(&lComponentDescription);
Component lID = 0;
Handle lName = NewHandle(1);
Handle lInfo = NewHandle(1);
Handle lIcon = NewHandle(1);
do {
lID = FindNextComponent(lID, &lComponentDescription);
if (lID){
ComponentDescription lDescriptor = {0, 0, 0, 0, 0};
GetComponentInfo(lID, &lDescriptor, lName, lInfo, lIcon);
}
} while (lID);
}
For decompressors or transcoders, replace 'compressorComponentType'
with 'decompressorComponentType' or 'ImageTranscodererComponentType',
respectively - and note the ratherer peculiarar spellelling of the
latterer.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden