47#define HKLM_DRIVERS32 "Software\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32"
52#define fourcc_to_string(str, fcc) do { \
53 (str)[0] = LOBYTE(LOWORD(fcc)); \
54 (str)[1] = HIBYTE(LOWORD(fcc)); \
55 (str)[2] = LOBYTE(HIWORD(fcc)); \
56 (str)[3] = HIBYTE(HIWORD(fcc)); \
64#define XX(x) case (x): str = #x; break
128#define XX(x) case x: TRACE("(%p,"#x",0x%08Ix,0x%08Ix)\n",whic,lParam1,lParam2); break
189 FIXME(
"(%p,0x%08x,0x%08Ix,0x%08Ix) unknown message\n",whic,
msg,lParam1,lParam2);
259 char name_buf[10],
buf[2048];
260 DWORD ret_type, ret_handler;
266 TRACE(
"type %s, handler %s, info %p.\n",
270 info->dwSize =
sizeof(*info);
283 if (name_len != 9 || name_buf[4] !=
'.')
continue;
289 info->fccType = ret_type;
290 info->fccHandler = ret_handler;
303 if (
s[4] !=
'.' ||
s[9] !=
'=')
continue;
309 info->fccType = ret_type;
310 info->fccHandler = ret_handler;
340 TRACE(
"type %s, handler %s, lparam %#Ix, desc %s, flags %#x.\n",
395 TRACE(
"type %s, handler %s, flags %#x.\n",
433 static const WCHAR drv32W[] = {
'd',
'r',
'i',
'v',
'e',
'r',
's',
'3',
'2',
'\0'};
453 TRACE(
"Returning %s as default handler for %s\n",
501 if (!(whic =
malloc(
sizeof(*whic))))
527 TRACE(
"(%s,%s,%d,%p)\n",
540 if (!(whic =
malloc(
sizeof(*whic))))
554 WARN(
"DRV_LOAD failed for hic %p\n", whic->
hic);
568 WARN(
"DRV_OPEN failed for hic %p\n", whic->
hic);
586 TRACE(
"(%p,%p,%ld)\n", hic, picinfo,
cb);
608 memset(&ii, 0,
sizeof(ii));
628 TRACE(
"type %s, handler %s, in %p, out %p, mode %u.\n",
677 WARN(
"Could not find a driver for codec %s.%s.\n",
691 TRACE(
"(%p, %p, %p, %d, %d, %d)\n", hic,
in,
out,
depth,
width,
height);
713 out->biSize =
sizeof(*out);
732 out->biBitCount = 16;
746 out->biBitCount = 24;
755 out->biBitCount = 32;
762 out->biWidth =
in->biWidth;
763 out->biHeight =
in->biHeight;
764 out->biBitCount = 32;
792 TRACE(
"(%p,%ld,%p,%p,%p,%p,...)\n",hic,
dwFlags,lpbiOutput,lpData,lpbiInput,lpBits);
797 iccmp.lpOutput = lpData;
799 iccmp.lpInput = lpBits;
807 iccmp.lpPrev = lpPrev;
820 TRACE(
"(%p,%ld,%p,%p,%p,%p)\n",hic,
dwFlags,lpbiFormat,lpData,lpbi,lpBits);
824 icd.lpInput = lpData;
827 icd.lpOutput = lpBits;
872 if (!enum_all && pcv->
lpbiIn)
876 TRACE(
"fccHandler %s doesn't support input DIB format %ld\n",
914 if (choose_comp->
title)
977 can_configure =
TRUE;
1090 TRACE(
"(%p,%08x,%p,%p,%p,%s)\n",
hwnd, uiFlags, pvIn, lpData, pc, lpszTitle);
1112 choose_comp.
cv = *pc;
1113 choose_comp.
flags = uiFlags;
1114 choose_comp.
title = lpszTitle;
1121 *pc = choose_comp.
cv;
1134 TRACE(
"(%p)\n", pc);
1190 TRACE(
"(%p,%ld,%p,%p,%p,%u,%u,%u,%u,%p,%u,%u,%u,%u,%ld,%ld)\n",
1192 lpbi, xSrc, ySrc, dxSrc, dySrc, dwRate, dwScale);
1218 TRACE(
"(%p,%ld,%p,%p,%ld,%ld)\n",hic,
dwFlags,
lpFormat,lpData,
cbData,lTime);
1237 TRACE(
"(%p)\n",hic);
1272 HIC hic,
UINT uiFlags,
1277 FIXME(
"(%p,%08x,%p,%p,%p,%ld,%p)\n",
1278 hic, uiFlags, lpbiIn, lpBits, lpbiOut, lQuality, plSize);
1300 TRACE(
"(%p,%08x,%p,%p,%p)\n",
1301 hic, uiFlags, lpbiIn, lpBits, lpbiOut);
1308 WARN(
"no handler\n" );
1315 FIXME(
"unknown flag %08x\n", uiFlags );
1318 if ( lpbiIn ==
NULL || lpBits ==
NULL )
1320 WARN(
"invalid argument\n");
1324 if ( lpbiOut !=
NULL )
1330 cbHdr +=
sizeof(
DWORD)*3;
1342 TRACE(
"get format\n" );
1370 if ( biSizeImage == 0 )
1373 TRACE(
"call ICDecompressBegin\n" );
1377 bInDecompress =
TRUE;
1379 TRACE(
"cbHdr %ld, biSizeImage %ld\n", cbHdr, biSizeImage );
1384 WARN(
"out of memory\n" );
1390 memcpy( pMem, lpbiOut, cbHdr );
1392 TRACE(
"call ICDecompress\n" );
1398 if ( bInDecompress )
1405 if ( !bSucceeded && hMem !=
NULL )
1420 TRACE(
"(%p, 0x%08x, %p, %p, %p)\n", pc, uiFlags, lpBits, pfKey, plSize);
1438 icComp->lpInput = lpBits;
1452 TRACE(
"Key frame\n");
1465 TRACE(
"returning: %p, compressed frame size %lu\n", icComp->lpOutput, *plSize);
1466 return icComp->lpOutput;
1491 TRACE(
"(%p)\n", pc);
1502 if (
src->bmiHeader.biClrUsed)
1503 num_colors =
min(
src->bmiHeader.biClrUsed, 256);
1505 num_colors =
src->bmiHeader.biBitCount > 8 ? 0 : 1 <<
src->bmiHeader.biBitCount;
1554 ERR(
"Could not get output format from compressor\n");
1565 ERR(
"Bad codec! Invalid output frame size, guessing from input\n");
1569 TRACE(
"Input: %lux%lu, fcc %s, bpp %u, size %lu\n",
1574 TRACE(
"Output: %lux%lu, fcc %s, bpp %u, size %lu\n",
1595 "\tkey/data/quality: %li/%li/%li\n",
1628 CHAR szFunctionName[20];
1633 FIXME(
"(%p,%d,%d), semi-stub!\n",lpofn,bSave,bUnicode);
1635 lstrcpyA(szFunctionName, (bSave ?
"GetSaveFileName" :
"GetOpenFileName"));
1636 lstrcatA(szFunctionName, (bUnicode ?
"W" :
"A"));
1639 if (hComdlg32 ==
NULL)
1643 if (fnGetFileName ==
NULL)
1650 ret = fnGetFileName(lpofn);
1661 FIXME(
"(%p), semi-stub!\n", lpofn);
1671 FIXME(
"(%p), semi-stub!\n", lpofn);
1681 FIXME(
"(%p), semi-stub!\n", lpofn);
1691 FIXME(
"(%p), semi-stub!\n", lpofn);
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
#define RegCloseKey(hKey)
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
LONG WINAPI RegEnumValueA(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpdwReserved, _Out_opt_ LPDWORD lpdwType, _Out_opt_ LPBYTE lpData, _Inout_opt_ LPDWORD lpcbData)
LONG WINAPI RegDeleteValueA(HKEY hKey, LPCSTR lpValueName)
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
const char * wine_dbg_sprintf(const char *format,...)
#define DLL_PROCESS_ATTACH
#define GetProcAddress(x, y)
static __inline const char * debugstr_an(const char *s, int n)
#define ERROR_NO_MORE_ITEMS
#define _strnicmp(_String1, _String2, _MaxCount)
#define MultiByteToWideChar
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
INT WINAPI GetPrivateProfileSectionA(LPCSTR section, LPSTR buffer, DWORD len, LPCSTR filename)
UINT(* handler)(MSIPACKAGE *)
_ACRTIMP size_t __cdecl strlen(const char *)
LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT msg, LPARAM lParam1, LPARAM lParam2)
HDRVR WINAPI OpenDriver(LPCWSTR lpDriverName, LPCWSTR lpSectionName, LPARAM lParam)
LRESULT WINAPI CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
FOURCC WINAPI mmioStringToFOURCCA(LPCSTR sz, UINT uFlags)
GLint GLint GLsizei GLsizei GLsizei depth
GLuint GLuint GLsizei count
GLint GLint GLsizei GLsizei height
GLuint GLuint GLsizei GLenum type
GLint GLint GLsizei width
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
#define compare_fourcc(fcc1, fcc2)
static ERESOURCE GlobalLock
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
#define memcpy(s1, s2, n)
LRESULT(CALLBACK * DRIVERPROC)(DWORD_PTR, HDRVR, UINT, LPARAM, LPARAM)
#define MMSYSERR_INVALPARAM
D3D11_SHADER_VARIABLE_DESC desc
HIC VFWAPI ICOpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode, DRIVERPROC lpfnHandler)
DWORD VFWAPIV ICDrawBegin(HIC hic, DWORD dwFlags, HPALETTE hpal, HWND hwnd, HDC hdc, INT xDst, INT yDst, INT dxDst, INT dyDst, LPBITMAPINFOHEADER lpbi, INT xSrc, INT ySrc, INT dxSrc, INT dySrc, DWORD dwRate, DWORD dwScale)
static const char * wine_dbgstr_icerr(int ret)
HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode)
DWORD WINAPI VideoForWindowsVersion(void)
HANDLE VFWAPI ICImageCompress(HIC hic, UINT uiFlags, LPBITMAPINFO lpbiIn, LPVOID lpBits, LPBITMAPINFO lpbiOut, LONG lQuality, LONG *plSize)
BOOL VFWAPI ICInstall(DWORD type, DWORD handler, LPARAM lparam, char *desc, UINT flags)
BOOL WINAPI GetSaveFileNamePreviewW(LPOPENFILENAMEW lpofn)
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
DWORD VFWAPIV ICDecompress(HIC hic, DWORD dwFlags, LPBITMAPINFOHEADER lpbiFormat, LPVOID lpData, LPBITMAPINFOHEADER lpbi, LPVOID lpBits)
static BOOL GetFileNamePreview(LPVOID lpofn, BOOL bSave, BOOL bUnicode)
DWORD VFWAPIV ICDraw(HIC hic, DWORD dwFlags, LPVOID lpFormat, LPVOID lpData, DWORD cbData, LONG lTime)
BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS pc, LPBITMAPINFO lpbiIn)
LRESULT VFWAPI ICSendMessage(HIC hic, UINT msg, DWORD_PTR lParam1, DWORD_PTR lParam2)
LRESULT VFWAPI ICGetInfo(HIC hic, ICINFO *picinfo, DWORD cb)
HIC VFWAPI ICLocate(DWORD type, DWORD handler, BITMAPINFOHEADER *in, BITMAPINFOHEADER *out, WORD mode)
void VFWAPI ICCompressorFree(PCOMPVARS pc)
static void clear_compvars(PCOMPVARS pc)
HANDLE VFWAPI ICImageDecompress(HIC hic, UINT uiFlags, LPBITMAPINFO lpbiIn, LPVOID lpBits, LPBITMAPINFO lpbiOut)
BOOL VFWAPI ICCompressorChoose(HWND hwnd, UINT uiFlags, LPVOID pvIn, LPVOID lpData, PCOMPVARS pc, LPSTR lpszTitle)
static WINE_HIC * MSVIDEO_GetHicPtr(HIC hic)
HIC VFWAPI ICGetDisplayFormat(HIC hic, BITMAPINFOHEADER *in, BITMAPINFOHEADER *out, int depth, int width, int height)
void VFWAPI ICSeqCompressFrameEnd(PCOMPVARS pc)
static INT_PTR CALLBACK icm_choose_compressor_dlgproc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
static LRESULT MSVIDEO_SendMessage(WINE_HIC *whic, UINT msg, DWORD_PTR lParam1, DWORD_PTR lParam2)
BOOL VFWAPI ICInfo(DWORD type, DWORD handler, ICINFO *info)
DWORD VFWAPIV ICCompress(HIC hic, DWORD dwFlags, LPBITMAPINFOHEADER lpbiOutput, LPVOID lpData, LPBITMAPINFOHEADER lpbiInput, LPVOID lpBits, LPDWORD lpckid, LPDWORD lpdwFlags, LONG lFrameNum, DWORD dwFrameSize, DWORD dwQuality, LPBITMAPINFOHEADER lpbiPrev, LPVOID lpPrev)
static struct list reg_driver_list
static DWORD IC_HandleRef
BOOL WINAPI GetSaveFileNamePreviewA(LPOPENFILENAMEA lpofn)
BOOL WINAPI GetOpenFileNamePreviewA(LPOPENFILENAMEA lpofn)
#define fourcc_to_string(str, fcc)
static BITMAPINFO * copy_bitmapinfo(const BITMAPINFO *src)
static WINE_HIC * MSVIDEO_FirstHic
LPVOID VFWAPI ICSeqCompressFrame(PCOMPVARS pc, UINT uiFlags, LPVOID lpBits, BOOL *pfKey, LONG *plSize)
LRESULT WINAPI ICClose(HIC hic)
static BOOL enum_compressors(HWND list, COMPVARS *pcv, BOOL enum_all)
static DWORD get_size_image(LONG width, LONG height, WORD depth)
BOOL VFWAPI ICRemove(DWORD type, DWORD handler, UINT flags)
BOOL WINAPI GetOpenFileNamePreviewW(LPOPENFILENAMEW lpofn)
#define IDC_QUALITY_SCROLL
#define IDC_KEYFRAME_FRAMES
#define ICM_CHOOSE_COMPRESSOR
#define IDC_DATARATE_CHECKBOX
#define IDC_KEYFRAME_CHECKBOX
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
_In_opt_ _In_opt_ _In_ _In_ DWORD cbData
BOOL WINAPI SetWindowTextA(_In_ HWND, _In_opt_ LPCSTR)
#define GetWindowLongPtrW
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
#define SetWindowLongPtrW
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
static __inline const char * debugstr_fourcc(unsigned int cc)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
LPBITMAPINFOHEADER lpbiInput
LPBITMAPINFOHEADER lpbiPrev
LPBITMAPINFOHEADER lpbiOutput
LPBITMAPINFOHEADER lpbiInput
LPBITMAPINFOHEADER lpbiOutput
BITMAPINFOHEADER bmiHeader
struct tagWINE_HIC * next
#define FIELD_OFFSET(t, f)
#define ICMODE_FASTCOMPRESS
#define ICMODE_DECOMPRESS
#define ICM_COMPRESS_BEGIN
#define ICM_DECOMPRESSEX_END
#define ICDecompressQuery(hic, lpbiInput, lpbiOutput)
#define ICM_DRAW_CHANGEPALETTE
#define ICAbout(hic, hwnd)
#define ICM_COMPRESS_GET_SIZE
#define ICM_GETDEFAULTKEYFRAMERATE
#define ICQUALITY_DEFAULT
#define ICQueryAbout(hic)
#define ICMF_CHOOSE_KEYFRAME
#define ICDecompressGetPalette(hic, lpbiInput, lpbiOutput)
#define ICQueryConfigure(hic)
#define ICM_COMPRESS_QUERY
#define ICM_DECOMPRESSEX_BEGIN
#define ICM_SET_STATUS_PROC
#define ICERR_BADIMAGESIZE
#define ICM_DECOMPRESS_GET_PALETTE
#define ICM_DECOMPRESS_QUERY
#define ICERR_UNSUPPORTED
#define ICM_DRAW_START_PLAY
#define ICDecompressOpen(fccType, fccHandler, lpbiIn, lpbiOut)
#define ICM_DRAW_STOP_PLAY
#define ICM_DECOMPRESS_GET_FORMAT
#define ICM_DRAW_RENDERBUFFER
#define ICConfigure(hic, hwnd)
#define ICCOMPRESS_KEYFRAME
#define ICERR_GOTOKEYFRAME
#define ICDecompressBegin(hic, lpbiInput, lpbiOutput)
#define ICM_DECOMPRESS_END
#define ICM_DECOMPRESSEX_QUERY
#define ICM_COMPRESS_GET_FORMAT
#define ICM_DECOMPRESS_BEGIN
#define ICM_DRAW_SUGGESTFORMAT
#define ICMF_CHOOSE_DATARATE
#define ICM_GETDEFAULTQUALITY
#define ICMF_COMPVARS_VALID
#define ICINSTALL_FUNCTION
#define ICDecompressGetFormatSize(hic, lpbi)
#define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput)
#define ICERR_STOPDRAWING
#define ICDecompressEnd(hic)
#define ICMODE_FASTDECOMPRESS
#define ICCompressQuery(hic, lpbiInput, lpbiOutput)
#define ICM_DRAW_GET_PALETTE
#define ICM_COMPRESS_FRAMES_INFO
#define ICERR_BADBITDEPTH
#define ICMF_CHOOSE_ALLCOMPRESSORS
#define ICM_GETBUFFERSWANTED
#define ICM_DECOMPRESS_SET_PALETTE
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
static WORD const char * driver
#define HKEY_LOCAL_MACHINE