From: Brendan McGrath <bmcgrath@codeweavers.com> --- configure.ac | 1 + dlls/iyuv_32/Makefile.in | 5 + dlls/iyuv_32/iyuv.c | 191 ++++++++++++++++++++++++++++++++++++++ dlls/iyuv_32/iyuv_32.spec | 1 + loader/wine.inf.in | 2 + 5 files changed, 200 insertions(+) create mode 100644 dlls/iyuv_32/Makefile.in create mode 100644 dlls/iyuv_32/iyuv.c create mode 100644 dlls/iyuv_32/iyuv_32.spec diff --git a/configure.ac b/configure.ac index 9a437851996..953edcce7b9 100644 --- a/configure.ac +++ b/configure.ac @@ -2880,6 +2880,7 @@ WINE_CONFIG_MAKEFILE(dlls/irprops.cpl) WINE_CONFIG_MAKEFILE(dlls/itircl) WINE_CONFIG_MAKEFILE(dlls/itss) WINE_CONFIG_MAKEFILE(dlls/itss/tests) +WINE_CONFIG_MAKEFILE(dlls/iyuv_32) WINE_CONFIG_MAKEFILE(dlls/joy.cpl) WINE_CONFIG_MAKEFILE(dlls/jscript) WINE_CONFIG_MAKEFILE(dlls/jscript/tests) diff --git a/dlls/iyuv_32/Makefile.in b/dlls/iyuv_32/Makefile.in new file mode 100644 index 00000000000..6b9b11569b1 --- /dev/null +++ b/dlls/iyuv_32/Makefile.in @@ -0,0 +1,5 @@ +MODULE = iyuv_32.dll +IMPORTS = user32 mfplat ole32 + +SOURCES = \ + iyuv.c diff --git a/dlls/iyuv_32/iyuv.c b/dlls/iyuv_32/iyuv.c new file mode 100644 index 00000000000..e114fde50e0 --- /dev/null +++ b/dlls/iyuv_32/iyuv.c @@ -0,0 +1,191 @@ +/* + * iyuv Video "Decoder" + * Copyright 2026 Brendan McGrath for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "windef.h" +#include <stdarg.h> +#include <stdlib.h> + +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" + +#include "commdlg.h" +#include "initguid.h" +#include "vfw.h" +#include "wmcodecdsp.h" + +#include "wine/debug.h" + +#define COBJMACROS +#include "mfapi.h" +#include "mferror.h" +#include "mfobjects.h" +#include "mfidl.h" +#include "mftransform.h" + +WINE_DEFAULT_DEBUG_CHANNEL(iyuv_32); + +static HINSTANCE IYUV_32_module; + +static LRESULT IYUV_Open(const ICINFO *icinfo) +{ + FIXME("DRV_OPEN %p\n", icinfo); + + return 0; +} + +static LRESULT IYUV_DecompressQuery(const BITMAPINFOHEADER *in, const BITMAPINFOHEADER *out) +{ + FIXME("ICM_DECOMPRESS_QUERY %p %p\n", in, out); + + return ICERR_UNSUPPORTED; +} + +static LRESULT IYUV_DecompressGetFormat(BITMAPINFOHEADER *in, BITMAPINFOHEADER *out) +{ + FIXME("ICM_DECOMPRESS_GETFORMAT %p %p\n", in, out); + + return ICERR_UNSUPPORTED; +} + +static LRESULT IYUV_DecompressBegin(IMFTransform *transform, const BITMAPINFOHEADER *in, const BITMAPINFOHEADER *out) +{ + FIXME("ICM_DECOMPRESS_BEGIN %p %p %p\n", transform, in, out); + + return ICERR_UNSUPPORTED; +} + +static LRESULT IYUV_Decompress(IMFTransform *transform, const ICDECOMPRESS *params) +{ + FIXME("ICM_DECOMPRESS %p %p\n", transform, params); + + return ICERR_UNSUPPORTED; +} + +static LRESULT IYUV_GetInfo(ICINFO *icinfo, DWORD size) +{ + FIXME("ICM_GETINFO %p %lu\n", icinfo, size); + + return ICERR_UNSUPPORTED; +} + +/*********************************************************************** + * DriverProc (IYUV_32.@) + */ +LRESULT WINAPI IYUV_DriverProc(DWORD_PTR driver_id, HDRVR hdrvr, UINT msg, LPARAM param1, LPARAM param2) +{ + IMFTransform *transform = (IMFTransform *)driver_id; + LRESULT r = ICERR_UNSUPPORTED; + + TRACE("%Id %p %04x %08Ix %08Ix\n", driver_id, hdrvr, msg, param1, param2); + + switch (msg) + { + case DRV_LOAD: + TRACE("DRV_LOAD\n"); + r = TRUE; + break; + + case DRV_OPEN: + r = IYUV_Open((ICINFO *)param2); + break; + + case DRV_CLOSE: + TRACE("DRV_CLOSE\n"); + if (transform) + IMFTransform_Release(transform); + r = TRUE; + break; + + case DRV_ENABLE: + case DRV_DISABLE: + case DRV_FREE: + break; + + case ICM_GETINFO: + r = IYUV_GetInfo((ICINFO *)param1, (DWORD)param2); + break; + + case ICM_DECOMPRESS_QUERY: + r = IYUV_DecompressQuery((BITMAPINFOHEADER *)param1, (BITMAPINFOHEADER *)param2); + break; + + case ICM_DECOMPRESS_GET_FORMAT: + r = IYUV_DecompressGetFormat((BITMAPINFOHEADER *)param1, (BITMAPINFOHEADER *)param2); + break; + + case ICM_DECOMPRESS_GET_PALETTE: + FIXME("ICM_DECOMPRESS_GET_PALETTE\n"); + break; + + case ICM_DECOMPRESS: + r = IYUV_Decompress(transform, (ICDECOMPRESS *)param1); + break; + + case ICM_DECOMPRESS_BEGIN: + r = IYUV_DecompressBegin(transform, (BITMAPINFOHEADER *)param1, (BITMAPINFOHEADER *)param2); + break; + + case ICM_DECOMPRESS_END: + r = ICERR_OK; + break; + + case ICM_DECOMPRESSEX_QUERY: + case ICM_DECOMPRESSEX_BEGIN: + case ICM_DECOMPRESSEX: + case ICM_DECOMPRESSEX_END: + /* unsupported */ + break; + + case ICM_COMPRESS_QUERY: + r = ICERR_BADFORMAT; + /* fall through */ + case ICM_COMPRESS_GET_FORMAT: + case ICM_COMPRESS_END: + case ICM_COMPRESS: + FIXME("compression not implemented\n"); + break; + + case ICM_CONFIGURE: + break; + + default: + FIXME("Unknown message: %04x %Id %Id\n", msg, param1, param2); + } + + return r; +} + +/*********************************************************************** + * DllMain + */ +BOOL WINAPI DllMain(HINSTANCE module, DWORD reason, LPVOID reserved) +{ + TRACE("(%p,%lu,%p)\n", module, reason, reserved); + + switch (reason) + { + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(module); + IYUV_32_module = module; + break; + } + return TRUE; +} diff --git a/dlls/iyuv_32/iyuv_32.spec b/dlls/iyuv_32/iyuv_32.spec new file mode 100644 index 00000000000..a0c64b96696 --- /dev/null +++ b/dlls/iyuv_32/iyuv_32.spec @@ -0,0 +1 @@ +@ stdcall -private DriverProc(long long long long long) IYUV_DriverProc diff --git a/loader/wine.inf.in b/loader/wine.inf.in index 8c58fb781e4..fc3f085e68b 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -887,6 +887,8 @@ system.ini, drivers32,,"vidc.mrle=msrle32.dll" system.ini, drivers32,,"vidc.msvc=msvidc32.dll" system.ini, drivers32,,"vidc.cvid=iccvid.dll" system.ini, drivers32,,"vidc.IV50=ir50_32.dll" +system.ini, drivers32,,"vidc.i420=iyuv_32.dll" +system.ini, drivers32,,"vidc.iyuv=iyuv_32.dll" system.ini, drivers32,,"; vidc.IV31=ir32_32.dll" system.ini, drivers32,,"; vidc.IV32=ir32_32.dll" -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10467