Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
January 2022
- 86 participants
- 2418 messages
Re: [PATCH 3/3] winegstreamer: Stub implement WMA decoder DMO / MF transform.
by Rémi Bernon
On 1/28/22 10:36, Marvin wrote:
> Hi,
>
> While running your changed tests, I think I found new failures.
> Being a bot and all I'm not very good at pattern recognition, so I might be
> wrong, but could you please double-check?
>
> Full results can be found at:
> https://testbot.winehq.org/JobDetails.pl?Key=106301
>
> Your paranoid android.
>
>
> === build (build log) ===
>
> error: patch failed: dlls/winegstreamer/Makefile.in:1
> Task: Patch failed to apply
>
> === debian11 (build log) ===
>
> error: patch failed: dlls/winegstreamer/Makefile.in:1
> Task: Patch failed to apply
>
> === debian11 (build log) ===
>
> error: patch failed: dlls/winegstreamer/Makefile.in:1
> Task: Patch failed to apply
Ah... well, I'll resend it, but I'll wait to see whether it should be split.
--
Rémi Bernon <rbernon(a)codeweavers.com>
Jan. 28, 2022
Re: [PATCH 3/3] winegstreamer: Stub implement WMA decoder DMO / MF transform.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=106301
Your paranoid android.
=== build (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:1
Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:1
Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:1
Task: Patch failed to apply
Jan. 28, 2022
Re: Arbitrary DOS device name
by Daniel Kucera
On 2022-01-27 21:49, Daniel Kucera wrote:
> On 2022-01-27 20:52, Daniel Kucera wrote:
>>
>> Despite these problems, the libusb seems to work correctly in the
>> driver and I can query it's version:
>>
>
> It probably won't be that easy. After some more calls, it is failing:
>
> 002a:trace:hantek:DriverEntry Using libusb v1.0.24.11584
>
> tem32\winedevice.exe: ../../libusb/os/threads_posix.h:46:
> usbi_mutex_lock: Assertion `pthread_mutex_lock(mutex) == 0' failed.
> wine: Assertion failed at address 00007FDB2BA96808 (thread 002a),
> starting debugger...
> 002d:fixme:dbghelp:elf_search_auxv can't find symbol in module
> 002d:fixme:dbghelp:elf_search_auxv can't find symbol in module
> 002d:fixme:dbghelp:elf_search_auxv can't find symbol in module
> 002d:fixme:dbghelp:elf_search_auxv can't find symbol in module
> 002d:fixme:dbghelp:elf_search_auxv can't find symbol in module
> 002d:fixme:dbghelp:elf_search_auxv can't find symbol in module
> 002d:fixme:dbghelp:elf_search_auxv can't find symbol in module
> 002d:fixme:dbghelp:elf_search_auxv can't find symbol in module
> 002d:fixme:dbghelp:elf_search_auxv can't find symbol in module
> 002d:fixme:dbghelp:elf_search_auxv can't find symbol in module
> 002d:fixme:dbghelp:elf_search_auxv can't find symbol in module
> 000f:err:service:process_send_command service protocol error - failed
> to read pipe r = 0 count = 0!
> 000f:fixme:service:scmdatabase_autostart_services Auto-start service
> L"Hantek" failed to start: 1053
>
>
> Is there any native wine usb api I can call?
Good news!
I have been able to fix configure and mutex issue by removing
-mno-cygwin option from Makefile.in
The other linker issue I fixed by specifying the lib name as:
IMPORTS = ntoskrnl usb-1.0.
this removes the last dot and anything behind.
The driver works and I can run my scope app on wine!
My last question is how to build the driver off the tree? Is there any
example/guide?
I plan to write a blog post after everything is solved to help others
trying to write a driver.
Thank you.
Jan. 28, 2022
[PATCH 4/4] ntoskrnl.exe: Enforce path case in WM_DEVICECHANGE notifications.
by Rémi Bernon
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/dinput/tests/hotplug.c | 2 --
dlls/ntoskrnl.exe/pnp.c | 8 +++++++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/dinput/tests/hotplug.c b/dlls/dinput/tests/hotplug.c
index 9993ce23c99..10aaeebcfd3 100644
--- a/dlls/dinput/tests/hotplug.c
+++ b/dlls/dinput/tests/hotplug.c
@@ -201,14 +201,12 @@ static LRESULT CALLBACK devnotify_wndproc( HWND hwnd, UINT msg, WPARAM wparam, L
debugstr_guid( &iface->dbcc_classguid ) );
ok( iface->dbcc_size >= offsetof( DEV_BROADCAST_DEVICEINTERFACE_W, dbcc_name[wcslen( iface->dbcc_name ) + 1] ),
"got dbcc_size %u\n", iface->dbcc_size );
- todo_wine
ok( !wcsncmp( iface->dbcc_name, expect_prefix, wcslen( expect_prefix ) ),
"got dbcc_name %s\n", debugstr_w(iface->dbcc_name) );
upper_end = wcschr( iface->dbcc_name + wcslen( expect_prefix ), '#' );
name_end = iface->dbcc_name + wcslen( iface->dbcc_name ) + 1;
ok( !!upper_end, "got dbcc_name %s\n", debugstr_w(iface->dbcc_name) );
- todo_wine
ok( all_upper( iface->dbcc_name, upper_end ), "got dbcc_name %s\n", debugstr_w(iface->dbcc_name) );
ok( all_lower( upper_end, name_end ), "got dbcc_name %s\n", debugstr_w(iface->dbcc_name) );
diff --git a/dlls/ntoskrnl.exe/pnp.c b/dlls/ntoskrnl.exe/pnp.c
index 8d3481b2a72..ee1402e0e49 100644
--- a/dlls/ntoskrnl.exe/pnp.c
+++ b/dlls/ntoskrnl.exe/pnp.c
@@ -698,11 +698,11 @@ NTSTATUS WINAPI IoSetDeviceInterfaceState( UNICODE_STRING *name, BOOLEAN enable
size_t namelen = name->Length / sizeof(WCHAR);
DEV_BROADCAST_DEVICEINTERFACE_W *broadcast;
+ WCHAR *path, *refstr, *p, *upper_end;
struct device_interface *iface;
HANDLE iface_key, control_key;
OBJECT_ATTRIBUTES attr = {0};
struct wine_rb_entry *entry;
- WCHAR *path, *refstr, *p;
UNICODE_STRING string;
DWORD data = enable;
NTSTATUS ret;
@@ -788,6 +788,12 @@ NTSTATUS WINAPI IoSetDeviceInterfaceState( UNICODE_STRING *name, BOOLEAN enable
broadcast->dbcc_classguid = iface->interface_class;
lstrcpynW( broadcast->dbcc_name, name->Buffer, namelen + 1 );
if (namelen > 1) broadcast->dbcc_name[1] = '\\';
+
+ upper_end = wcschr( broadcast->dbcc_name, '#' );
+ if (upper_end) upper_end = wcschr( upper_end + 1, '#' );
+ while (upper_end && upper_end-- != broadcast->dbcc_name)
+ *upper_end = towupper( *upper_end );
+
send_devicechange( enable ? DBT_DEVICEARRIVAL : DBT_DEVICEREMOVECOMPLETE, broadcast, len );
heap_free( broadcast );
}
--
2.34.1
Jan. 28, 2022
[PATCH 3/4] sechost: Support device interface notifications filtering.
by Rémi Bernon
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/dinput/tests/hotplug.c | 7 ++-----
dlls/sechost/service.c | 20 ++++++++++++++++++--
2 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/dlls/dinput/tests/hotplug.c b/dlls/dinput/tests/hotplug.c
index 5cb8358e3a9..9993ce23c99 100644
--- a/dlls/dinput/tests/hotplug.c
+++ b/dlls/dinput/tests/hotplug.c
@@ -197,7 +197,6 @@ static LRESULT CALLBACK devnotify_wndproc( HWND hwnd, UINT msg, WPARAM wparam, L
winetest_push_context( "%u", device_change_count );
- todo_wine_if( IsEqualGUID( &iface->dbcc_classguid, &control_class ) && !device_change_all )
ok( IsEqualGUID( &iface->dbcc_classguid, &expect_guid ), "got dbch_classguid %s\n",
debugstr_guid( &iface->dbcc_classguid ) );
ok( iface->dbcc_size >= offsetof( DEV_BROADCAST_DEVICEINTERFACE_W, dbcc_name[wcslen( iface->dbcc_name ) + 1] ),
@@ -315,8 +314,7 @@ static void test_RegisterDeviceNotification(void)
while (PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE )) DispatchMessageW( &msg );
device_change_count = 0;
- if (!strcmp( winetest_platform, "wine" )) device_change_expect = 4;
- else device_change_expect = 2;
+ device_change_expect = 2;
device_change_hwnd = hwnd;
device_change_all = FALSE;
stop_event = CreateEventW( NULL, FALSE, FALSE, NULL );
@@ -349,8 +347,7 @@ static void test_RegisterDeviceNotification(void)
while (PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE )) DispatchMessageW( &msg );
device_change_count = 0;
- if (!strcmp( winetest_platform, "wine" )) device_change_expect = 4;
- else device_change_expect = 2;
+ device_change_expect = 2;
device_change_hwnd = hwnd;
device_change_all = FALSE;
stop_event = CreateEventW( NULL, FALSE, FALSE, NULL );
diff --git a/dlls/sechost/service.c b/dlls/sechost/service.c
index 00485869e9c..fee3b52b6ac 100644
--- a/dlls/sechost/service.c
+++ b/dlls/sechost/service.c
@@ -1990,6 +1990,23 @@ struct device_notify_registration
struct device_notification_details details;
};
+static BOOL notification_filter_matches( DEV_BROADCAST_HDR *filter, DEV_BROADCAST_HDR *event )
+{
+ if (!filter->dbch_devicetype) return TRUE;
+ if (filter->dbch_devicetype != event->dbch_devicetype) return FALSE;
+
+ if (filter->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE)
+ {
+ DEV_BROADCAST_DEVICEINTERFACE_W *filter_iface = (DEV_BROADCAST_DEVICEINTERFACE_W *)filter;
+ DEV_BROADCAST_DEVICEINTERFACE_W *event_iface = (DEV_BROADCAST_DEVICEINTERFACE_W *)event;
+ if (filter_iface->dbcc_size == offsetof(DEV_BROADCAST_DEVICEINTERFACE_W, dbcc_classguid)) return TRUE;
+ return IsEqualGUID( &filter_iface->dbcc_classguid, &event_iface->dbcc_classguid );
+ }
+
+ FIXME( "Filter dbch_devicetype %u not implemented\n", filter->dbch_devicetype );
+ return TRUE;
+}
+
static DWORD WINAPI device_notify_proc( void *arg )
{
WCHAR endpoint[] = L"\\pipe\\wine_plugplay";
@@ -2074,6 +2091,7 @@ static DWORD WINAPI device_notify_proc( void *arg )
for (i = 0; i < details_copy_nelems; i++)
{
+ if (!notification_filter_matches( &details_copy[i].filter.header, (DEV_BROADCAST_HDR *)buf )) continue;
details_copy[i].cb( details_copy[i].handle, code, (DEV_BROADCAST_HDR *)buf );
}
MIDL_user_free(buf);
@@ -2104,8 +2122,6 @@ HDEVNOTIFY WINAPI I_ScRegisterDeviceNotification( struct device_notification_det
TRACE("callback %p, handle %p, filter %p, flags %#x\n", details->cb, details->handle, filter, flags);
- if (filter) FIXME("Notification filters are not yet implemented.\n");
-
if (!(registration = heap_alloc(sizeof(struct device_notify_registration))))
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
--
2.34.1
Jan. 28, 2022
[PATCH 2/4] user32: Remove FIXME from RegisterDeviceNotificationA.
by Rémi Bernon
There's no conversion to do, the device name in the filter is ignored.
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/user32/input.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 67ca7e178f2..fde4b9965ed 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -1186,13 +1186,9 @@ extern BOOL WINAPI I_ScUnregisterDeviceNotification( HDEVNOTIFY handle );
*
* See RegisterDeviceNotificationW.
*/
-HDEVNOTIFY WINAPI RegisterDeviceNotificationA(HANDLE hRecipient, LPVOID pNotificationFilter, DWORD dwFlags)
+HDEVNOTIFY WINAPI RegisterDeviceNotificationA( HANDLE handle, void *filter, DWORD flags )
{
- TRACE("(hwnd=%p, filter=%p,flags=0x%08x)\n",
- hRecipient,pNotificationFilter,dwFlags);
- if (pNotificationFilter)
- FIXME("The notification filter will requires an A->W when filter support is implemented\n");
- return RegisterDeviceNotificationW(hRecipient, pNotificationFilter, dwFlags);
+ return RegisterDeviceNotificationW( handle, filter, flags );
}
/***********************************************************************
--
2.34.1
Jan. 28, 2022
[PATCH 1/4] user32: Add a filter member to device_notification_details.
by Rémi Bernon
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/dinput/tests/hotplug.c | 24 -----------------------
dlls/sechost/service.c | 5 +++++
dlls/user32/input.c | 39 ++++++++++++++++++++++++++++++++++++-
3 files changed, 43 insertions(+), 25 deletions(-)
diff --git a/dlls/dinput/tests/hotplug.c b/dlls/dinput/tests/hotplug.c
index d271d9bc1db..5cb8358e3a9 100644
--- a/dlls/dinput/tests/hotplug.c
+++ b/dlls/dinput/tests/hotplug.c
@@ -252,87 +252,63 @@ static void test_RegisterDeviceNotification(void)
SetLastError( 0xdeadbeef );
devnotify = RegisterDeviceNotificationA( NULL, NULL, 0 );
- todo_wine
ok( !devnotify, "RegisterDeviceNotificationA succeeded\n" );
- todo_wine
ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError() );
- if (devnotify) UnregisterDeviceNotification( devnotify );
SetLastError( 0xdeadbeef );
devnotify = RegisterDeviceNotificationA( (HWND)0xdeadbeef, NULL, 0 );
- todo_wine
ok( !devnotify, "RegisterDeviceNotificationA succeeded\n" );
- todo_wine
ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError() );
- if (devnotify) UnregisterDeviceNotification( devnotify );
SetLastError( 0xdeadbeef );
devnotify = RegisterDeviceNotificationA( hwnd, NULL, 2 );
- todo_wine
ok( !devnotify, "RegisterDeviceNotificationA succeeded\n" );
- todo_wine
ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError() );
- if (devnotify) UnregisterDeviceNotification( devnotify );
SetLastError( 0xdeadbeef );
memset( header, 0, sizeof(DEV_BROADCAST_OEM) );
header->dbch_size = sizeof(DEV_BROADCAST_OEM);
header->dbch_devicetype = DBT_DEVTYP_OEM;
devnotify = RegisterDeviceNotificationA( hwnd, header, 0 );
- todo_wine
ok( !devnotify, "RegisterDeviceNotificationA succeeded\n" );
- todo_wine
ok( GetLastError() == ERROR_INVALID_DATA || GetLastError() == ERROR_SERVICE_SPECIFIC_ERROR,
"got error %u\n", GetLastError() );
- if (devnotify) UnregisterDeviceNotification( devnotify );
SetLastError( 0xdeadbeef );
memset( header, 0, sizeof(DEV_BROADCAST_DEVNODE) );
header->dbch_size = sizeof(DEV_BROADCAST_DEVNODE);
header->dbch_devicetype = DBT_DEVTYP_DEVNODE;
devnotify = RegisterDeviceNotificationA( hwnd, header, 0 );
- todo_wine
ok( !devnotify, "RegisterDeviceNotificationA succeeded\n" );
- todo_wine
ok( GetLastError() == ERROR_INVALID_DATA || GetLastError() == ERROR_SERVICE_SPECIFIC_ERROR,
"got error %u\n", GetLastError() );
- if (devnotify) UnregisterDeviceNotification( devnotify );
SetLastError( 0xdeadbeef );
memset( header, 0, sizeof(DEV_BROADCAST_VOLUME) );
header->dbch_size = sizeof(DEV_BROADCAST_VOLUME);
header->dbch_devicetype = DBT_DEVTYP_VOLUME;
devnotify = RegisterDeviceNotificationA( hwnd, header, 0 );
- todo_wine
ok( !devnotify, "RegisterDeviceNotificationA succeeded\n" );
- todo_wine
ok( GetLastError() == ERROR_INVALID_DATA || GetLastError() == ERROR_SERVICE_SPECIFIC_ERROR,
"got error %u\n", GetLastError() );
- if (devnotify) UnregisterDeviceNotification( devnotify );
SetLastError( 0xdeadbeef );
memset( header, 0, sizeof(DEV_BROADCAST_PORT_A) );
header->dbch_size = sizeof(DEV_BROADCAST_PORT_A);
header->dbch_devicetype = DBT_DEVTYP_PORT;
devnotify = RegisterDeviceNotificationA( hwnd, header, 0 );
- todo_wine
ok( !devnotify, "RegisterDeviceNotificationA succeeded\n" );
- todo_wine
ok( GetLastError() == ERROR_INVALID_DATA || GetLastError() == ERROR_SERVICE_SPECIFIC_ERROR,
"got error %u\n", GetLastError() );
- if (devnotify) UnregisterDeviceNotification( devnotify );
SetLastError( 0xdeadbeef );
memset( header, 0, sizeof(DEV_BROADCAST_NET) );
header->dbch_size = sizeof(DEV_BROADCAST_NET);
header->dbch_devicetype = DBT_DEVTYP_NET;
devnotify = RegisterDeviceNotificationA( hwnd, header, 0 );
- todo_wine
ok( !devnotify, "RegisterDeviceNotificationA succeeded\n" );
- todo_wine
ok( GetLastError() == ERROR_INVALID_DATA || GetLastError() == ERROR_SERVICE_SPECIFIC_ERROR,
"got error %u\n", GetLastError() );
- if (devnotify) UnregisterDeviceNotification( devnotify );
devnotify = RegisterDeviceNotificationA( hwnd, &iface_filter_a, DEVICE_NOTIFY_WINDOW_HANDLE );
ok( !!devnotify, "RegisterDeviceNotificationA failed, error %u\n", GetLastError() );
diff --git a/dlls/sechost/service.c b/dlls/sechost/service.c
index 4dfb40b4bac..00485869e9c 100644
--- a/dlls/sechost/service.c
+++ b/dlls/sechost/service.c
@@ -1974,6 +1974,11 @@ struct device_notification_details
{
DWORD (CALLBACK *cb)(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header);
HANDLE handle;
+ union
+ {
+ DEV_BROADCAST_HDR header;
+ DEV_BROADCAST_DEVICEINTERFACE_W iface;
+ } filter;
};
static HANDLE device_notify_thread;
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 08a00c0e647..67ca7e178f2 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -1170,6 +1170,11 @@ struct device_notification_details
{
DWORD (CALLBACK *cb)(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header);
HANDLE handle;
+ union
+ {
+ DEV_BROADCAST_HDR header;
+ DEV_BROADCAST_DEVICEINTERFACE_W iface;
+ } filter;
};
extern HDEVNOTIFY WINAPI I_ScRegisterDeviceNotification( struct device_notification_details *details,
@@ -1196,11 +1201,43 @@ HDEVNOTIFY WINAPI RegisterDeviceNotificationA(HANDLE hRecipient, LPVOID pNotific
HDEVNOTIFY WINAPI RegisterDeviceNotificationW( HANDLE handle, void *filter, DWORD flags )
{
struct device_notification_details details;
+ DEV_BROADCAST_HDR *header = filter;
TRACE("handle %p, filter %p, flags %#x\n", handle, filter, flags);
if (flags & ~(DEVICE_NOTIFY_SERVICE_HANDLE | DEVICE_NOTIFY_ALL_INTERFACE_CLASSES))
- FIXME("unhandled flags %#x\n", flags);
+ {
+ SetLastError( ERROR_INVALID_PARAMETER );
+ return NULL;
+ }
+
+ if (!(flags & DEVICE_NOTIFY_SERVICE_HANDLE) && !IsWindow( handle ))
+ {
+ SetLastError( ERROR_INVALID_PARAMETER );
+ return NULL;
+ }
+
+ if (!header) details.filter.header.dbch_devicetype = 0;
+ else if (header->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE)
+ {
+ DEV_BROADCAST_DEVICEINTERFACE_W *iface = (DEV_BROADCAST_DEVICEINTERFACE_W *)header;
+ details.filter.iface = *iface;
+
+ if (flags & DEVICE_NOTIFY_ALL_INTERFACE_CLASSES)
+ details.filter.iface.dbcc_size = offsetof( DEV_BROADCAST_DEVICEINTERFACE_W, dbcc_classguid );
+ else
+ details.filter.iface.dbcc_size = offsetof( DEV_BROADCAST_DEVICEINTERFACE_W, dbcc_name );
+ }
+ else if (header->dbch_devicetype == DBT_DEVTYP_HANDLE)
+ {
+ FIXME( "DBT_DEVTYP_HANDLE filter type not implemented\n" );
+ details.filter.header.dbch_devicetype = 0;
+ }
+ else
+ {
+ SetLastError( ERROR_INVALID_DATA );
+ return NULL;
+ }
details.handle = handle;
--
2.34.1
Jan. 28, 2022
[PATCH 3/3] winegstreamer: Stub implement WMA decoder DMO / MF transform.
by Rémi Bernon
Final Fantasy XIV intro videos require media_object_GetStreamCount and
property_bag_Write to return S_OK in order to not get stuck.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51931
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52391
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
This could be split in a separate commits to only have E_NOTIMPL first,
but it could cause a temporary regression.
dlls/mf/tests/mf.c | 1 -
dlls/winegstreamer/Makefile.in | 5 +-
dlls/winegstreamer/gst_private.h | 1 +
dlls/winegstreamer/main.c | 26 +
dlls/winegstreamer/mfplat.c | 28 +-
dlls/winegstreamer/quartz_parser.c | 2 +-
dlls/winegstreamer/winegstreamer_classes.idl | 6 +
dlls/winegstreamer/wma_decoder.c | 553 +++++++++++++++++++
dlls/wmadmod/tests/wmadmod.c | 5 -
9 files changed, 617 insertions(+), 10 deletions(-)
create mode 100644 dlls/winegstreamer/wma_decoder.c
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index a9467a7fdb6..526ee3f14ad 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -5742,7 +5742,6 @@ static void test_wma_decoder(void)
&transform, &class_id))
goto failed;
- todo_wine
check_interface(transform, &IID_IMediaObject, TRUE);
/* check default media types */
diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in
index 76e6aeed54d..c53e914e246 100644
--- a/dlls/winegstreamer/Makefile.in
+++ b/dlls/winegstreamer/Makefile.in
@@ -1,7 +1,7 @@
MODULE = winegstreamer.dll
UNIXLIB = winegstreamer.so
IMPORTLIB = winegstreamer
-IMPORTS = strmbase ole32
+IMPORTS = strmbase ole32 msdmo
DELAYIMPORTS = mfplat
EXTRAINCL = $(GSTREAMER_CFLAGS)
EXTRALIBS = $(GSTREAMER_LIBS) $(PTHREAD_LIBS)
@@ -15,7 +15,8 @@ C_SRCS = \
wg_parser.c \
wm_asyncreader.c \
wm_reader.c \
- wm_syncreader.c
+ wm_syncreader.c \
+ wma_decoder.c
IDL_SRCS = \
winegstreamer_classes.idl
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h
index 9e1d67417d4..222bce3b2c7 100644
--- a/dlls/winegstreamer/gst_private.h
+++ b/dlls/winegstreamer/gst_private.h
@@ -102,6 +102,7 @@ HRESULT avi_splitter_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
HRESULT decodebin_parser_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
HRESULT mpeg_splitter_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
HRESULT wave_parser_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
+HRESULT wma_decoder_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
bool amt_from_wg_format(AM_MEDIA_TYPE *mt, const struct wg_format *format, bool wm);
bool amt_to_wg_format(const AM_MEDIA_TYPE *mt, struct wg_format *format);
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c
index ac9a3201792..260dd208e2f 100644
--- a/dlls/winegstreamer/main.c
+++ b/dlls/winegstreamer/main.c
@@ -25,7 +25,9 @@
#include "gst_private.h"
#include "winternl.h"
#include "rpcproxy.h"
+#include "dmoreg.h"
#include "gst_guids.h"
+#include "wmcodecdsp.h"
static unixlib_handle_t unix_handle;
@@ -339,6 +341,7 @@ static struct class_factory avi_splitter_cf = {{&class_factory_vtbl}, avi_splitt
static struct class_factory decodebin_parser_cf = {{&class_factory_vtbl}, decodebin_parser_create};
static struct class_factory mpeg_splitter_cf = {{&class_factory_vtbl}, mpeg_splitter_create};
static struct class_factory wave_parser_cf = {{&class_factory_vtbl}, wave_parser_create};
+static struct class_factory wma_decoder_cf = {{&class_factory_vtbl}, wma_decoder_create};
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
{
@@ -361,6 +364,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
factory = &mpeg_splitter_cf;
else if (IsEqualGUID(clsid, &CLSID_WAVEParser))
factory = &wave_parser_cf;
+ else if (IsEqualGUID(clsid, &CLSID_WMADecMediaObject))
+ factory = &wma_decoder_cf;
else
{
FIXME("%s not implemented, returning CLASS_E_CLASSNOTAVAILABLE.\n", debugstr_guid(clsid));
@@ -522,6 +527,19 @@ static const REGFILTER2 reg_decodebin_parser =
HRESULT WINAPI DllRegisterServer(void)
{
+ DMO_PARTIAL_MEDIATYPE wma_decoder_output[2] =
+ {
+ {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_PCM},
+ {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_IEEE_FLOAT},
+ };
+ DMO_PARTIAL_MEDIATYPE wma_decoder_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},
+ };
+
IFilterMapper2 *mapper;
HRESULT hr;
@@ -543,6 +561,10 @@ HRESULT WINAPI DllRegisterServer(void)
IFilterMapper2_Release(mapper);
+ if (FAILED(hr = DMORegister(L"WMA Decoder DMO", &CLSID_WMADecMediaObject, &DMOCATEGORY_AUDIO_DECODER,
+ 0, ARRAY_SIZE(wma_decoder_input), wma_decoder_input, ARRAY_SIZE(wma_decoder_output), wma_decoder_output)))
+ return hr;
+
return mfplat_DllRegisterServer();
}
@@ -566,5 +588,9 @@ HRESULT WINAPI DllUnregisterServer(void)
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_WAVEParser);
IFilterMapper2_Release(mapper);
+
+ if (FAILED(hr = DMOUnregister(&CLSID_WMADecMediaObject, &DMOCATEGORY_AUDIO_DECODER)))
+ return hr;
+
return S_OK;
}
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
index 5404728ba83..6a58f444204 100644
--- a/dlls/winegstreamer/mfplat.c
+++ b/dlls/winegstreamer/mfplat.c
@@ -21,6 +21,7 @@
#include "ks.h"
#include "ksmedia.h"
+#include "wmcodecdsp.h"
#include "initguid.h"
#include "mfapi.h"
@@ -442,6 +443,20 @@ static const GUID *audio_converter_supported_types[] =
&MFAudioFormat_Float,
};
+static WCHAR wma_decoderW[] = L"WMAudio Decoder MFT";
+static const GUID *wma_decoder_input_types[] =
+{
+ &MEDIASUBTYPE_MSAUDIO1,
+ &MFAudioFormat_WMAudioV8,
+ &MFAudioFormat_WMAudioV9,
+ &MFAudioFormat_WMAudio_Lossless,
+};
+static const GUID *wma_decoder_output_types[] =
+{
+ &MFAudioFormat_PCM,
+ &MFAudioFormat_Float,
+};
+
static const struct mft
{
const GUID *clsid;
@@ -467,13 +482,24 @@ mfts[] =
ARRAY_SIZE(audio_converter_supported_types),
audio_converter_supported_types,
},
+ {
+ &CLSID_WMADecMediaObject,
+ &MFT_CATEGORY_AUDIO_DECODER,
+ wma_decoderW,
+ MFT_ENUM_FLAG_SYNCMFT,
+ &MFMediaType_Audio,
+ ARRAY_SIZE(wma_decoder_input_types),
+ wma_decoder_input_types,
+ ARRAY_SIZE(wma_decoder_output_types),
+ wma_decoder_output_types,
+ },
};
HRESULT mfplat_DllRegisterServer(void)
{
unsigned int i, j;
HRESULT hr;
- MFT_REGISTER_TYPE_INFO input_types[2], output_types[2];
+ MFT_REGISTER_TYPE_INFO input_types[4], output_types[2];
for (i = 0; i < ARRAY_SIZE(mfts); i++)
{
diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c
index 8532fc1af8b..e8d56d54785 100644
--- a/dlls/winegstreamer/quartz_parser.c
+++ b/dlls/winegstreamer/quartz_parser.c
@@ -29,8 +29,8 @@
#include "dvdmedia.h"
#include "mmreg.h"
#include "ks.h"
-#include "initguid.h"
#include "wmcodecdsp.h"
+#include "initguid.h"
#include "ksmedia.h"
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl
index 072ec90eea4..90dc1dc839b 100644
--- a/dlls/winegstreamer/winegstreamer_classes.idl
+++ b/dlls/winegstreamer/winegstreamer_classes.idl
@@ -67,3 +67,9 @@ coclass GStreamerByteStreamHandler {}
uuid(6a170414-aad9-4693-b806-3a0c47c570d6)
]
coclass WINEAudioConverter { }
+
+[
+ threading(both),
+ uuid(2eeb4adf-4578-4d10-bca7-bb955f56320a)
+]
+coclass CWMADecMediaObject {};
diff --git a/dlls/winegstreamer/wma_decoder.c b/dlls/winegstreamer/wma_decoder.c
new file mode 100644
index 00000000000..f034c34395e
--- /dev/null
+++ b/dlls/winegstreamer/wma_decoder.c
@@ -0,0 +1,553 @@
+/* WMA Decoder DMO / MF Transform
+ *
+ * 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 "gst_private.h"
+
+#include "mfapi.h"
+#include "mferror.h"
+#include "mfobjects.h"
+#include "mftransform.h"
+#include "wmcodecdsp.h"
+
+#include "wine/debug.h"
+#include "wine/heap.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(wmadec);
+
+struct wma_decoder
+{
+ IUnknown IUnknown_inner;
+ IMFTransform IMFTransform_iface;
+ IMediaObject IMediaObject_iface;
+ IPropertyBag IPropertyBag_iface;
+ IUnknown *outer;
+ LONG refcount;
+};
+
+static inline struct wma_decoder *impl_from_IUnknown(IUnknown *iface)
+{
+ return CONTAINING_RECORD(iface, struct wma_decoder, IUnknown_inner);
+}
+
+static HRESULT WINAPI unknown_QueryInterface(IUnknown *iface, REFIID iid, void **out)
+{
+ struct wma_decoder *decoder = impl_from_IUnknown(iface);
+
+ TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
+
+ if (IsEqualGUID(iid, &IID_IUnknown))
+ *out = &decoder->IUnknown_inner;
+ else if (IsEqualGUID(iid, &IID_IMFTransform))
+ *out = &decoder->IMFTransform_iface;
+ else if (IsEqualGUID(iid, &IID_IMediaObject))
+ *out = &decoder->IMediaObject_iface;
+ else if (IsEqualIID(iid, &IID_IPropertyBag))
+ *out = &decoder->IPropertyBag_iface;
+ else
+ {
+ *out = NULL;
+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
+ return E_NOINTERFACE;
+ }
+
+ IUnknown_AddRef((IUnknown *)*out);
+ return S_OK;
+}
+
+static ULONG WINAPI unknown_AddRef(IUnknown *iface)
+{
+ struct wma_decoder *decoder = impl_from_IUnknown(iface);
+ ULONG refcount = InterlockedIncrement(&decoder->refcount);
+
+ TRACE("iface %p increasing refcount to %u.\n", decoder, refcount);
+
+ return refcount;
+}
+
+static ULONG WINAPI unknown_Release(IUnknown *iface)
+{
+ struct wma_decoder *decoder = impl_from_IUnknown(iface);
+ ULONG refcount = InterlockedDecrement(&decoder->refcount);
+
+ TRACE("iface %p decreasing refcount to %u.\n", decoder, refcount);
+
+ if (!refcount)
+ free(decoder);
+
+ return refcount;
+}
+
+static const IUnknownVtbl unknown_vtbl =
+{
+ unknown_QueryInterface,
+ unknown_AddRef,
+ unknown_Release,
+};
+
+static struct wma_decoder *impl_from_IMFTransform(IMFTransform *iface)
+{
+ return CONTAINING_RECORD(iface, struct wma_decoder, IMFTransform_iface);
+}
+
+static HRESULT WINAPI transform_QueryInterface(IMFTransform *iface, REFIID iid, void **out)
+{
+ struct wma_decoder *decoder = impl_from_IMFTransform(iface);
+ return IUnknown_QueryInterface(decoder->outer, iid, out);
+}
+
+static ULONG WINAPI transform_AddRef(IMFTransform *iface)
+{
+ struct wma_decoder *decoder = impl_from_IMFTransform(iface);
+ return IUnknown_AddRef(decoder->outer);
+}
+
+static ULONG WINAPI transform_Release(IMFTransform *iface)
+{
+ struct wma_decoder *decoder = impl_from_IMFTransform(iface);
+ return IUnknown_Release(decoder->outer);
+}
+
+static HRESULT WINAPI transform_GetStreamLimits(IMFTransform *iface, DWORD *input_minimum,
+ DWORD *input_maximum, DWORD *output_minimum, DWORD *output_maximum)
+{
+ FIXME("iface %p, input_minimum %p, input_maximum %p, output_minimum %p, output_maximum %p stub!\n",
+ iface, input_minimum, input_maximum, output_minimum, output_maximum);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetStreamCount(IMFTransform *iface, DWORD *inputs, DWORD *outputs)
+{
+ FIXME("iface %p, inputs %p, outputs %p stub!\n", iface, inputs, outputs);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetStreamIDs(IMFTransform *iface, DWORD input_size, DWORD *inputs,
+ DWORD output_size, DWORD *outputs)
+{
+ FIXME("iface %p, input_size %u, inputs %p, output_size %u, outputs %p stub!\n", iface,
+ input_size, inputs, output_size, outputs);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info)
+{
+ FIXME("iface %p, id %u, info %p stub!\n", iface, id, info);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info)
+{
+ FIXME("iface %p, id %u, info %p stub!\n", iface, id, info);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetAttributes(IMFTransform *iface, IMFAttributes **attributes)
+{
+ FIXME("iface %p, attributes %p stub!\n", iface, attributes);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetInputStreamAttributes(IMFTransform *iface, DWORD id, IMFAttributes **attributes)
+{
+ FIXME("iface %p, id %u, attributes %p stub!\n", iface, id, attributes);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetOutputStreamAttributes(IMFTransform *iface, DWORD id, IMFAttributes **attributes)
+{
+ FIXME("iface %p, id %u, attributes %p stub!\n", iface, id, attributes);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_DeleteInputStream(IMFTransform *iface, DWORD id)
+{
+ FIXME("iface %p, id %u stub!\n", iface, id);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_AddInputStreams(IMFTransform *iface, DWORD streams, DWORD *ids)
+{
+ FIXME("iface %p, streams %u, ids %p stub!\n", iface, streams, ids);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetInputAvailableType(IMFTransform *iface, DWORD id, DWORD index,
+ IMFMediaType **type)
+{
+ FIXME("iface %p, id %u, index %u, type %p stub!\n", iface, id, index, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetOutputAvailableType(IMFTransform *iface, DWORD id, DWORD index,
+ IMFMediaType **type)
+{
+ FIXME("iface %p, id %u, index %u, type %p stub!\n", iface, id, index, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
+{
+ FIXME("iface %p, id %u, type %p, flags %#x stub!\n", iface, id, type, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
+{
+ FIXME("iface %p, id %u, type %p, flags %#x stub!\n", iface, id, type, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
+{
+ FIXME("iface %p, id %u, type %p stub!\n", iface, id, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
+{
+ FIXME("iface %p, id %u, type %p stub!\n", iface, id, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags)
+{
+ FIXME("iface %p, id %u, flags %p stub!\n", iface, id, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetOutputStatus(IMFTransform *iface, DWORD *flags)
+{
+ FIXME("iface %p, flags %p stub!\n", iface, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_SetOutputBounds(IMFTransform *iface, LONGLONG lower, LONGLONG upper)
+{
+ FIXME("iface %p, lower %s, upper %s stub!\n", iface, wine_dbgstr_longlong(lower),
+ wine_dbgstr_longlong(upper));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_ProcessEvent(IMFTransform *iface, DWORD id, IMFMediaEvent *event)
+{
+ FIXME("iface %p, id %u, event %p stub!\n", iface, id, event);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_ProcessMessage(IMFTransform *iface, MFT_MESSAGE_TYPE message, ULONG_PTR param)
+{
+ FIXME("iface %p, message %#x, param %p stub!\n", iface, message, (void *)param);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags)
+{
+ FIXME("iface %p, id %u, sample %p, flags %#x stub!\n", iface, id, sample, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_ProcessOutput(IMFTransform *iface, DWORD flags, DWORD count,
+ MFT_OUTPUT_DATA_BUFFER *samples, DWORD *status)
+{
+ FIXME("iface %p, flags %#x, count %u, samples %p, status %p stub!\n", iface, flags, count, samples, status);
+ return E_NOTIMPL;
+}
+
+static const IMFTransformVtbl transform_vtbl =
+{
+ transform_QueryInterface,
+ transform_AddRef,
+ transform_Release,
+ transform_GetStreamLimits,
+ transform_GetStreamCount,
+ transform_GetStreamIDs,
+ transform_GetInputStreamInfo,
+ transform_GetOutputStreamInfo,
+ transform_GetAttributes,
+ transform_GetInputStreamAttributes,
+ transform_GetOutputStreamAttributes,
+ transform_DeleteInputStream,
+ transform_AddInputStreams,
+ transform_GetInputAvailableType,
+ transform_GetOutputAvailableType,
+ transform_SetInputType,
+ transform_SetOutputType,
+ transform_GetInputCurrentType,
+ transform_GetOutputCurrentType,
+ transform_GetInputStatus,
+ transform_GetOutputStatus,
+ transform_SetOutputBounds,
+ transform_ProcessEvent,
+ transform_ProcessMessage,
+ transform_ProcessInput,
+ transform_ProcessOutput,
+};
+
+static inline struct wma_decoder *impl_from_IMediaObject(IMediaObject *iface)
+{
+ return CONTAINING_RECORD(iface, struct wma_decoder, IMediaObject_iface);
+}
+
+static HRESULT WINAPI media_object_QueryInterface(IMediaObject *iface, REFIID iid, void **obj)
+{
+ struct wma_decoder *decoder = impl_from_IMediaObject(iface);
+ return IUnknown_QueryInterface(decoder->outer, iid, obj);
+}
+
+static ULONG WINAPI media_object_AddRef(IMediaObject *iface)
+{
+ struct wma_decoder *decoder = impl_from_IMediaObject(iface);
+ return IUnknown_AddRef(decoder->outer);
+}
+
+static ULONG WINAPI media_object_Release(IMediaObject *iface)
+{
+ struct wma_decoder *decoder = impl_from_IMediaObject(iface);
+ return IUnknown_Release(decoder->outer);
+}
+
+static HRESULT WINAPI media_object_GetStreamCount(IMediaObject *iface, DWORD *input, DWORD *output)
+{
+ FIXME("iface %p, input %p, output %p semi-stub!\n", iface, input, output);
+ *input = *output = 1;
+ return S_OK;
+}
+
+static HRESULT WINAPI media_object_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
+{
+ FIXME("iface %p, index %u, flags %p stub!\n", iface, index, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
+{
+ FIXME("iface %p, index %u, flags %p stub!\n", iface, index, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetInputType(IMediaObject *iface, DWORD index, DWORD type_index,
+ DMO_MEDIA_TYPE *type)
+{
+ FIXME("iface %p, index %u, type_index %u, type %p stub!\n", iface, index, type_index, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetOutputType(IMediaObject *iface, DWORD index, DWORD type_index,
+ DMO_MEDIA_TYPE *type)
+{
+ FIXME("iface %p, index %u, type_index %u, type %p stub!\n", iface, index, type_index, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_SetInputType(IMediaObject *iface, DWORD index,
+ const DMO_MEDIA_TYPE *type, DWORD flags)
+{
+ FIXME("iface %p, index %u, type %p, flags %#x stub!\n", iface, index, type, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_SetOutputType(IMediaObject *iface, DWORD index,
+ const DMO_MEDIA_TYPE *type, DWORD flags)
+{
+ FIXME("iface %p, index %u, type %p, flags %#x stub!\n", iface, index, type, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *type)
+{
+ FIXME("iface %p, index %u, type %p stub!\n", iface, index, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *type)
+{
+ FIXME("iface %p, index %u, type %p stub!\n", iface, index, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size,
+ DWORD *lookahead, DWORD *alignment)
+{
+ FIXME("iface %p, index %u, size %p, lookahead %p, alignment %p stub!\n", iface, index, size,
+ lookahead, alignment);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment)
+{
+ FIXME("iface %p, index %u, size %p, alignment %p stub!\n", iface, index, size, alignment);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency)
+{
+ FIXME("iface %p, index %u, latency %p stub!\n", iface, index, latency);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency)
+{
+ FIXME("iface %p, index %u, latency %s stub!\n", iface, index, wine_dbgstr_longlong(latency));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_Flush(IMediaObject *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_Discontinuity(IMediaObject *iface, DWORD index)
+{
+ FIXME("iface %p, index %u stub!\n", iface, index);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_AllocateStreamingResources(IMediaObject *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_FreeStreamingResources(IMediaObject *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags)
+{
+ FIXME("iface %p, index %u, flags %p stub!\n", iface, index, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_ProcessInput(IMediaObject *iface, DWORD index,
+ IMediaBuffer *buffer, DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME timelength)
+{
+ FIXME("iface %p, index %u, buffer %p, flags %#x, timestamp %s, timelength %s stub!\n", iface,
+ index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(timelength));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count,
+ DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status)
+{
+ FIXME("iface %p, flags %#x, count %u, buffers %p, status %p stub!\n", iface, flags, count, buffers, status);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_Lock(IMediaObject *iface, LONG lock)
+{
+ FIXME("iface %p, lock %d stub!\n", iface, lock);
+ return E_NOTIMPL;
+}
+
+static const IMediaObjectVtbl media_object_vtbl =
+{
+ media_object_QueryInterface,
+ media_object_AddRef,
+ media_object_Release,
+ media_object_GetStreamCount,
+ media_object_GetInputStreamInfo,
+ media_object_GetOutputStreamInfo,
+ media_object_GetInputType,
+ media_object_GetOutputType,
+ media_object_SetInputType,
+ media_object_SetOutputType,
+ media_object_GetInputCurrentType,
+ media_object_GetOutputCurrentType,
+ media_object_GetInputSizeInfo,
+ media_object_GetOutputSizeInfo,
+ media_object_GetInputMaxLatency,
+ media_object_SetInputMaxLatency,
+ media_object_Flush,
+ media_object_Discontinuity,
+ media_object_AllocateStreamingResources,
+ media_object_FreeStreamingResources,
+ media_object_GetInputStatus,
+ media_object_ProcessInput,
+ media_object_ProcessOutput,
+ media_object_Lock,
+};
+
+static inline struct wma_decoder *impl_from_IPropertyBag(IPropertyBag *iface)
+{
+ return CONTAINING_RECORD(iface, struct wma_decoder, IPropertyBag_iface);
+}
+
+static HRESULT WINAPI property_bag_QueryInterface(IPropertyBag *iface, REFIID iid, void **out)
+{
+ struct wma_decoder *filter = impl_from_IPropertyBag(iface);
+ return IUnknown_QueryInterface(filter->outer, iid, out);
+}
+
+static ULONG WINAPI property_bag_AddRef(IPropertyBag *iface)
+{
+ struct wma_decoder *filter = impl_from_IPropertyBag(iface);
+ return IUnknown_AddRef(filter->outer);
+}
+
+static ULONG WINAPI property_bag_Release(IPropertyBag *iface)
+{
+ struct wma_decoder *filter = impl_from_IPropertyBag(iface);
+ return IUnknown_Release(filter->outer);
+}
+
+static HRESULT WINAPI property_bag_Read(IPropertyBag *iface, const WCHAR *prop_name, VARIANT *value,
+ IErrorLog *error_log)
+{
+ FIXME("iface %p, prop_name %s, value %p, error_log %p stub!\n", iface, debugstr_w(prop_name), value, error_log);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI property_bag_Write(IPropertyBag *iface, const WCHAR *prop_name, VARIANT *value)
+{
+ FIXME("iface %p, prop_name %s, value %p stub!\n", iface, debugstr_w(prop_name), value);
+ return S_OK;
+}
+
+static const IPropertyBagVtbl property_bag_vtbl =
+{
+ property_bag_QueryInterface,
+ property_bag_AddRef,
+ property_bag_Release,
+ property_bag_Read,
+ property_bag_Write,
+};
+
+HRESULT wma_decoder_create(IUnknown *outer, IUnknown **out)
+{
+ struct wma_decoder *decoder;
+
+ TRACE("outer %p, out %p.\n", outer, out);
+
+ if (!(decoder = calloc(1, sizeof(*decoder))))
+ return E_OUTOFMEMORY;
+
+ decoder->IUnknown_inner.lpVtbl = &unknown_vtbl;
+ decoder->IMFTransform_iface.lpVtbl = &transform_vtbl;
+ decoder->IMediaObject_iface.lpVtbl = &media_object_vtbl;
+ decoder->IPropertyBag_iface.lpVtbl = &property_bag_vtbl;
+ decoder->refcount = 1;
+ decoder->outer = outer ? outer : &decoder->IUnknown_inner;
+
+ *out = &decoder->IUnknown_inner;
+ TRACE("Created decoder %p\n", *out);
+ return S_OK;
+}
diff --git a/dlls/wmadmod/tests/wmadmod.c b/dlls/wmadmod/tests/wmadmod.c
index 820f38ebbbd..c163c054424 100644
--- a/dlls/wmadmod/tests/wmadmod.c
+++ b/dlls/wmadmod/tests/wmadmod.c
@@ -52,11 +52,8 @@ static void test_DMOGetTypes(void)
hr = DMOGetTypes( &CLSID_CWMADecMediaObject, ARRAY_SIZE(input), &input_count, input,
ARRAY_SIZE(output), &output_count, output );
- todo_wine
ok( hr == S_OK, "DMOGetTypes returned %#x\n", hr );
- todo_wine
ok( input_count == ARRAY_SIZE(expect_input), "got input_count %u\n", input_count );
- todo_wine
ok( output_count == ARRAY_SIZE(expect_output), "got output_count %u\n", output_count );
for (i = 0; i < input_count; ++i)
@@ -135,9 +132,7 @@ static void test_interfaces(void)
hr = CoCreateInstance( &CLSID_CWMADecMediaObject, &outer, CLSCTX_INPROC_SERVER, &IID_IUnknown,
(void **)&unknown );
- todo_wine
ok( hr == S_OK, "CoCreateInstance returned %#x\n", hr );
- if (FAILED(hr)) return;
hr = IUnknown_QueryInterface( unknown, &IID_IMFTransform, (void **)&transform );
ok( hr == S_OK, "QueryInterface returned %#x\n", hr );
hr = IUnknown_QueryInterface( unknown, &IID_IMediaObject, (void **)&media_object );
--
2.34.1
Jan. 28, 2022
[PATCH 2/3] wmadmod: Introduce new DLL and tests.
by Rémi Bernon
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51931
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52391
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
configure.ac | 2 +
dlls/wmadmod/Makefile.in | 4 +
dlls/wmadmod/main.c | 35 +++++++
dlls/wmadmod/tests/Makefile.in | 5 +
dlls/wmadmod/tests/wmadmod.c | 183 +++++++++++++++++++++++++++++++++
dlls/wmadmod/wmadmod.spec | 5 +
6 files changed, 234 insertions(+)
create mode 100644 dlls/wmadmod/Makefile.in
create mode 100644 dlls/wmadmod/main.c
create mode 100644 dlls/wmadmod/tests/Makefile.in
create mode 100644 dlls/wmadmod/tests/wmadmod.c
create mode 100644 dlls/wmadmod/wmadmod.spec
diff --git a/configure.ac b/configure.ac
index eb481554960..30cecd790cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3422,6 +3422,8 @@ 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
new file mode 100644
index 00000000000..49fe2f92e08
--- /dev/null
+++ b/dlls/wmadmod/Makefile.in
@@ -0,0 +1,4 @@
+MODULE = wmadmod.dll
+
+C_SRCS = \
+ main.c
diff --git a/dlls/wmadmod/main.c b/dlls/wmadmod/main.c
new file mode 100644
index 00000000000..2a13143eeae
--- /dev/null
+++ b/dlls/wmadmod/main.c
@@ -0,0 +1,35 @@
+/*
+ * 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 <stdarg.h>
+
+#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
new file mode 100644
index 00000000000..254d9322b2b
--- /dev/null
+++ b/dlls/wmadmod/tests/Makefile.in
@@ -0,0 +1,5 @@
+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
new file mode 100644
index 00000000000..820f38ebbbd
--- /dev/null
+++ b/dlls/wmadmod/tests/wmadmod.c
@@ -0,0 +1,183 @@
+/*
+ * 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 <stdarg.h>
+
+#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 );
+ todo_wine
+ ok( hr == S_OK, "DMOGetTypes returned %#x\n", hr );
+ todo_wine
+ ok( input_count == ARRAY_SIZE(expect_input), "got input_count %u\n", input_count );
+ todo_wine
+ ok( output_count == ARRAY_SIZE(expect_output), "got output_count %u\n", output_count );
+
+ for (i = 0; i < input_count; ++i)
+ {
+ winetest_push_context( "in %u", 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 %u", 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 %#x, expected %#x.\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 );
+ todo_wine
+ ok( hr == S_OK, "CoCreateInstance returned %#x\n", hr );
+ if (FAILED(hr)) return;
+ hr = IUnknown_QueryInterface( unknown, &IID_IMFTransform, (void **)&transform );
+ ok( hr == S_OK, "QueryInterface returned %#x\n", hr );
+ hr = IUnknown_QueryInterface( unknown, &IID_IMediaObject, (void **)&media_object );
+ ok( hr == S_OK, "QueryInterface returned %#x\n", hr );
+ hr = IUnknown_QueryInterface( unknown, &IID_IPropertyBag, (void **)&property_bag );
+ ok( hr == S_OK, "QueryInterface returned %#x\n", hr );
+ hr = IUnknown_QueryInterface( media_object, &IID_IUnknown, (void **)&tmp_unknown );
+ ok( hr == S_OK, "QueryInterface returned %#x\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 %u\n", ref );
+ ref = IPropertyBag_Release( property_bag );
+ ok( ref == 1, "Release returned %u\n", ref );
+ ref = IMediaObject_Release( media_object );
+ ok( ref == 1, "Release returned %u\n", ref );
+ ref = IMFTransform_Release( transform );
+ ok( ref == 1, "Release returned %u\n", ref );
+ ref = IUnknown_Release( unknown );
+ ok( ref == 0, "Release returned %u\n", ref );
+}
+
+START_TEST( wmadmod )
+{
+ CoInitialize( NULL );
+
+ test_DMOGetTypes();
+ test_interfaces();
+
+ CoUninitialize();
+}
diff --git a/dlls/wmadmod/wmadmod.spec b/dlls/wmadmod/wmadmod.spec
new file mode 100644
index 00000000000..25104058c7d
--- /dev/null
+++ b/dlls/wmadmod/wmadmod.spec
@@ -0,0 +1,5 @@
+@ stub CreateInstance
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
--
2.34.1
Jan. 28, 2022
[PATCH 1/3] include: Add more WMA GUIDs to wmcodecdsp.idl.
by Rémi Bernon
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51931
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52391
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
include/wmcodecdsp.idl | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/wmcodecdsp.idl b/include/wmcodecdsp.idl
index 809e528d7e2..2d74790179c 100644
--- a/include/wmcodecdsp.idl
+++ b/include/wmcodecdsp.idl
@@ -21,6 +21,9 @@ import "strmif.idl";
cpp_quote("DEFINE_GUID(MEDIASUBTYPE_I420,0x30323449,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
cpp_quote("DEFINE_GUID(MEDIASUBTYPE_MSAUDIO1,0x00000160,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
+cpp_quote("DEFINE_GUID(MEDIASUBTYPE_WMAUDIO2,0x00000161,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
+cpp_quote("DEFINE_GUID(MEDIASUBTYPE_WMAUDIO3,0x00000162,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
+cpp_quote("DEFINE_GUID(MEDIASUBTYPE_WMAUDIO_LOSSLESS,0x00000163,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
[
uuid(bbeea841-0a63-4f52-a7ab-a9b3a84ed38a)
--
2.34.1
Jan. 28, 2022