🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Fixed a problem in CAviSurface (video example)...

Started by
-1 comments, last by ApolloG 24 years, 6 months ago
Here it is: I found that when trying to play uncompressed trucolor or highcolor AVI''s into 15/16-bit surfaces, ICDecompressOpen would fail... so I wrote a short workaround: before calling ICDecompressOpen, check the m_pasMovie.fccHandler DWORD for it''s value. if it is "DIB ", it is an uncompressed movie. If so, you can check the m_lpScrFmt.biBitCount to determine if it''s 16 or 24 bits. Now, here is the fun part. Since you can''t use the internal decompress functions, you have to use your own "mapper" to convert the raw pixel colors to the new surface type. Here you simply change the DrawBuffer function to check which MapMode the movie is in and write your "mappers" as a switch/case statement. If anybody else has experienced this problem or wants some sample code, I can provide it... Apollo (apollo@ill-lusion.com)

This topic is closed to new replies.

Advertisement