From 538ed06c41521fa8f884ecf39a7e617fafb43bc1 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Tue, 7 Feb 2006 12:28:04 +0100 Subject: [PATCH] Clearly indicate that ICCVID and MSVIDC32 do not support compression. --- dlls/iccvid/iccvid.c | 20 ++++++++++++-------- dlls/msvidc32/msvideo1.c | 21 +++++++++++++-------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/dlls/iccvid/iccvid.c b/dlls/iccvid/iccvid.c index ddb0d5b277a..69ccccd636a 100644 --- a/dlls/iccvid/iccvid.c +++ b/dlls/iccvid/iccvid.c @@ -765,7 +765,7 @@ static LRESULT ICCVID_DecompressQuery( ICCVID_Info *info, LPBITMAPINFO in, LPBIT ICCVID_dump_BITMAPINFO(in); if( in->bmiHeader.biCompression != ICCVID_MAGIC ) - return ICERR_UNSUPPORTED; + return ICERR_BADFORMAT; if( out ) { @@ -773,11 +773,11 @@ static LRESULT ICCVID_DecompressQuery( ICCVID_Info *info, LPBITMAPINFO in, LPBIT ICCVID_dump_BITMAPINFO(out); if( in->bmiHeader.biPlanes != out->bmiHeader.biPlanes ) - return ICERR_UNSUPPORTED; + return ICERR_BADFORMAT; if( in->bmiHeader.biHeight != out->bmiHeader.biHeight ) - return ICERR_UNSUPPORTED; + return ICERR_BADFORMAT; if( in->bmiHeader.biWidth != out->bmiHeader.biWidth ) - return ICERR_UNSUPPORTED; + return ICERR_BADFORMAT; switch( out->bmiHeader.biBitCount ) { @@ -788,7 +788,7 @@ static LRESULT ICCVID_DecompressQuery( ICCVID_Info *info, LPBITMAPINFO in, LPBIT !ICCVID_CheckMask(out->bmiColors, 0xF800, 0x07E0, 0x001F) ) { TRACE("unsupported output bit field(s) for 16-bit colors\n"); - return ICERR_UNSUPPORTED; + return ICERR_BADFORMAT; } } break; @@ -797,7 +797,7 @@ static LRESULT ICCVID_DecompressQuery( ICCVID_Info *info, LPBITMAPINFO in, LPBIT break; default: TRACE("unsupported output bitcount = %d\n", out->bmiHeader.biBitCount ); - return ICERR_UNSUPPORTED; + return ICERR_BADFORMAT; } } @@ -977,6 +977,9 @@ LRESULT WINAPI ICCVID_DriverProc( DWORD_PTR dwDriverId, HDRVR hdrvr, UINT msg, return (LRESULT) info; } + case DRV_CLOSE: + return ICCVID_Close( info ); + case ICM_GETINFO: return ICCVID_GetInfo( info, (ICINFO *)lParam1, (DWORD)lParam2 ); @@ -999,8 +1002,9 @@ LRESULT WINAPI ICCVID_DriverProc( DWORD_PTR dwDriverId, HDRVR hdrvr, UINT msg, case ICM_DECOMPRESS_END: return ICCVID_DecompressEnd( info ); - case DRV_CLOSE: - return ICCVID_Close( info ); + case ICM_COMPRESS_QUERY: + FIXME("compression not implemented\n"); + return ICERR_BADFORMAT; default: FIXME("Unknown message: %04x %ld %ld\n", msg, lParam1, lParam2); diff --git a/dlls/msvidc32/msvideo1.c b/dlls/msvidc32/msvideo1.c index c639d208229..a4c11932bbd 100644 --- a/dlls/msvidc32/msvideo1.c +++ b/dlls/msvidc32/msvideo1.c @@ -514,6 +514,16 @@ LRESULT WINAPI CRAM_DriverProc( DWORD_PTR dwDriverId, HDRVR hdrvr, UINT msg, break; } + case DRV_CLOSE: + HeapFree( GetProcessHeap(), 0, info ); + break; + + case DRV_DISABLE: + break; + + case DRV_FREE: + break; + case ICM_GETINFO: r = CRAM_GetInfo( info, (ICINFO *)lParam1, (DWORD)lParam2 ); break; @@ -551,14 +561,9 @@ LRESULT WINAPI CRAM_DriverProc( DWORD_PTR dwDriverId, HDRVR hdrvr, UINT msg, (DWORD) lParam2 ); break; - case DRV_CLOSE: - HeapFree( GetProcessHeap(), 0, info ); - break; - - case DRV_DISABLE: - break; - - case DRV_FREE: + case ICM_COMPRESS_QUERY: + FIXME("compression not implemented\n"); + r = ICERR_BADFORMAT; break; default: