解压缩数据
[与此页面关联的功能 视频压缩管理器是一项旧功能。 Microsoft 强烈建议新代码不使用此功能。]
以下示例演示应用程序如何使用 ICDecompressBegin 宏初始化解压缩器、使用 ICDecompress 函数解压缩帧序列以及使用 ICDecompressEnd 宏终止解压缩。
LPBITMAPINFOHEADER lbpiIn, lpbiOut;
LPVOID lpIn, lpOut;
LONG lNumFrames, lFrameNum;
// Assume lpbiIn and lpbiOut are initialized to the input and output
// format and lpIn and lpOut are pointing to the buffers.
if (ICDecompressBegin(hIC, lpbiIn, lpbiOut) == ICERR_OK)
{
for (lFrameNum = 0; lFrameNum < lNumFrames, lFrameNum++)
{
if (ICDecompress(hIC, 0, lpbiIn, lpIn, lpbiOut,
lpOut) == ICERR_OK)
{
// Frame decompressed OK so we can process it as required.
}
else
{
// Handle the decompression error that occurred.
}
}
ICDecompressEnd(hIC);
}
else
{
// Handle the error identifying an unsupported format.
}