38#include "wine/winternl.h"
48#define HKLM_DRIVERS32 "Software\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32"
53#define fourcc_to_string(str, fcc) do { \
54 (str)[0] = LOBYTE(LOWORD(fcc)); \
55 (str)[1] = HIBYTE(LOWORD(fcc)); \
56 (str)[2] = LOBYTE(HIWORD(fcc)); \
57 (str)[3] = HIBYTE(HIWORD(fcc)); \
77#define XX(x) case (x): str = #x; break
141#define XX(x) case x: TRACE("(%p,"#x",0x%08lx,0x%08lx)\n",whic,lParam1,lParam2); break
202 FIXME(
"(%p,0x%08x,0x%08lx,0x%08lx) unknown message\n",whic,
msg,lParam1,lParam2);
272 char name_buf[10],
buf[2048];
273 DWORD ret_type, ret_handler;
279 TRACE(
"type %s, handler %s, info %p.\n",
283 info->dwSize =
sizeof(*info);
296 if (name_len != 9 || name_buf[4] !=
'.')
continue;
302 info->fccType = ret_type;
303 info->fccHandler = ret_handler;
316 if (
s[4] !=
'.' ||
s[9] !=
'=')
continue;
322 info->fccType = ret_type;
323 info->fccHandler = ret_handler;
353 TRACE(
"type %s, handler %s, lparam %#lx, desc %s, flags %#x.\n",
408 TRACE(
"type %s, handler %s, flags %#x.\n",
446 static const WCHAR drv32W[] = {
'd',
'r',
'i',
'v',
'e',
'r',
's',
'3',
'2',
'\0'};
466 TRACE(
"Returning %s as default handler for %s\n",
540 TRACE(
"(%s,%s,%d,%p)\n",
567 WARN(
"DRV_LOAD failed for hic %p\n", whic->
hic);
581 WARN(
"DRV_OPEN failed for hic %p\n", whic->
hic);
599 TRACE(
"(%p,%p,%d)\n", hic, picinfo,
cb);
621 memset(&ii, 0,
sizeof(ii));
641 TRACE(
"type %s, handler %s, in %p, out %p, mode %u.\n",
690 WARN(
"Could not find a driver for codec %s.%s.\n",
704 TRACE(
"(%p, %p, %p, %d, %d, %d)\n", hic,
in,
out,
depth,
width,
height);
726 out->biSize =
sizeof(*out);
745 out->biBitCount = 16;
759 out->biBitCount = 24;
768 out->biBitCount = 32;
775 out->biWidth =
in->biWidth;
776 out->biHeight =
in->biHeight;
777 out->biBitCount = 32;
805 TRACE(
"(%p,%d,%p,%p,%p,%p,...)\n",hic,
dwFlags,lpbiOutput,lpData,lpbiInput,lpBits);
810 iccmp.lpOutput = lpData;
812 iccmp.lpInput = lpBits;
820 iccmp.lpPrev = lpPrev;
833 TRACE(
"(%p,%d,%p,%p,%p,%p)\n",hic,
dwFlags,lpbiFormat,lpData,lpbi,lpBits);
837 icd.lpInput = lpData;
840 icd.lpOutput = lpBits;
885 if (!enum_all && pcv->
lpbiIn)
889 TRACE(
"fccHandler %s doesn't support input DIB format %d\n",
927 if (choose_comp->
title)
990 can_configure =
TRUE;
1103 TRACE(
"(%p,%08x,%p,%p,%p,%s)\n",
hwnd, uiFlags, pvIn, lpData, pc, lpszTitle);
1125 choose_comp.
cv = *pc;
1126 choose_comp.
flags = uiFlags;
1127 choose_comp.
title = lpszTitle;
1134 *pc = choose_comp.
cv;
1147 TRACE(
"(%p)\n", pc);
1203 TRACE(
"(%p,%d,%p,%p,%p,%u,%u,%u,%u,%p,%u,%u,%u,%u,%d,%d)\n",
1205 lpbi, xSrc, ySrc, dxSrc, dySrc, dwRate, dwScale);
1231 TRACE(
"(%p,%d,%p,%p,%d,%d)\n",hic,
dwFlags,
lpFormat,lpData,cbData,lTime);
1250 TRACE(
"(%p)\n",hic);
1285 HIC hic,
UINT uiFlags,
1290 FIXME(
"(%p,%08x,%p,%p,%p,%d,%p)\n",
1291 hic, uiFlags, lpbiIn, lpBits, lpbiOut, lQuality, plSize);
1313 TRACE(
"(%p,%08x,%p,%p,%p)\n",
1314 hic, uiFlags, lpbiIn, lpBits, lpbiOut);
1321 WARN(
"no handler\n" );
1328 FIXME(
"unknown flag %08x\n", uiFlags );
1331 if ( lpbiIn ==
NULL || lpBits ==
NULL )
1333 WARN(
"invalid argument\n");
1337 if ( lpbiOut !=
NULL )
1343 cbHdr +=
sizeof(
DWORD)*3;
1355 TRACE(
"get format\n" );
1360 if (!(pHdr = heap_alloc_zero(cbHdr +
sizeof(
RGBQUAD) * 256)))
1383 if ( biSizeImage == 0 )
1386 TRACE(
"call ICDecompressBegin\n" );
1390 bInDecompress =
TRUE;
1392 TRACE(
"cbHdr %d, biSizeImage %d\n", cbHdr, biSizeImage );
1397 WARN(
"out of memory\n" );
1403 memcpy( pMem, lpbiOut, cbHdr );
1405 TRACE(
"call ICDecompress\n" );
1411 if ( bInDecompress )
1418 if ( !bSucceeded && hMem !=
NULL )
1433 TRACE(
"(%p, 0x%08x, %p, %p, %p)\n", pc, uiFlags, lpBits, pfKey, plSize);
1451 icComp->lpInput = lpBits;
1465 TRACE(
"Key frame\n");
1478 TRACE(
"returning: %p, compressed frame size %u\n", icComp->lpOutput, *plSize);
1479 return icComp->lpOutput;
1504 TRACE(
"(%p)\n", pc);
1515 if (
src->bmiHeader.biClrUsed)
1516 num_colors =
min(
src->bmiHeader.biClrUsed, 256);
1518 num_colors =
src->bmiHeader.biBitCount > 8 ? 0 : 1 <<
src->bmiHeader.biBitCount;
1567 ERR(
"Could not get output format from compressor\n");
1578 ERR(
"Bad codec! Invalid output frame size, guessing from input\n");
1582 TRACE(
"Input: %ux%u, fcc %s, bpp %u, size %u\n",
1587 TRACE(
"Output: %ux%u, fcc %s, bpp %u, size %u\n",
1608 "\tkey/data/quality: %i/%i/%i\n",
1641 CHAR szFunctionName[20];
1646 FIXME(
"(%p,%d,%d), semi-stub!\n",lpofn,bSave,bUnicode);
1648 lstrcpyA(szFunctionName, (bSave ?
"GetSaveFileName" :
"GetOpenFileName"));
1649 lstrcatA(szFunctionName, (bUnicode ?
"W" :
"A"));
1652 if (hComdlg32 ==
NULL)
1656 if (fnGetFileName ==
NULL)
1663 ret = fnGetFileName(lpofn);
1674 FIXME(
"(%p), semi-stub!\n", lpofn);
1684 FIXME(
"(%p), semi-stub!\n", lpofn);
1694 FIXME(
"(%p), semi-stub!\n", lpofn);
1704 FIXME(
"(%p), semi-stub!\n", lpofn);
ACPI_SIZE strlen(const char *String)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#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 *)
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 GLenum type
GLuint GLuint GLsizei count
GLint GLint GLsizei GLsizei height
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
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
#define compare_fourcc(fcc1, fcc2)
_Check_return_ _CRTIMP int __cdecl isalnum(_In_ int _C)
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
static const WCHAR desc[]
static HMODULE MODULEINFO DWORD cb
struct @1673::@1674 driver
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)
static const char * wine_dbgstr_fcc(DWORD fcc)
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
#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
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define HKEY_LOCAL_MACHINE
BOOL WINAPI SetWindowTextA(_In_ HWND, _In_opt_ LPCSTR)
#define GetWindowLongPtrW
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
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)