From 5387718c6fbd36b7a6309122f4af68d475a344e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Thu, 12 May 2022 21:27:38 +0200 Subject: [PATCH] wmadmod: Remove unnecessary DLL. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was initially meant for tests, which are all now in dlls/mf as well, and for the WMA decoder. The class is supposed to live in this DLL but because of the winegstreamer implementation, it cannot in Wine. Signed-off-by: Rémi Bernon Signed-off-by: Alexandre Julliard --- configure | 3 - configure.ac | 2 - dlls/wmadmod/Makefile.in | 4 - dlls/wmadmod/main.c | 35 ------- dlls/wmadmod/tests/Makefile.in | 5 - dlls/wmadmod/tests/wmadmod.c | 178 --------------------------------- dlls/wmadmod/wmadmod.spec | 5 - 7 files changed, 232 deletions(-) delete mode 100644 dlls/wmadmod/Makefile.in delete mode 100644 dlls/wmadmod/main.c delete mode 100644 dlls/wmadmod/tests/Makefile.in delete mode 100644 dlls/wmadmod/tests/wmadmod.c delete mode 100644 dlls/wmadmod/wmadmod.spec diff --git a/configure b/configure index 64396a1c69b..4b8649c843b 100755 --- a/configure +++ b/configure @@ -1452,7 +1452,6 @@ enable_winusb enable_wlanapi enable_wlanui enable_wldap32 -enable_wmadmod enable_wmasf enable_wmi enable_wmiutils @@ -22027,8 +22026,6 @@ wine_fn_config_makefile dlls/wlanapi/tests enable_tests wine_fn_config_makefile dlls/wlanui enable_wlanui wine_fn_config_makefile dlls/wldap32 enable_wldap32 wine_fn_config_makefile dlls/wldap32/tests enable_tests -wine_fn_config_makefile dlls/wmadmod enable_wmadmod -wine_fn_config_makefile dlls/wmadmod/tests enable_tests wine_fn_config_makefile dlls/wmasf enable_wmasf wine_fn_config_makefile dlls/wmi enable_wmi wine_fn_config_makefile dlls/wmiutils enable_wmiutils diff --git a/configure.ac b/configure.ac index e4abc79997b..fbdfbb05b3b 100644 --- a/configure.ac +++ b/configure.ac @@ -3195,8 +3195,6 @@ WINE_CONFIG_MAKEFILE(dlls/wlanapi/tests) WINE_CONFIG_MAKEFILE(dlls/wlanui) WINE_CONFIG_MAKEFILE(dlls/wldap32) WINE_CONFIG_MAKEFILE(dlls/wldap32/tests) -WINE_CONFIG_MAKEFILE(dlls/wmadmod) -WINE_CONFIG_MAKEFILE(dlls/wmadmod/tests) WINE_CONFIG_MAKEFILE(dlls/wmasf) WINE_CONFIG_MAKEFILE(dlls/wmi) WINE_CONFIG_MAKEFILE(dlls/wmiutils) diff --git a/dlls/wmadmod/Makefile.in b/dlls/wmadmod/Makefile.in deleted file mode 100644 index 49fe2f92e08..00000000000 --- a/dlls/wmadmod/Makefile.in +++ /dev/null @@ -1,4 +0,0 @@ -MODULE = wmadmod.dll - -C_SRCS = \ - main.c diff --git a/dlls/wmadmod/main.c b/dlls/wmadmod/main.c deleted file mode 100644 index 2a13143eeae..00000000000 --- a/dlls/wmadmod/main.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2022 Rémi Bernon 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 - -#include "windef.h" -#include "winbase.h" - -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(wmadmod); - -/************************************************************************* - * DllGetClassObject (WMADMOD.@) - */ -HRESULT WINAPI DllGetClassObject( REFCLSID clsid, REFIID iid, void **obj ) -{ - FIXME( "class %s not available\n", debugstr_guid( clsid ) ); - return CLASS_E_CLASSNOTAVAILABLE; -} diff --git a/dlls/wmadmod/tests/Makefile.in b/dlls/wmadmod/tests/Makefile.in deleted file mode 100644 index 254d9322b2b..00000000000 --- a/dlls/wmadmod/tests/Makefile.in +++ /dev/null @@ -1,5 +0,0 @@ -TESTDLL = wmadmod.dll -IMPORTS = dmoguids msdmo ole32 strmiids uuid mfuuid wmcodecdspuuid - -C_SRCS = \ - wmadmod.c diff --git a/dlls/wmadmod/tests/wmadmod.c b/dlls/wmadmod/tests/wmadmod.c deleted file mode 100644 index b49b609dac3..00000000000 --- a/dlls/wmadmod/tests/wmadmod.c +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright 2022 Rémi Bernon 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 - -#include "windef.h" -#include "winbase.h" - -#define COBJMACROS -#include "dmo.h" -#include "uuids.h" -#include "control.h" -#include "wmcodecdsp.h" -#include "mftransform.h" - -#include "wine/test.h" - -static void test_DMOGetTypes(void) -{ - DMO_PARTIAL_MEDIATYPE expect_output[2] = - { - {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_PCM}, - {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_IEEE_FLOAT}, - }; - DMO_PARTIAL_MEDIATYPE expect_input[4] = - { - {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_MSAUDIO1}, - {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_WMAUDIO2}, - {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_WMAUDIO3}, - {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_WMAUDIO_LOSSLESS}, - }; - - ULONG i, input_count = 0, output_count = 0; - DMO_PARTIAL_MEDIATYPE output[16] = {{{0}}}; - DMO_PARTIAL_MEDIATYPE input[16] = {{{0}}}; - HRESULT hr; - - hr = DMOGetTypes( &CLSID_CWMADecMediaObject, ARRAY_SIZE(input), &input_count, input, - ARRAY_SIZE(output), &output_count, output ); - ok( hr == S_OK, "DMOGetTypes returned %#lx\n", hr ); - ok( input_count == ARRAY_SIZE(expect_input), "got input_count %lu\n", input_count ); - ok( output_count == ARRAY_SIZE(expect_output), "got output_count %lu\n", output_count ); - - for (i = 0; i < input_count; ++i) - { - winetest_push_context( "in %lu", i ); - ok( IsEqualGUID( &input[i].type, &expect_input[i].type ), - "got type %s\n", debugstr_guid( &input[i].type ) ); - ok( IsEqualGUID( &input[i].subtype, &expect_input[i].subtype ), - "got subtype %s\n", debugstr_guid( &input[i].subtype ) ); - winetest_pop_context(); - } - - for (i = 0; i < output_count; ++i) - { - winetest_push_context( "out %lu", i ); - ok( IsEqualGUID( &output[i].type, &expect_output[i].type ), - "got type %s\n", debugstr_guid( &output[i].type ) ); - ok( IsEqualGUID( &output[i].subtype, &expect_output[i].subtype ), - "got subtype %s\n", debugstr_guid( &output[i].subtype ) ); - winetest_pop_context(); - } -} - -static HRESULT WINAPI outer_QueryInterface( IUnknown *iface, REFIID iid, void **obj ) -{ - if (IsEqualGUID( iid, &IID_IUnknown )) - { - *obj = (IUnknown *)iface; - return S_OK; - } - - ok( 0, "unexpected call %s\n", debugstr_guid( iid ) ); - return E_NOINTERFACE; -} - -static ULONG WINAPI outer_AddRef( IUnknown *iface ) -{ - return 2; -} - -static ULONG WINAPI outer_Release( IUnknown *iface ) -{ - return 1; -} - -static IUnknownVtbl outer_vtbl = -{ - outer_QueryInterface, - outer_AddRef, - outer_Release, -}; - -static IUnknown outer = {&outer_vtbl}; - -#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c) -static void check_interface_(unsigned int line, void *iface, REFIID iid, BOOL supported) -{ - HRESULT hr, expected_hr; - IUnknown *tmp; - - expected_hr = supported ? S_OK : E_NOINTERFACE; - - hr = IUnknown_QueryInterface( (IUnknown *)iface, iid, (void **)&tmp ); - ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr); - if (SUCCEEDED(hr)) IUnknown_Release( tmp ); -} - -static void test_interfaces(void) -{ - IUnknown *unknown, *tmp_unknown; - IMediaObject *media_object; - IPropertyBag *property_bag; - IMFTransform *transform; - HRESULT hr; - ULONG ref; - - hr = CoCreateInstance( &CLSID_CWMADecMediaObject, &outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, - (void **)&unknown ); - ok( hr == S_OK, "CoCreateInstance returned %#lx\n", hr ); - hr = IUnknown_QueryInterface( unknown, &IID_IMFTransform, (void **)&transform ); - ok( hr == S_OK, "QueryInterface returned %#lx\n", hr ); - hr = IUnknown_QueryInterface( unknown, &IID_IMediaObject, (void **)&media_object ); - ok( hr == S_OK, "QueryInterface returned %#lx\n", hr ); - hr = IUnknown_QueryInterface( unknown, &IID_IPropertyBag, (void **)&property_bag ); - ok( hr == S_OK, "QueryInterface returned %#lx\n", hr ); - hr = IUnknown_QueryInterface( media_object, &IID_IUnknown, (void **)&tmp_unknown ); - ok( hr == S_OK, "QueryInterface returned %#lx\n", hr ); - - ok( unknown != &outer, "got outer IUnknown\n" ); - ok( transform != (void *)unknown, "got IUnknown == IMFTransform\n" ); - ok( media_object != (void *)unknown, "got IUnknown == IMediaObject\n" ); - ok( property_bag != (void *)unknown, "got IUnknown == IPropertyBag\n" ); - ok( tmp_unknown != unknown, "got inner IUnknown\n" ); - - check_interface( unknown, &IID_IPersistPropertyBag, FALSE ); - check_interface( unknown, &IID_IAMFilterMiscFlags, FALSE ); - check_interface( unknown, &IID_IMediaSeeking, FALSE ); - check_interface( unknown, &IID_IMediaPosition, FALSE ); - check_interface( unknown, &IID_IReferenceClock, FALSE ); - check_interface( unknown, &IID_IBasicAudio, FALSE ); - - ref = IUnknown_Release( tmp_unknown ); - ok( ref == 1, "Release returned %lu\n", ref ); - ref = IPropertyBag_Release( property_bag ); - ok( ref == 1, "Release returned %lu\n", ref ); - ref = IMediaObject_Release( media_object ); - ok( ref == 1, "Release returned %lu\n", ref ); - ref = IMFTransform_Release( transform ); - ok( ref == 1, "Release returned %lu\n", ref ); - ref = IUnknown_Release( unknown ); - ok( ref == 0, "Release returned %lu\n", ref ); -} - -START_TEST( wmadmod ) -{ - CoInitialize( NULL ); - - test_DMOGetTypes(); - test_interfaces(); - - CoUninitialize(); -} diff --git a/dlls/wmadmod/wmadmod.spec b/dlls/wmadmod/wmadmod.spec deleted file mode 100644 index 25104058c7d..00000000000 --- a/dlls/wmadmod/wmadmod.spec +++ /dev/null @@ -1,5 +0,0 @@ -@ stub CreateInstance -@ stdcall -private DllCanUnloadNow() -@ stdcall -private DllGetClassObject(ptr ptr ptr) -@ stdcall -private DllRegisterServer() -@ stdcall -private DllUnregisterServer()