PDA

View Full Version : How Can I decode the wmv3 stream ??


finn_nast
29th October 2008, 09:35
:thanks:
I am trying to decode the wmv3 stream ,using vfw. But I can never success!
Code like this:



wmv9vcm = LoadLibrary("wmv9vcm.dll");
DriverProc = GetProcAddress(wmv9vcm, "DriverProc");
ICInstall(ICTYPE_VIDEO, mmioFOURCC('w', 'm', 'v', '3'), (LPARAM) DriverProc, NULL, ICINSTALL_FUNCTION);

hIC = ICOpen(ICTYPE_VIDEO, mmioFOURCC('w', 'm', 'v', '3'), ICMODE_DECOMPRESS);
ICDecompressBegin(hIC, &WMV3, &BITM);

// i know that the WMV3 needs 6 bytes more than BITMAPINFOHEADER, and these 6 bytes are (byte)0x0f, (byte)0xf1, (byte)0x80, (byte)0x01, (byte)0x40, (byte)0x0f

ICDecompress(hIC, 0, &(WMV3.BIH), buf+i, &BITM, output);
.......


I can't decode successfully. ICDecompress always returns 0xFFFFFF9C.

Anybody here can tell me how to decode that????
Thanks a lot!!!