Fixed a few oddities.

This commit is contained in:
Eric Pouech 2001-01-28 23:09:55 +00:00 committed by Alexandre Julliard
parent 0639d603cc
commit 052b3f1612
1 changed files with 22 additions and 11 deletions

View File

@ -59,7 +59,7 @@ DWORD WINAPI VideoCapDriverDescAndVer(WORD nr,LPVOID buf1,WORD buf1len,LPVOID bu
BOOL VFWAPI ICInfo( BOOL VFWAPI ICInfo(
DWORD fccType, /* [in] type of compressor ('vidc') */ DWORD fccType, /* [in] type of compressor ('vidc') */
DWORD fccHandler, /* [in] <n>th compressor */ DWORD fccHandler, /* [in] <n>th compressor */
ICINFO *lpicinfo) /* [out] information about compressor */ ICINFO *lpicinfo) /* [out] information about compressor */
{ {
char type[5],buf[2000]; char type[5],buf[2000];
@ -298,10 +298,9 @@ HIC VFWAPI ICLocate(
if (!strncasecmp(type,s,5)) { if (!strncasecmp(type,s,5)) {
char *s2 = s; char *s2 = s;
while (*s2 != '\0' && *s2 != '.') s2++; while (*s2 != '\0' && *s2 != '.') s2++;
if (*s2) { if (*s2++) {
HIC h; HIC h;
*s2++ = '\0';
h = ICOpen(fccType,*(DWORD*)s2,wMode); h = ICOpen(fccType,*(DWORD*)s2,wMode);
if (h) { if (h) {
if (!ICSendMessage(h,querymsg,(DWORD)lpbiIn,(DWORD)lpbiOut)) if (!ICSendMessage(h,querymsg,(DWORD)lpbiIn,(DWORD)lpbiOut))
@ -322,7 +321,7 @@ HIC VFWAPI ICLocate(
} }
type[4] = handler[4] = '\0'; type[4] = handler[4] = '\0';
FIXME("(%.4s,%.4s,%p,%p,0x%04x),unhandled!\n",type,handler,lpbiIn,lpbiOut,wMode); WARN("(%.4s,%.4s,%p,%p,0x%04x) not found!\n",type,handler,lpbiIn,lpbiOut,wMode);
return 0; return 0;
} }
@ -342,7 +341,6 @@ HIC VFWAPI ICGetDisplayFormat(
INT depth,INT dx,INT dy) INT depth,INT dx,INT dy)
{ {
HIC tmphic = hic; HIC tmphic = hic;
LRESULT lres;
FIXME("(0x%08lx,%p,%p,%d,%d,%d),stub!\n",(DWORD)hic,lpbiIn,lpbiOut,depth,dx,dy); FIXME("(0x%08lx,%p,%p,%d,%d,%d),stub!\n",(DWORD)hic,lpbiIn,lpbiOut,depth,dx,dy);
if (!tmphic) { if (!tmphic) {
@ -350,16 +348,24 @@ HIC VFWAPI ICGetDisplayFormat(
if (!tmphic) if (!tmphic)
return tmphic; return tmphic;
} }
if ((dy == lpbiIn->biHeight) || (dx == lpbiIn->biWidth)) if ((dy == lpbiIn->biHeight) && (dx == lpbiIn->biWidth))
dy = dx = 0; /* no resize needed */ dy = dx = 0; /* no resize needed */
/* Can we decompress it ? */ /* Can we decompress it ? */
lres = ICDecompressQuery(tmphic,lpbiIn,NULL); if (ICDecompressQuery(tmphic,lpbiIn,NULL) != 0)
if (lres)
goto errout; /* no, sorry */ goto errout; /* no, sorry */
ICDecompressGetFormat(tmphic,lpbiIn,lpbiOut); ICDecompressGetFormat(tmphic,lpbiIn,lpbiOut);
*lpbiOut=*lpbiIn;
lpbiOut->biCompression = 0; if (lpbiOut->biCompression != 0) {
lpbiOut->biSize = sizeof(*lpbiOut); FIXME("Ooch, how come decompressor outputs compressed data (%ld)??\n",
lpbiOut->biCompression);
}
if (lpbiOut->biSize < sizeof(*lpbiOut)) {
FIXME("Ooch, size of output BIH is too small (%ld)\n",
lpbiOut->biSize);
lpbiOut->biSize = sizeof(*lpbiOut);
}
if (!depth) { if (!depth) {
HDC hdc; HDC hdc;
@ -717,6 +723,9 @@ LPVOID MSVIDEO_MapMsg16To32(UINT msg, LPDWORD lParam1, LPDWORD lParam2) {
*lParam2 = sizeof(ICDRAW); *lParam2 = sizeof(ICDRAW);
} }
break; break;
case ICM_DRAW_START:
case ICM_DRAW_STOP:
break;
default: default:
FIXME("%d is not yet handled. Expect a crash.\n",msg); FIXME("%d is not yet handled. Expect a crash.\n",msg);
} }
@ -850,6 +859,8 @@ LRESULT MSVIDEO_SendMessage(HIC hic,UINT msg,DWORD lParam1,DWORD lParam2, BOOL b
#undef XX #undef XX
if (!whic) return ICERR_BADHANDLE;
if (whic->driverproc) { /* IC is a function */ if (whic->driverproc) { /* IC is a function */
bDrv32 = whic->private; bDrv32 = whic->private;
} else { } else {