From: Brendan McGrath <bmcgrath@codeweavers.com> --- dlls/iyuv_32/Makefile.in | 2 +- dlls/iyuv_32/iyuv.c | 17 ++++++++++------- dlls/iyuv_32/iyuv_private.h | 6 ++++++ dlls/iyuv_32/tests/iyuv_32.c | 3 --- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/dlls/iyuv_32/Makefile.in b/dlls/iyuv_32/Makefile.in index c386ec9b924..e5a261b973f 100644 --- a/dlls/iyuv_32/Makefile.in +++ b/dlls/iyuv_32/Makefile.in @@ -1,5 +1,5 @@ MODULE = iyuv_32.dll -IMPORTS = user32 mfplat ole32 +IMPORTS = user32 mfplat ole32 winegstreamer SOURCES = \ iyuv.c \ diff --git a/dlls/iyuv_32/iyuv.c b/dlls/iyuv_32/iyuv.c index ac169067666..87c52a5975c 100644 --- a/dlls/iyuv_32/iyuv.c +++ b/dlls/iyuv_32/iyuv.c @@ -34,12 +34,7 @@ #include "iyuv_private.h" #include "wine/debug.h" -#define COBJMACROS -#include "mfapi.h" #include "mferror.h" -#include "mfidl.h" -#include "mfobjects.h" -#include "mftransform.h" WINE_DEFAULT_DEBUG_CHANNEL(iyuv_32); @@ -53,9 +48,17 @@ static HINSTANCE IYUV_32_module; static LRESULT IYUV_Open(const ICINFO *icinfo) { - FIXME("DRV_OPEN %p\n", icinfo); + IMFTransform *transform; - return 0; + TRACE("DRV_OPEN %p\n", icinfo); + + if (icinfo && compare_fourcc(icinfo->fccType, ICTYPE_VIDEO)) + return 0; + + if (FAILED(winegstreamer_create_color_converter(&transform))) + transform = NULL; + + return (LRESULT)transform; } static LRESULT IYUV_DecompressQuery(const BITMAPINFOHEADER *in, const BITMAPINFOHEADER *out) diff --git a/dlls/iyuv_32/iyuv_private.h b/dlls/iyuv_32/iyuv_private.h index cf2d392dc44..694f89799d5 100644 --- a/dlls/iyuv_32/iyuv_private.h +++ b/dlls/iyuv_32/iyuv_private.h @@ -21,6 +21,12 @@ #include "windef.h" +#define COBJMACROS +#include "mfapi.h" +#include "mftransform.h" + +HRESULT WINAPI winegstreamer_create_color_converter(IMFTransform **out); + #define IDS_NAME 100 #define IDS_DESCRIPTION 101 diff --git a/dlls/iyuv_32/tests/iyuv_32.c b/dlls/iyuv_32/tests/iyuv_32.c index 97572411e6e..1de936ac7ed 100644 --- a/dlls/iyuv_32/tests/iyuv_32.c +++ b/dlls/iyuv_32/tests/iyuv_32.c @@ -456,10 +456,7 @@ START_TEST(iyuv_32) int i; hic = ICLocate(ICTYPE_VIDEO, FOURCC_I420, &in, NULL, ICMODE_DECOMPRESS); - todo_wine ok(!!hic, "Failed to locate iyuv codec\n"); - if (!hic) - return; ICClose(hic); for (i = 0; i < ARRAY_SIZE(handler); i++) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10549