绘图数据
[与此页面关联的功能 视频压缩管理器是一项旧功能。 Microsoft 强烈建议新代码不使用此功能。]
以下示例使用 ICDraw 函数和 ICDrawStart、 ICDrawStop、 ICDrawFlush 和 ICDrawEnd 宏在屏幕上绘制数据。
DWORD dwNumBuffers;
// Find out how many buffers need filling before drawing starts.
ICGetBuffersWanted(hIC, &dwNumBuffers);
for (dw = 0; dw < dwNumBuffers; dw++)
{
ICDraw(hIC, 0, lpFormat, lpData, cbData, dw); // fill the pipeline
// Point lpFormat and lpData to next format and buffer.
}
ICDrawStart(hIC); // starts the clock
dw = 0;
while (fPlaying)
{
ICDraw(hIC, 0, lpFormat, lpData, chData, dw); // fill more buffers
// Point lpFormat and lpData to next format and buffer,
// update dw.
}
ICDrawStop(hIC); // stops drawing and decompressing when done
ICDrawFlush(hIC); // flushes any existing buffers
ICDrawEnd(hIC); // ends decompression