데이터 그리기
[이 페이지와 연결된 기능인 Video Compression Manager는 레거시 기능입니다. 새 코드는 이 기능을 사용하지 않는 것이 좋습니다.]
다음 예제에서는 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