wined3d: Don't setup FBO and draw buffers in wined3d_context_gl_apply_blit_state().
[wine.git] / programs / icinfo / icinfo.c
blobbd309bfb6232defeb78936e035577b4a2a9d8d04
1 /*
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
19 #include <stdio.h>
20 #include <string.h>
21 #include "windows.h"
22 #include "mmsystem.h"
23 #include "vfw.h"
25 static int WINAPIV mywprintf(const WCHAR *format, ...)
27 static char output_bufA[65536];
28 static WCHAR output_bufW[sizeof(output_bufA)];
29 va_list parms;
30 DWORD nOut;
31 BOOL res = FALSE;
32 HANDLE hout = GetStdHandle(STD_OUTPUT_HANDLE);
34 va_start(parms, format);
35 vswprintf(output_bufW, ARRAY_SIZE(output_bufW), format, parms);
36 va_end(parms);
38 res = WriteConsoleW(hout, output_bufW, lstrlenW(output_bufW), &nOut, NULL);
39 if (!res)
41 DWORD convertedChars;
43 /* Convert to OEM, then output */
44 convertedChars = WideCharToMultiByte(GetOEMCP(), 0, output_bufW, -1,
45 output_bufA, sizeof(output_bufA),
46 NULL, NULL);
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"))
59 doabout = 1;
60 else if (!lstrcmpW(argv[i], L"-configure"))
61 doconfigure = 1;
62 else {
63 mywprintf(L"Unknown option: %s\n", argv[i]);
64 return -1;
68 mywprintf(L"%s", L"Currently installed Video Compressors:\n");
69 while (1) {
70 ICINFO ii;
71 HIC hic;
73 ii.dwSize = sizeof(ii);
74 if (!ICInfo(ICTYPE_VIDEO,n++,&ii))
75 break;
76 if (!(hic=ICOpen(ii.fccType,ii.fccHandler,ICMODE_QUERY)))
77 continue;
78 if (!ICGetInfo(hic,&ii,sizeof(ii))) {
79 ICClose(hic);
80 continue;
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),
86 ii.szName);
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))
104 ICConfigure(hic,0);
105 ICClose(hic);
107 return 0;