|
Each codec has a set of entry points (APIs) that expose its ability to encode and decode, as well as the capability of having the decode function(s) copied out of the module and relocated. The mandatory codec APIs are: DWORD WINAPI DecodeSmall(LPVOID lpvSource, LPVOID lpvDest, LPVOID pExtra); DWORD WINAPI GetDecodeSmallFuncSize(); DWORD WINAPI Encode(LPVOID lpvSource, DWORD dwSize, LPVOID lpvDest, DWORD *pdwDestSize, DWORD dwLevel, PFNCodecCallback pCodecCallback); DWORD WINAPI GetCodecVersion(DWORD *pdwSdkVer); DWORD WINAPI GetCodecAuthor(WCHAR *pwszAuthorName, DWORD dwBufSize); DWORD WINAPI GetCodecName(WCHAR *pwszCodecName, DWORD dwBufSize); The optional ones are: DWORD WINAPI DecodeFast(LPVOID lpvSource, LPVOID lpvDest, LPVOID pExtra); DWORD WINAPI GetDecodeFastFuncSize(); DWORD WINAPI GetMaximumEncodingLevel(); The callback function the host, PECompact, passes to the Encode API is:: BOOL WINAPI CodecCallback(DWORD dwAction, DWORD dwParam1, DWORD dwParam2, DWORD dwParam3); |
|