Freigeben über


Dekomprimieren von Daten

[Das feature, das dieser Seite zugeordnet ist, der Videokomprimierungs-Manager, ist ein Legacyfeature. Microsoft empfiehlt dringend, dass neuer Code dieses Feature nicht verwendet.]

Das folgende Beispiel zeigt, wie eine Anwendung einen Dekomprimierungsor mithilfe des ICDecompressBegin-Makros initialisieren, eine Framesequenz mithilfe der ICDecompress-Funktion dekomprimieren und die Dekomprimierung mit dem MAKRO ICDecompressEnd beenden kann.

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. 
}