ICCompress key frames on MP42
-
Hi All, I'm compressing a range of bitmaps using the VCM and the ICCompress function that has been opened on the MP42 codec (Microsoft Mpeg4 V2). The compression of the bitmaps work just fine, but I am battling to set when the next keyframe should be delivered from the compression.
DWORD dwInFlags = 0, dwOutFlags = 0; if (various check to set a key frame) dwInFlags = ICCOMPRESS_KEYFRAME; m_lFrameCount++; DWORD dwSuccess = ICCompress(m_hIC, dwInFlags, (LPBITMAPINFOHEADER)m_pVideoOut, m_pFrame, (LPBITMAPINFOHEADER)m_pVideoIn, pFrame, NULL, &dwOutFlags, m_lFrameCount, 0, 0, NULL, NULL); if (dwSuccess == ERROR_SUCCESS) { if (dwOutFlags & AVIIF_KEYFRAME) { m_lFrameCount = 1; TRACE("\nKEYFRAME %d", m_pVideoOut->bmiHeader.biSizeImage); } // etc, etc, etc
Any ideas as to what may be wrong in my code, or is there another way to accomplish that ? Thanks !