2 * Copyright 1999 Marcus Meissner
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 static int WINAPIV
mywprintf(const WCHAR
*format
, ...)
27 static char output_bufA
[65536];
28 static WCHAR output_bufW
[sizeof(output_bufA
)];
32 HANDLE hout
= GetStdHandle(STD_OUTPUT_HANDLE
);
34 va_start(parms
, format
);
35 vswprintf(output_bufW
, ARRAY_SIZE(output_bufW
), format
, parms
);
38 res
= WriteConsoleW(hout
, output_bufW
, lstrlenW(output_bufW
), &nOut
, NULL
);
43 /* Convert to OEM, then output */
44 convertedChars
= WideCharToMultiByte(GetOEMCP(), 0, output_bufW
, -1,
45 output_bufA
, sizeof(output_bufA
),
47 res
= WriteFile(hout
, output_bufA
, convertedChars
, &nOut
, FALSE
);
50 return res
? nOut
: 0;
53 int __cdecl
wmain(int argc
, WCHAR
* argv
[])
55 int i
, n
=0,doabout
=0,doconfigure
=0;
57 for (i
= 1; i
< argc
; i
++) {
58 if (!lstrcmpW(argv
[i
], L
"-about"))
60 else if (!lstrcmpW(argv
[i
], L
"-configure"))
63 mywprintf(L
"Unknown option: %s\n", argv
[i
]);
68 mywprintf(L
"%s", L
"Currently installed Video Compressors:\n");
73 ii
.dwSize
= sizeof(ii
);
74 if (!ICInfo(ICTYPE_VIDEO
,n
++,&ii
))
76 if (!(hic
=ICOpen(ii
.fccType
,ii
.fccHandler
,ICMODE_QUERY
)))
78 if (!ICGetInfo(hic
,&ii
,sizeof(ii
))) {
83 mywprintf(L
"%c%c%c%c.%c%c%c%c: %s\n",
84 LOBYTE(ii
.fccType
),LOBYTE(ii
.fccType
>>8),LOBYTE(ii
.fccType
>>16),LOBYTE(ii
.fccType
>>24),
85 LOBYTE(ii
.fccHandler
),LOBYTE(ii
.fccHandler
>>8),LOBYTE(ii
.fccHandler
>>16),LOBYTE(ii
.fccHandler
>>24),
87 mywprintf(L
"\tdwFlags: 0x%08x (",ii
.dwFlags
);
89 if (ii
.dwFlags
& VIDCF_QUALITY
) mywprintf(L
"%s ", L
"VIDCF_QUALITY");
90 if (ii
.dwFlags
& VIDCF_CRUNCH
) mywprintf(L
"%s ", L
"VIDCF_CRUNCH");
91 if (ii
.dwFlags
& VIDCF_TEMPORAL
) mywprintf(L
"%s ", L
"VIDCF_TEMPORAL");
92 if (ii
.dwFlags
& VIDCF_COMPRESSFRAMES
) mywprintf(L
"%s ", L
"VIDCF_COMPRESSFRAMES");
93 if (ii
.dwFlags
& VIDCF_DRAW
) mywprintf(L
"%s ", L
"VIDCF_DRAW");
94 if (ii
.dwFlags
& VIDCF_FASTTEMPORALC
) mywprintf(L
"%s ", L
"VIDCF_FASTTEMPORALC");
95 if (ii
.dwFlags
& VIDCF_FASTTEMPORALD
) mywprintf(L
"%s ", L
"VIDCF_FASTTEMPORALD");
96 if (ii
.dwFlags
& VIDCF_QUALITYTIME
) mywprintf(L
"%s ", L
"VIDCF_QUALITYTIME");
98 mywprintf(L
"%s", L
")\n");
99 mywprintf(L
"\tdwVersion: 0x%08x\n", ii
.dwVersion
);
100 mywprintf(L
"\tdwVersionICM: 0x%08x\n", ii
.dwVersionICM
);
101 mywprintf(L
"\tszDescription: %s\n", ii
.szDescription
);
102 if (doabout
) ICAbout(hic
,0);
103 if (doconfigure
&& ICQueryConfigure(hic
))