include(`defines.m4') define(, , )!>) define(, )!>)dnl define(, , , , shift($@))!>)!>)dnl define(, )dnl dnl define(, )dnl define(, )dnl #include #include #include "CodecIDs.h" #include "PerianResourceIDs.h" int getCodecID(OSType componentType) { enum CodecID codecID = CODEC_ID_NONE; switch(componentType) { include() codecID = lastCase; break; default: break; } return codecID; } undefine()dnl define(, , )!>) define(, )!>)dnl define(, )dnl pascal ComponentResult getPerianCodecInfo(ComponentInstance self, OSType componentType, void *info) { OSErr err = noErr; if (info == NULL) { err = paramErr; } else { CodecInfo **tempCodecInfo; switch (componentType) { include() err = GetComponentResource((Component)self, codecInfoResourceType, lastCase, (Handle *)&tempCodecInfo); break; default: // should never happen but we have to handle the case err = GetComponentResource((Component)self, codecInfoResourceType, kDivX4CodecInfoResID, (Handle *)&tempCodecInfo); } if (err == noErr) { *((CodecInfo *)info) = **tempCodecInfo; DisposeHandle((Handle)tempCodecInfo); } } return err; }