winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
wine-commits
December 2021
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
569 discussions
Start a n
N
ew thread
Jacek Caban : win32u: Implement NtUserBuildHwndList.
by Alexandre Julliard
23 Dec '21
23 Dec '21
Module: wine Branch: master Commit: 2d56b0a93ce89e8f6e85e1011bac3c3afd6643ed URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2d56b0a93ce89e8f6e85e101…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 21 20:31:29 2021 +0100 win32u: Implement NtUserBuildHwndList. Fixes Quake Champions, spotted by Paul Gofman. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/win32u/syscall.c | 1 + dlls/win32u/tests/win32u.c | 82 +++++++++++++++++++++++++++++++++++++++- dlls/win32u/win32u.spec | 2 +- dlls/win32u/window.c | 31 +++++++++++++++ dlls/wow64win/Makefile.in | 2 +- dlls/wow64win/syscall.h | 1 + dlls/wow64win/user.c | 25 ++++++++++++ dlls/wow64win/wow64win_private.h | 2 + include/ntuser.h | 2 + 9 files changed, 144 insertions(+), 4 deletions(-) diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 3dd37bcf90d..69d0e1ff66f 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -103,6 +103,7 @@ static void * const syscalls[] = NtGdiTransformPoints, NtUserAddClipboardFormatListener, NtUserAttachThreadInput, + NtUserBuildHwndList, NtUserCloseDesktop, NtUserCloseWindowStation, NtUserCreateDesktopEx, diff --git a/dlls/win32u/tests/win32u.c b/dlls/win32u/tests/win32u.c index 13c732b7748..22ce38e2391 100644 --- a/dlls/win32u/tests/win32u.c +++ b/dlls/win32u/tests/win32u.c @@ -104,12 +104,90 @@ static void test_window_props(void) DestroyWindow( hwnd ); } +static BOOL WINAPI count_win( HWND hwnd, LPARAM lparam ) +{ + ULONG *cnt = (ULONG *)lparam; + (*cnt)++; + return TRUE; +} + +static void test_NtUserBuildHwndList(void) +{ + ULONG size, desktop_windows_cnt; + HWND buf[512], hwnd; + NTSTATUS status; + + size = 0; + status = NtUserBuildHwndList( 0, 0, 0, 0, GetCurrentThreadId(), ARRAYSIZE(buf), buf, &size ); + ok( !status, "NtUserBuildHwndList failed: %#x\n", status ); + ok( size == 1, "size = %u\n", size ); + ok( buf[0] == HWND_BOTTOM, "buf[0] = %p\n", buf[0] ); + + hwnd = CreateWindowExA( 0, "static", NULL, WS_POPUP, 0,0,0,0,GetDesktopWindow(),0,0, NULL ); + + size = 0; + status = NtUserBuildHwndList( 0, 0, 0, 0, GetCurrentThreadId(), ARRAYSIZE(buf), buf, &size ); + ok( !status, "NtUserBuildHwndList failed: %#x\n", status ); + ok( size == 3, "size = %u\n", size ); + ok( buf[0] == hwnd, "buf[0] = %p\n", buf[0] ); + ok( buf[2] == HWND_BOTTOM, "buf[0] = %p\n", buf[2] ); + + size = 0; + status = NtUserBuildHwndList( 0, 0, 0, 0, GetCurrentThreadId(), 3, buf, &size ); + ok( !status, "NtUserBuildHwndList failed: %#x\n", status ); + ok( size == 3, "size = %u\n", size ); + + size = 0; + status = NtUserBuildHwndList( 0, 0, 0, 0, GetCurrentThreadId(), 2, buf, &size ); + ok( status == STATUS_BUFFER_TOO_SMALL, "NtUserBuildHwndList failed: %#x\n", status ); + ok( size == 3, "size = %u\n", size ); + + size = 0; + status = NtUserBuildHwndList( 0, 0, 0, 0, GetCurrentThreadId(), 1, buf, &size ); + ok( status == STATUS_BUFFER_TOO_SMALL, "NtUserBuildHwndList failed: %#x\n", status ); + ok( size == 3, "size = %u\n", size ); + + desktop_windows_cnt = 0; + EnumDesktopWindows( 0, count_win, (LPARAM)&desktop_windows_cnt ); + + size = 0; + status = NtUserBuildHwndList( 0, 0, 0, 1, 0, ARRAYSIZE(buf), buf, &size ); + ok( !status, "NtUserBuildHwndList failed: %#x\n", status ); + ok( size == desktop_windows_cnt + 1, "size = %u, expected %u\n", size, desktop_windows_cnt + 1 ); + + desktop_windows_cnt = 0; + EnumDesktopWindows( GetThreadDesktop( GetCurrentThreadId() ), count_win, (LPARAM)&desktop_windows_cnt ); + + size = 0; + status = NtUserBuildHwndList( GetThreadDesktop(GetCurrentThreadId()), 0, 0, 1, 0, + ARRAYSIZE(buf), buf, &size ); + ok( !status, "NtUserBuildHwndList failed: %#x\n", status ); + ok( size == desktop_windows_cnt + 1, "size = %u, expected %u\n", size, desktop_windows_cnt + 1 ); + + size = 0; + status = NtUserBuildHwndList( GetThreadDesktop(GetCurrentThreadId()), 0, 0, 0, 0, + ARRAYSIZE(buf), buf, &size ); + ok( !status, "NtUserBuildHwndList failed: %#x\n", status ); + todo_wine + ok( size > desktop_windows_cnt + 1, "size = %u, expected %u\n", size, desktop_windows_cnt + 1 ); + + size = 0xdeadbeef; + status = NtUserBuildHwndList( UlongToHandle(0xdeadbeef), 0, 0, 0, 0, + ARRAYSIZE(buf), buf, &size ); + ok( status == STATUS_INVALID_HANDLE, "NtUserBuildHwndList failed: %#x\n", status ); + ok( size == 0xdeadbeef, "size = %u\n", size ); + + DestroyWindow( hwnd ); +} + START_TEST(win32u) { /* native win32u.dll fails if user32 is not loaded, so make sure it's fully initialized */ GetDesktopWindow(); - test_NtUserEnumDisplayDevices(); /* Must run before test_NtUserCloseWindowStation. */ - test_NtUserCloseWindowStation(); + test_NtUserEnumDisplayDevices(); test_window_props(); + test_NtUserBuildHwndList(); + + test_NtUserCloseWindowStation(); } diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index e13148af633..5ea2d3afc84 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -763,7 +763,7 @@ @ stub NtUserBlockInput @ stub NtUserBroadcastThemeChangeEvent @ stub NtUserBuildHimcList -@ stub NtUserBuildHwndList +@ stdcall -syscall NtUserBuildHwndList(long long long long long long ptr ptr) @ stub NtUserBuildNameList @ stub NtUserBuildPropList @ stub NtUserCalcMenuBar diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index a84ceeefaf5..e880594d98c 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -23,6 +23,8 @@ #pragma makedep unix #endif +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "win32u_private.h" #include "wine/server.h" @@ -115,3 +117,32 @@ BOOL WINAPI NtUserGetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE *al return ret; } + +/***************************************************************************** + * NtUserBuildHwndList (win32u.@) + */ +NTSTATUS WINAPI NtUserBuildHwndList( HDESK desktop, ULONG unk2, ULONG unk3, ULONG unk4, + ULONG thread_id, ULONG count, HWND *buffer, ULONG *size ) +{ + user_handle_t *list = (user_handle_t *)buffer; + int i; + NTSTATUS status; + + SERVER_START_REQ( get_window_children ) + { + req->desktop = wine_server_obj_handle( desktop ); + req->tid = thread_id; + if (count) wine_server_set_reply( req, list, (count - 1) * sizeof(user_handle_t) ); + status = wine_server_call( req ); + if (status && status != STATUS_BUFFER_TOO_SMALL) return status; + *size = reply->count + 1; + } + SERVER_END_REQ; + if (*size > count) return STATUS_BUFFER_TOO_SMALL; + + /* start from the end since HWND is potentially larger than user_handle_t */ + for (i = *size - 2; i >= 0; i--) + buffer[i] = wine_server_ptr_handle( list[i] ); + buffer[*size - 1] = HWND_BOTTOM; + return STATUS_SUCCESS; +} diff --git a/dlls/wow64win/Makefile.in b/dlls/wow64win/Makefile.in index 99301c4edf1..ce8c42f06f6 100644 --- a/dlls/wow64win/Makefile.in +++ b/dlls/wow64win/Makefile.in @@ -1,5 +1,5 @@ MODULE = wow64win.dll -IMPORTS = win32u ntdll winecrt0 +IMPORTS = wow64 win32u ntdll winecrt0 EXTRADLLFLAGS = -nodefaultlibs -Wl,--image-base,0x6f200000 diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 87ba42bc3cc..54919f7b3fd 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -90,6 +90,7 @@ SYSCALL_ENTRY( NtGdiTransformPoints ) \ SYSCALL_ENTRY( NtUserAddClipboardFormatListener ) \ SYSCALL_ENTRY( NtUserAttachThreadInput ) \ + SYSCALL_ENTRY( NtUserBuildHwndList ) \ SYSCALL_ENTRY( NtUserCloseDesktop ) \ SYSCALL_ENTRY( NtUserCloseWindowStation ) \ SYSCALL_ENTRY( NtUserCreateDesktopEx ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 2f791ddda59..02623d089a4 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -181,6 +181,31 @@ NTSTATUS WINAPI wow64_NtUserRemoveProp( UINT *args ) return HandleToUlong( NtUserRemoveProp( hwnd, str )); } +NTSTATUS WINAPI wow64_NtUserBuildHwndList( UINT *args ) +{ + HDESK desktop = get_handle( &args ); + ULONG unk2 = get_ulong( &args ); + ULONG unk3 = get_ulong( &args ); + ULONG unk4 = get_ulong( &args ); + ULONG thread_id = get_ulong( &args ); + ULONG count = get_ulong( &args ); + UINT32 *buffer32 = get_ptr( &args ); + ULONG *size = get_ptr( &args ); + + HWND *buffer; + ULONG i; + NTSTATUS status; + + if (!(buffer = Wow64AllocateTemp( count * sizeof(*buffer) ))) return STATUS_NO_MEMORY; + + if ((status = NtUserBuildHwndList( desktop, unk2, unk3, unk4, thread_id, count, buffer, size ))) + return status; + + for (i = 0; i < *size; i++) + buffer32[i] = HandleToUlong( buffer[i] ); + return status; +} + NTSTATUS WINAPI wow64_NtUserGetLayeredWindowAttributes( UINT *args ) { HWND hwnd = get_handle( &args ); diff --git a/dlls/wow64win/wow64win_private.h b/dlls/wow64win/wow64win_private.h index 3a6156f41b2..9127085b7b4 100644 --- a/dlls/wow64win/wow64win_private.h +++ b/dlls/wow64win/wow64win_private.h @@ -27,6 +27,8 @@ ALL_WIN32_SYSCALLS #undef SYSCALL_ENTRY +void * WINAPI Wow64AllocateTemp( SIZE_T size ); + struct object_attr64 { OBJECT_ATTRIBUTES attr; diff --git a/include/ntuser.h b/include/ntuser.h index ca430e7b6b1..a9dd8d2e3fd 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -105,6 +105,8 @@ C_ASSERT( sizeof(struct user_thread_info) <= sizeof(((TEB *)0)->Win32ClientInfo) HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags ); BOOL WINAPI NtUserAddClipboardFormatListener( HWND hwnd ); BOOL WINAPI NtUserAttachThreadInput( DWORD from, DWORD to, BOOL attach ); +NTSTATUS WINAPI NtUserBuildHwndList( HDESK desktop, ULONG unk2, ULONG unk3, ULONG unk4, + ULONG thread_id, ULONG count, HWND *buffer, ULONG *size ); ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code ); ULONG_PTR WINAPI NtUserCallTwoParam( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code ); LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd,
1
0
0
0
Keno Fischer : kernel32: Fix CancelIoEx return value.
by Alexandre Julliard
23 Dec '21
23 Dec '21
Module: wine Branch: master Commit: d96975d649969ce44cc9eaae7ae735e2c89c7e69 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d96975d649969ce44cc9eaae…
Author: Keno Fischer <keno(a)juliacomputing.com> Date: Wed Dec 22 07:26:23 2021 -0500 kernel32: Fix CancelIoEx return value. In commit 27ecc6ba5 ("ntdll: Fix iosb handling in NtCancelIoFile()"), NtCancelIoFile(Ex) was updated to return its status rather than unconditionally setting it in io_status->u.Status (though the write was retained in the success case). As a result, in the error case, the kernelbase wrappers now interpret unitialized memory as an error code, since io_status->u.Status is never written. Signed-off-by: Keno Fischer <keno(a)juliacomputing.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/pipe.c | 12 ++++++++++++ dlls/kernelbase/file.c | 6 ++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c index 5af92f8f8a5..f73ef627c67 100644 --- a/dlls/kernel32/tests/pipe.c +++ b/dlls/kernel32/tests/pipe.c @@ -2941,6 +2941,7 @@ static void test_blocking_rw(HANDLE writer, HANDLE reader, DWORD buf_size, BOOL OVERLAPPED read_overlapped, read_overlapped2, write_overlapped, write_overlapped2; char buf[10000], read_buf[10000]; HANDLE flush_thread; + BOOL res; memset(buf, 0xaa, sizeof(buf)); @@ -3074,6 +3075,17 @@ static void test_blocking_rw(HANDLE writer, HANDLE reader, DWORD buf_size, BOOL overlapped_write_sync(writer, buf, 1); test_overlapped_result(reader, &read_overlapped, 1, FALSE); + /* Test that canceling the same operation twice gives a sensible error */ + SetLastError(0xdeadbeef); + overlapped_read_async(reader, read_buf, 1, &read_overlapped2); + res = pCancelIoEx(reader, &read_overlapped2); + ok(res, "CancelIoEx failed with error %d\n", GetLastError()); + res = pCancelIoEx(reader, &read_overlapped2); + ok(!res, "CancelIOEx succeeded unexpectedly"); + ok(GetLastError() == ERROR_NOT_FOUND, + "In CancelIoEx failure, expected ERROR_NOT_FOUND, got %d\n", GetLastError()); + test_overlapped_failure(reader, &read_overlapped2, ERROR_OPERATION_ABORTED); + /* make two async writes, cancel the first one and make sure that we read from the second one */ overlapped_write_async(writer, buf, buf_size+2000, &write_overlapped); overlapped_write_async(writer, buf, 1, &write_overlapped2); diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c index 5c7b649d805..576e03eb62b 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c @@ -2872,8 +2872,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CancelIo( HANDLE handle ) { IO_STATUS_BLOCK io; - NtCancelIoFile( handle, &io ); - return set_ntstatus( io.u.Status ); + return set_ntstatus( NtCancelIoFile( handle, &io ) ); } @@ -2884,8 +2883,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CancelIoEx( HANDLE handle, LPOVERLAPPED overlapped { IO_STATUS_BLOCK io; - NtCancelIoFileEx( handle, (PIO_STATUS_BLOCK)overlapped, &io ); - return set_ntstatus( io.u.Status ); + return set_ntstatus( NtCancelIoFileEx( handle, (PIO_STATUS_BLOCK)overlapped, &io ) ); }
1
0
0
0
Huw Davies : nsiproxy: Allow the name length to be IFNAMSIZ - 1.
by Alexandre Julliard
23 Dec '21
23 Dec '21
Module: wine Branch: master Commit: 65f04bcc9786296a36a3155c115058d22c49b6ad URL:
https://source.winehq.org/git/wine.git/?a=commit;h=65f04bcc9786296a36a3155c…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Dec 23 07:25:19 2021 +0000 nsiproxy: Allow the name length to be IFNAMSIZ - 1. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52214
Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/nsiproxy.sys/ndis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/nsiproxy.sys/ndis.c b/dlls/nsiproxy.sys/ndis.c index 86c4248c9ec..036e8f1eb0c 100644 --- a/dlls/nsiproxy.sys/ndis.c +++ b/dlls/nsiproxy.sys/ndis.c @@ -259,7 +259,7 @@ static struct if_entry *add_entry( DWORD index, char *name ) struct if_entry *entry; int name_len = strlen( name ); - if (name_len >= IFNAMSIZ - 1) return NULL; + if (name_len >= sizeof(entry->if_unix_name)) return NULL; entry = malloc( sizeof(*entry) ); if (!entry) return NULL;
1
0
0
0
Zebediah Figura : strmbase: Try sink types before source types.
by Alexandre Julliard
23 Dec '21
23 Dec '21
Module: wine Branch: master Commit: 9156e124f3f41ccdf2fc4b98cbfaf1cbf47acf0a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9156e124f3f41ccdf2fc4b98…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Dec 23 00:35:17 2021 -0600 strmbase: Try sink types before source types. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50668
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qcap/tests/smartteefilter.c | 2 +- dlls/qedit/tests/samplegrabber.c | 4 ++-- dlls/quartz/tests/avidec.c | 2 +- dlls/quartz/tests/avisplit.c | 2 +- libs/strmbase/pin.c | 32 ++++++++++++++++---------------- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dlls/qcap/tests/smartteefilter.c b/dlls/qcap/tests/smartteefilter.c index c8a66f1370a..b6ba3ca75c9 100644 --- a/dlls/qcap/tests/smartteefilter.c +++ b/dlls/qcap/tests/smartteefilter.c @@ -1095,7 +1095,7 @@ static void test_source_connection(AM_MEDIA_TYPE req_mt, IFilterGraph2 *graph, req_mt.lSampleSize = 3; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(compare_media_types(&testsink->sink.pin.mt, &req_mt), "Media types didn't match.\n"); + ok(compare_media_types(&testsink->sink.pin.mt, &req_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink->sink.pin.IPin_iface); diff --git a/dlls/qedit/tests/samplegrabber.c b/dlls/qedit/tests/samplegrabber.c index 4c930e0c87a..13ec04cdc1c 100644 --- a/dlls/qedit/tests/samplegrabber.c +++ b/dlls/qedit/tests/samplegrabber.c @@ -1260,8 +1260,8 @@ static void test_connect_pin(void) req_mt.lSampleSize = 444; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); - ok(compare_media_types(&testsource.source.pin.mt, &testsource.source_mt), "Media types didn't match.\n"); + ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); + ok(compare_media_types(&testsource.source.pin.mt, &testsink.sink.pin.mt), "Media types didn't match.\n"); hr = IPin_EnumMediaTypes(sink, &enummt); ok(hr == S_OK, "Got hr %#x.\n", hr); diff --git a/dlls/quartz/tests/avidec.c b/dlls/quartz/tests/avidec.c index 10aa9711982..ac1078bf59b 100644 --- a/dlls/quartz/tests/avidec.c +++ b/dlls/quartz/tests/avidec.c @@ -1516,7 +1516,7 @@ static void test_connect_pin(void) req_mt.lSampleSize = 444; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); + ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); hr = IFilterGraph2_Disconnect(graph, sink); ok(hr == S_OK, "Got hr %#x.\n", hr); diff --git a/dlls/quartz/tests/avisplit.c b/dlls/quartz/tests/avisplit.c index 47f20b70d61..06c2f5fed3c 100644 --- a/dlls/quartz/tests/avisplit.c +++ b/dlls/quartz/tests/avisplit.c @@ -1365,7 +1365,7 @@ static void test_connect_pin(void) req_mt.lSampleSize = 444; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); + ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); IPin_Release(source); hr = IFilterGraph2_Disconnect(graph, sink); diff --git a/libs/strmbase/pin.c b/libs/strmbase/pin.c index efce0155a9e..36b3fdf1425 100644 --- a/libs/strmbase/pin.c +++ b/libs/strmbase/pin.c @@ -516,22 +516,6 @@ static HRESULT WINAPI source_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYP return hr; } - if (pin->pFuncsTable->base.pin_get_media_type) - { - for (i = 0; pin->pFuncsTable->base.pin_get_media_type(&pin->pin, i, &candidate) == S_OK; ++i) - { - strmbase_dump_media_type(&candidate); - if (compare_media_types(mt, &candidate) - && pin->pFuncsTable->pfnAttemptConnection(pin, peer, &candidate) == S_OK) - { - LeaveCriticalSection(&pin->pin.filter->filter_cs); - FreeMediaType(&candidate); - return S_OK; - } - FreeMediaType(&candidate); - } - } - if (SUCCEEDED(IPin_EnumMediaTypes(peer, &enummt))) { while (IEnumMediaTypes_Next(enummt, 1, &candidate_ptr, &count) == S_OK) @@ -550,6 +534,22 @@ static HRESULT WINAPI source_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYP IEnumMediaTypes_Release(enummt); } + if (pin->pFuncsTable->base.pin_get_media_type) + { + for (i = 0; pin->pFuncsTable->base.pin_get_media_type(&pin->pin, i, &candidate) == S_OK; ++i) + { + strmbase_dump_media_type(&candidate); + if (compare_media_types(mt, &candidate) + && pin->pFuncsTable->pfnAttemptConnection(pin, peer, &candidate) == S_OK) + { + LeaveCriticalSection(&pin->pin.filter->filter_cs); + FreeMediaType(&candidate); + return S_OK; + } + FreeMediaType(&candidate); + } + } + LeaveCriticalSection(&pin->pin.filter->filter_cs); return VFW_E_NO_ACCEPTABLE_TYPES;
1
0
0
0
Zebediah Figura : qedit/tests: Test that sink pins are enumerated first.
by Alexandre Julliard
23 Dec '21
23 Dec '21
Module: wine Branch: master Commit: c9addf8cbf5b33c8f997ffd5c9864dfc06a80684 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c9addf8cbf5b33c8f997ffd5…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Dec 23 00:35:16 2021 -0600 qedit/tests: Test that sink pins are enumerated first. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qedit/tests/samplegrabber.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/dlls/qedit/tests/samplegrabber.c b/dlls/qedit/tests/samplegrabber.c index 6a58d5ea7e6..4c930e0c87a 100644 --- a/dlls/qedit/tests/samplegrabber.c +++ b/dlls/qedit/tests/samplegrabber.c @@ -712,14 +712,6 @@ static HRESULT testsink_query_interface(struct strmbase_pin *iface, REFIID iid, return S_OK; } -static HRESULT testsink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt) -{ - struct testfilter *filter = impl_from_strmbase_filter(iface->filter); - if (filter->sink_mt && !compare_media_types(mt, filter->sink_mt)) - return S_FALSE; - return S_OK; -} - static HRESULT testsink_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt) { struct testfilter *filter = impl_from_strmbase_filter(iface->filter); @@ -731,6 +723,14 @@ static HRESULT testsink_get_media_type(struct strmbase_pin *iface, unsigned int return VFW_S_NO_MORE_ITEMS; } +static HRESULT testsink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *mt) +{ + struct testfilter *filter = impl_from_strmbase_filter(iface->pin.filter); + if (filter->sink_mt && !IsEqualGUID(&mt->majortype, &filter->sink_mt->majortype)) + return VFW_E_TYPE_NOT_ACCEPTED; + return S_OK; +} + static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample *sample) { struct testfilter *filter = impl_from_strmbase_filter(iface->pin.filter); @@ -807,8 +807,8 @@ static HRESULT testsink_end_flush(struct strmbase_sink *iface) static const struct strmbase_sink_ops testsink_ops = { .base.pin_query_interface = testsink_query_interface, - .base.pin_query_accept = testsink_query_accept, .base.pin_get_media_type = testsink_get_media_type, + .sink_connect = testsink_connect, .pfnReceive = testsink_Receive, .sink_new_segment = testsink_new_segment, .sink_eos = testsink_eos, @@ -1248,15 +1248,20 @@ static void test_connect_pin(void) ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); req_mt.formattype = GUID_NULL; + /* Test enumeration of sink media types. */ + testsink.sink_mt = &req_mt; + req_mt.majortype = MEDIATYPE_Audio; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + req_mt.majortype = GUID_NULL; req_mt.bTemporalCompression = TRUE; + req_mt.lSampleSize = 444; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); - ok(compare_media_types(&testsource.source.pin.mt, &testsink.sink.pin.mt), "Media types didn't match.\n"); + todo_wine ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); + ok(compare_media_types(&testsource.source.pin.mt, &testsource.source_mt), "Media types didn't match.\n"); hr = IPin_EnumMediaTypes(sink, &enummt); ok(hr == S_OK, "Got hr %#x.\n", hr);
1
0
0
0
Zebediah Figura : qcap/tests: Test that sink pins are enumerated first.
by Alexandre Julliard
23 Dec '21
23 Dec '21
Module: wine Branch: master Commit: bfc1f808fa69d4bc3038f1fac61a7abfdaaecefa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bfc1f808fa69d4bc3038f1fa…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Dec 23 00:35:15 2021 -0600 qcap/tests: Test that sink pins are enumerated first. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qcap/tests/smartteefilter.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/dlls/qcap/tests/smartteefilter.c b/dlls/qcap/tests/smartteefilter.c index 6842fccb863..c8a66f1370a 100644 --- a/dlls/qcap/tests/smartteefilter.c +++ b/dlls/qcap/tests/smartteefilter.c @@ -757,14 +757,6 @@ static HRESULT testsink_query_interface(struct strmbase_pin *iface, REFIID iid, return S_OK; } -static HRESULT testsink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt) -{ - struct testfilter *filter = impl_from_strmbase_filter(iface->filter); - if (filter->sink_mt && !compare_media_types(mt, filter->sink_mt)) - return S_FALSE; - return S_OK; -} - static HRESULT testsink_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt) { struct testfilter *filter = impl_from_strmbase_filter(iface->filter); @@ -776,6 +768,14 @@ static HRESULT testsink_get_media_type(struct strmbase_pin *iface, unsigned int return VFW_S_NO_MORE_ITEMS; } +static HRESULT testsink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *mt) +{ + struct testfilter *filter = impl_from_strmbase_filter(iface->pin.filter); + if (filter->sink_mt && !IsEqualGUID(&mt->majortype, &filter->sink_mt->majortype)) + return VFW_E_TYPE_NOT_ACCEPTED; + return S_OK; +} + static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample *sample) { struct testfilter *filter = impl_from_strmbase_filter(iface->pin.filter); @@ -866,8 +866,8 @@ static HRESULT testsink_end_flush(struct strmbase_sink *iface) static const struct strmbase_sink_ops testsink_ops = { .base.pin_query_interface = testsink_query_interface, - .base.pin_query_accept = testsink_query_accept, .base.pin_get_media_type = testsink_get_media_type, + .sink_connect = testsink_connect, .pfnReceive = testsink_Receive, .sink_new_segment = testsink_new_segment, .sink_eos = testsink_eos, @@ -1080,6 +1080,8 @@ static void test_source_connection(AM_MEDIA_TYPE req_mt, IFilterGraph2 *graph, hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &req_mt); ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + /* Test enumeration of sink media types. */ + testsink->sink_mt = &req_mt; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, NULL); todo_wine ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); @@ -1093,7 +1095,7 @@ static void test_source_connection(AM_MEDIA_TYPE req_mt, IFilterGraph2 *graph, req_mt.lSampleSize = 3; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(compare_media_types(&testsink->sink.pin.mt, &req_mt), "Media types didn't match.\n"); + todo_wine ok(compare_media_types(&testsink->sink.pin.mt, &req_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink->sink.pin.IPin_iface);
1
0
0
0
Zebediah Figura : quartz/tests: Test that sink pins are enumerated first.
by Alexandre Julliard
23 Dec '21
23 Dec '21
Module: wine Branch: master Commit: 5a461804b08e6664c4621a13a7907e4606c4b990 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5a461804b08e6664c4621a13…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Dec 23 00:35:14 2021 -0600 quartz/tests: Test that sink pins are enumerated first. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/avidec.c | 22 +++++++++++++--------- dlls/quartz/tests/avisplit.c | 16 +++++++--------- dlls/quartz/tests/mpegsplit.c | 24 ++++++++++++++---------- 3 files changed, 34 insertions(+), 28 deletions(-) diff --git a/dlls/quartz/tests/avidec.c b/dlls/quartz/tests/avidec.c index 71f974806ea..10aa9711982 100644 --- a/dlls/quartz/tests/avidec.c +++ b/dlls/quartz/tests/avidec.c @@ -854,14 +854,6 @@ static HRESULT testsink_query_interface(struct strmbase_pin *iface, REFIID iid, return S_OK; } -static HRESULT testsink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt) -{ - struct testfilter *filter = impl_from_strmbase_filter(iface->filter); - if (filter->mt && !compare_media_types(mt, filter->mt)) - return S_FALSE; - return S_OK; -} - static HRESULT testsink_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt) { struct testfilter *filter = impl_from_strmbase_filter(iface->filter); @@ -873,6 +865,14 @@ static HRESULT testsink_get_media_type(struct strmbase_pin *iface, unsigned int return VFW_S_NO_MORE_ITEMS; } +static HRESULT testsink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *mt) +{ + struct testfilter *filter = impl_from_strmbase_filter(iface->pin.filter); + if (filter->mt && !IsEqualGUID(&mt->majortype, &filter->mt->majortype)) + return VFW_E_TYPE_NOT_ACCEPTED; + return S_OK; +} + static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample *sample) { struct testfilter *filter = impl_from_strmbase_filter(iface->pin.filter); @@ -958,8 +958,8 @@ static HRESULT testsink_end_flush(struct strmbase_sink *iface) static const struct strmbase_sink_ops testsink_ops = { .base.pin_query_interface = testsink_query_interface, - .base.pin_query_accept = testsink_query_accept, .base.pin_get_media_type = testsink_get_media_type, + .sink_connect = testsink_connect, .pfnReceive = testsink_Receive, .sink_new_segment = testsink_new_segment, .sink_eos = testsink_eos, @@ -1501,6 +1501,8 @@ static void test_connect_pin(void) hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + /* Test enumeration of sink media types. */ + /* Our sink's proposed media type is sort of broken, but Windows 8+ returns * VFW_E_INVALIDMEDIATYPE for even perfectly reasonable ones. */ testsink.mt = &req_mt; @@ -1511,8 +1513,10 @@ static void test_connect_pin(void) req_mt.majortype = MEDIATYPE_Video; req_mt.subtype = MEDIASUBTYPE_I420; req_mt.formattype = FORMAT_VideoInfo; + req_mt.lSampleSize = 444; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); hr = IFilterGraph2_Disconnect(graph, sink); ok(hr == S_OK, "Got hr %#x.\n", hr); diff --git a/dlls/quartz/tests/avisplit.c b/dlls/quartz/tests/avisplit.c index 80ee6607279..47f20b70d61 100644 --- a/dlls/quartz/tests/avisplit.c +++ b/dlls/quartz/tests/avisplit.c @@ -894,14 +894,6 @@ static HRESULT testsink_query_interface(struct strmbase_pin *iface, REFIID iid, return S_OK; } -static HRESULT testsink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt) -{ - struct testfilter *filter = impl_from_strmbase_filter(iface->filter); - if (filter->mt && !compare_media_types(mt, filter->mt)) - return S_FALSE; - return S_OK; -} - static HRESULT testsink_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt) { struct testfilter *filter = impl_from_strmbase_filter(iface->filter); @@ -915,6 +907,7 @@ static HRESULT testsink_get_media_type(struct strmbase_pin *iface, unsigned int static HRESULT testsink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *mt) { + struct testfilter *filter = impl_from_strmbase_filter(iface->pin.filter); AM_MEDIA_TYPE mt2; IPin *peer2; HRESULT hr; @@ -929,6 +922,8 @@ static HRESULT testsink_connect(struct strmbase_sink *iface, IPin *peer, const A ok(compare_media_types(mt, &mt2), "Media types didn't match.\n"); FreeMediaType(&mt2); + if (filter->mt && !IsEqualGUID(&mt->majortype, &filter->mt->majortype)) + return VFW_E_TYPE_NOT_ACCEPTED; return S_OK; } @@ -993,7 +988,6 @@ static HRESULT testsink_new_segment(struct strmbase_sink *iface, static const struct strmbase_sink_ops testsink_ops = { .base.pin_query_interface = testsink_query_interface, - .base.pin_query_accept = testsink_query_accept, .base.pin_get_media_type = testsink_get_media_type, .sink_connect = testsink_connect, .pfnReceive = testsink_Receive, @@ -1359,6 +1353,8 @@ static void test_connect_pin(void) hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + /* Test enumeration of sink media types. */ + testsink.mt = &req_mt; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); @@ -1366,8 +1362,10 @@ static void test_connect_pin(void) req_mt.majortype = MEDIATYPE_Video; req_mt.subtype = MEDIASUBTYPE_I420; req_mt.formattype = FORMAT_VideoInfo; + req_mt.lSampleSize = 444; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); IPin_Release(source); hr = IFilterGraph2_Disconnect(graph, sink); diff --git a/dlls/quartz/tests/mpegsplit.c b/dlls/quartz/tests/mpegsplit.c index 9c0c34d6c9c..0809c5f861f 100644 --- a/dlls/quartz/tests/mpegsplit.c +++ b/dlls/quartz/tests/mpegsplit.c @@ -1183,14 +1183,6 @@ static HRESULT testsink_query_interface(struct strmbase_pin *iface, REFIID iid, return S_OK; } -static HRESULT testsink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt) -{ - struct testfilter *filter = impl_from_strmbase_filter(iface->filter); - if (filter->mt && !compare_media_types(mt, filter->mt)) - return S_FALSE; - return S_OK; -} - static HRESULT testsink_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt) { struct testfilter *filter = impl_from_strmbase_filter(iface->filter); @@ -1202,6 +1194,14 @@ static HRESULT testsink_get_media_type(struct strmbase_pin *iface, unsigned int return VFW_S_NO_MORE_ITEMS; } +static HRESULT testsink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *mt) +{ + struct testfilter *filter = impl_from_strmbase_filter(iface->pin.filter); + if (filter->mt && !IsEqualGUID(&mt->majortype, &filter->mt->majortype)) + return VFW_E_TYPE_NOT_ACCEPTED; + return S_OK; +} + static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample *sample) { struct testfilter *filter = impl_from_strmbase_filter(iface->pin.filter); @@ -1263,8 +1263,8 @@ static HRESULT testsink_new_segment(struct strmbase_sink *iface, static const struct strmbase_sink_ops testsink_ops = { .base.pin_query_interface = testsink_query_interface, - .base.pin_query_accept = testsink_query_accept, .base.pin_get_media_type = testsink_get_media_type, + .sink_connect = testsink_connect, .pfnReceive = testsink_Receive, .sink_eos = testsink_eos, .sink_new_segment = testsink_new_segment, @@ -1576,6 +1576,8 @@ static void test_connect_pin(void) hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + /* Test enumeration of sink media types. */ + testsink.mt = &req_mt; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); @@ -1583,8 +1585,10 @@ static void test_connect_pin(void) req_mt.majortype = MEDIATYPE_Audio; req_mt.subtype = MEDIASUBTYPE_MPEG1AudioPayload; req_mt.formattype = FORMAT_WaveFormatEx; + req_mt.lSampleSize = 444; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); IPin_Release(source); hr = IFilterGraph2_Disconnect(graph, sink);
1
0
0
0
Zebediah Figura : qcap/avimux: Implement source_query_accept().
by Alexandre Julliard
23 Dec '21
23 Dec '21
Module: wine Branch: master Commit: ecb7c90131a021c163521d6a154775074ec9a2dd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ecb7c90131a021c163521d6a…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Dec 23 00:35:13 2021 -0600 qcap/avimux: Implement source_query_accept(). Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qcap/avimux.c | 7 +++++-- dlls/qcap/tests/avimux.c | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c index c3dbf71d2da..fe4add83b7c 100644 --- a/dlls/qcap/avimux.c +++ b/dlls/qcap/avimux.c @@ -1110,9 +1110,12 @@ static HRESULT source_query_interface(struct strmbase_pin *iface, REFIID iid, vo return S_OK; } -static HRESULT source_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE *amt) +static HRESULT source_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt) { - FIXME("(%p) stub\n", base); + if (!IsEqualGUID(&mt->majortype, &GUID_NULL) && !IsEqualGUID(&mt->majortype, &MEDIATYPE_Stream)) + return S_FALSE; + if (!IsEqualGUID(&mt->subtype, &GUID_NULL) && !IsEqualGUID(&mt->subtype, &MEDIASUBTYPE_Avi)) + return S_FALSE; return S_OK; } diff --git a/dlls/qcap/tests/avimux.c b/dlls/qcap/tests/avimux.c index 3f43ff569cf..70575281cee 100644 --- a/dlls/qcap/tests/avimux.c +++ b/dlls/qcap/tests/avimux.c @@ -468,6 +468,7 @@ static void test_media_types(void) pmt->bFixedSizeSamples = FALSE; pmt->bTemporalCompression = TRUE; pmt->lSampleSize = 123; + pmt->formattype = FORMAT_VideoInfo; hr = IPin_QueryAccept(pin, pmt); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -476,7 +477,7 @@ static void test_media_types(void) ok(hr == S_OK, "Got hr %#x.\n", hr); pmt->majortype = MEDIATYPE_Video; hr = IPin_QueryAccept(pin, pmt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); pmt->majortype = MEDIATYPE_Stream; pmt->subtype = GUID_NULL; @@ -484,7 +485,7 @@ static void test_media_types(void) ok(hr == S_OK, "Got hr %#x.\n", hr); pmt->subtype = MEDIASUBTYPE_RGB8; hr = IPin_QueryAccept(pin, pmt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); pmt->subtype = MEDIASUBTYPE_Avi; CoTaskMemFree(pmt);
1
0
0
0
Zebediah Figura : winegstreamer: Allow specifying flipped video via negative height.
by Alexandre Julliard
23 Dec '21
23 Dec '21
Module: wine Branch: master Commit: c5a9373dbed9bb53e7739dfb6d2a1a2a5818871b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c5a9373dbed9bb53e7739dfb…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Dec 23 00:35:12 2021 -0600 winegstreamer: Allow specifying flipped video via negative height. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50668
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/unixlib.h | 2 +- dlls/winegstreamer/wg_parser.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h index 90101893541..82bb534b938 100644 --- a/dlls/winegstreamer/unixlib.h +++ b/dlls/winegstreamer/unixlib.h @@ -63,7 +63,7 @@ struct wg_format WG_VIDEO_FORMAT_CINEPAK, } format; - uint32_t width, height; + int32_t width, height; uint32_t fps_n, fps_d; } video; struct diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index c3c9051a174..0178538fa81 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -450,7 +450,7 @@ static GstCaps *wg_format_to_caps_video(const struct wg_format *format) if ((video_format = wg_video_format_to_gst(format->u.video.format)) == GST_VIDEO_FORMAT_UNKNOWN) return NULL; - gst_video_info_set_format(&info, video_format, format->u.video.width, format->u.video.height); + gst_video_info_set_format(&info, video_format, format->u.video.width, abs(format->u.video.height)); if ((caps = gst_video_info_to_caps(&info))) { /* Clear some fields that shouldn't prevent us from connecting. */ @@ -497,7 +497,7 @@ static bool wg_format_compare(const struct wg_format *a, const struct wg_format /* Do not compare FPS. */ return a->u.video.format == b->u.video.format && a->u.video.width == b->u.video.width - && a->u.video.height == b->u.video.height; + && abs(a->u.video.height) == abs(b->u.video.height); } assert(0); @@ -611,6 +611,8 @@ static NTSTATUS wg_parser_stream_enable(void *args) if (format->major_type == WG_MAJOR_TYPE_VIDEO) { + bool flip = (format->u.video.height < 0); + switch (format->u.video.format) { case WG_VIDEO_FORMAT_BGRA: @@ -618,7 +620,7 @@ static NTSTATUS wg_parser_stream_enable(void *args) case WG_VIDEO_FORMAT_BGR: case WG_VIDEO_FORMAT_RGB15: case WG_VIDEO_FORMAT_RGB16: - gst_util_set_object_arg(G_OBJECT(stream->flip), "method", "vertical-flip"); + flip = !flip; break; case WG_VIDEO_FORMAT_AYUV: @@ -630,9 +632,10 @@ static NTSTATUS wg_parser_stream_enable(void *args) case WG_VIDEO_FORMAT_YVYU: case WG_VIDEO_FORMAT_UNKNOWN: case WG_VIDEO_FORMAT_CINEPAK: - gst_util_set_object_arg(G_OBJECT(stream->flip), "method", "none"); break; } + + gst_util_set_object_arg(G_OBJECT(stream->flip), "method", flip ? "vertical-flip" : "none"); } gst_pad_push_event(stream->my_sink, gst_event_new_reconfigure());
1
0
0
0
Chilung Chan : po: Update Traditional Chinese translation.
by Alexandre Julliard
23 Dec '21
23 Dec '21
Module: wine Branch: master Commit: fbefa039f1ba23b2d793d86f2e5a6904d7979d01 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fbefa039f1ba23b2d793d86f…
Author: Chilung Chan <eason066(a)gmail.com> Date: Thu Dec 23 14:31:03 2021 +0800 po: Update Traditional Chinese translation. Signed-off-by: Chilung Chan <eason066(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/zh_TW.po | 94 +++++++++++++++++++++++++++++-------------------------------- 1 file changed, 44 insertions(+), 50 deletions(-) diff --git a/po/zh_TW.po b/po/zh_TW.po index d4d05db3298..16c22e456a4 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To:
https://bugs.winehq.org\n
" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2021-12-13 13:32+0800\n" +"PO-Revision-Date: 2021-12-23 14:09+0800\n" "Last-Translator: Chilung Chan <eason066(a)gmail.com>\n" "Language-Team: Chinese (Taiwan)\n" "Language: zh_TW\n" @@ -257,7 +257,7 @@ msgstr "應用程式" msgid "" "Unable to execute the uninstaller, '%s'. Do you want to remove the uninstall " "entry for this program from the registry?" -msgstr "無法執行移除程式 '%s'。您想將這個移除程式從註冊表中移除嗎?" +msgstr "無法執行移除程式 '%s'。您想將這個移除程式從登錄中移除嗎?" #: dlls/appwiz.cpl/appwiz.rc:36 msgid "Not specified" @@ -4774,7 +4774,7 @@ msgstr "不存在的權杖。\n" #: dlls/kernel32/winerror.mc:1063 msgid "Registry corrupt.\n" -msgstr "註冊表損毀。\n" +msgstr "登錄損毀。\n" #: dlls/kernel32/winerror.mc:1068 msgid "Invalid key.\n" @@ -4782,47 +4782,47 @@ msgstr "無效的索引鍵。\n" #: dlls/kernel32/winerror.mc:1073 msgid "Can't open registry key.\n" -msgstr "無法開啟註冊表索引鍵。\n" +msgstr "無法開啟登錄機碼。\n" #: dlls/kernel32/winerror.mc:1078 msgid "Can't read registry key.\n" -msgstr "無法讀取註冊表索引鍵。\n" +msgstr "無法讀取登錄機碼。\n" #: dlls/kernel32/winerror.mc:1083 msgid "Can't write registry key.\n" -msgstr "無法寫入註冊表索引鍵。\n" +msgstr "無法寫入登錄機碼。\n" #: dlls/kernel32/winerror.mc:1088 msgid "Registry has been recovered.\n" -msgstr "註冊表已復原。\n" +msgstr "登錄已復原。\n" #: dlls/kernel32/winerror.mc:1093 msgid "Registry is corrupt.\n" -msgstr "註冊表損毀。\n" +msgstr "登錄損毀。\n" #: dlls/kernel32/winerror.mc:1098 msgid "I/O to registry failed.\n" -msgstr "註冊表 I/O 時失敗。\n" +msgstr "I/O 至登錄時失敗。\n" #: dlls/kernel32/winerror.mc:1103 msgid "Not registry file.\n" -msgstr "非註冊表檔案。\n" +msgstr "非登錄檔案。\n" #: dlls/kernel32/winerror.mc:1108 msgid "Key deleted.\n" -msgstr "索引鍵已刪除。\n" +msgstr "已刪除機碼。\n" #: dlls/kernel32/winerror.mc:1113 msgid "No registry log space.\n" -msgstr "沒有註冊表記錄檔空間。\n" +msgstr "沒有登錄記錄檔空間。\n" #: dlls/kernel32/winerror.mc:1118 msgid "Registry key has subkeys.\n" -msgstr "註冊表索引鍵有子項。\n" +msgstr "登錄機碼有子項。\n" #: dlls/kernel32/winerror.mc:1123 msgid "Subkey must be volatile.\n" -msgstr "子項必須是可變的。\n" +msgstr "子機碼必須是可變的。\n" #: dlls/kernel32/winerror.mc:1128 msgid "Notify change request in progress.\n" @@ -8020,7 +8020,7 @@ msgstr "新資料夾" #: dlls/msi/msi.rc:91 msgid "Allocating registry space" -msgstr "正在分配註冊表空間" +msgstr "正在分配登錄空間" #: dlls/msi/msi.rc:92 msgid "Searching for installed applications" @@ -10464,22 +10464,16 @@ msgid "(UTC+00:00) Dublin, Edinburgh, Lisbon, London" msgstr "(UTC+00:00) 都柏林,愛丁堡,里斯本,倫敦" #: dlls/tzres/tzres.rc:342 -#, fuzzy -#| msgid "Sudan Standard Time" msgid "South Sudan Standard Time" -msgstr "蘇丹標準時間" +msgstr "南蘇丹標準時間" #: dlls/tzres/tzres.rc:343 -#, fuzzy -#| msgid "Sudan Daylight Time" msgid "South Sudan Daylight Time" -msgstr "蘇丹夏令時間" +msgstr "南蘇丹夏令時間" #: dlls/tzres/tzres.rc:344 -#, fuzzy -#| msgid "(UTC+02:00) Jerusalem" msgid "(UTC+02:00) Juba" -msgstr "(UTC+02:00) 耶路撒冷" +msgstr "(UTC+02:00) 朱巴" #: dlls/tzres/tzres.rc:102 msgid "Central Asia Standard Time" @@ -13355,7 +13349,7 @@ msgid "" msgstr "" "PATH 顯示或變更 cmd 的搜尋路徑。\n" "\n" -"輸入 PATH 將會顯示目前的路徑設定 (根據註冊表\n" +"輸入 PATH 將會顯示目前的路徑設定 (根據登錄\n" "進行初始化)。要變更設定就在\n" "PATH 命令之後緊接新的值。\n" "\n" @@ -14765,7 +14759,7 @@ msgstr "系統設定(&S)" #: programs/oleview/oleview.rc:36 msgid "&Run the Registry Editor" -msgstr "執行註冊表編輯器(&R)" +msgstr "執行登錄檔編輯器(&R)" #: programs/oleview/oleview.rc:42 msgid "&CoCreateInstance Flag" @@ -14877,7 +14871,7 @@ msgid "" "These settings change only registry values.\n" "They have no effect on Wine performance." msgstr "" -"這些設定只改變註冊表內的值。\n" +"這些設定只改變登錄內的值。\n" "它對 Wine 的性能沒有影響。" #: programs/oleview/oleview.rc:180 @@ -14942,7 +14936,7 @@ msgstr "變更本機分散式 COM 設定" #: programs/oleview/oleview.rc:108 msgid "Run the Wine registry editor" -msgstr "執行 Wine 註冊表編輯器" +msgstr "執行 Wine 登錄檔編輯器" #: programs/oleview/oleview.rc:109 msgid "Quit the application. Prompts to save changes" @@ -15047,7 +15041,7 @@ msgstr "介面" #: programs/oleview/oleview.rc:140 msgid "Registry" -msgstr "註冊表" +msgstr "登錄" #: programs/oleview/oleview.rc:141 msgid "Implementation" @@ -15313,7 +15307,7 @@ msgstr "輸入 \"REG %1 /?\" 以取得說明。\n" #: programs/reg/reg.rc:181 msgid "reg: Unable to access or create the specified registry key\n" -msgstr "reg: 無法存取或建立指定的註冊表鍵\n" +msgstr "reg: 無法存取或建立指定的登錄機碼\n" #: programs/reg/reg.rc:116 msgid "reg: The operation completed successfully\n" @@ -15321,7 +15315,7 @@ msgstr "reg: 操作成功完成\n" #: programs/reg/reg.rc:131 msgid "reg: The registry operation was cancelled\n" -msgstr "reg: 註冊表操作已經取消\n" +msgstr "reg: 登錄操作已經取消\n" #: programs/reg/reg.rc:174 msgid "reg: Unable to find the specified registry key\n" @@ -15412,7 +15406,7 @@ msgid "" msgstr "" "REG ADD <機碼> [/v 值名稱 | /ve] [/t 類型] [/s 分隔符號] [/d 資料] [/f]\n" "\n" -" 新增一個機碼到註冊表,或新增值到給定的登錄機碼。\n" +" 新增一個機碼到登錄,或新增值到給定的登錄機碼。\n" "\n" " <機碼>\n" " 要新增的機碼,如果指定了 [/v] 或 [/ve],\n" @@ -15438,7 +15432,7 @@ msgstr "" " 登錄值。\n" "\n" " /t <類型>\n" -" 要新增到註冊表的資料類型。如果指定了 [/t],\n" +" 要新增到登錄的資料類型。如果指定了 [/t],\n" " <類型> 必須是下列的其中一個:\n" "\n" " REG_SZ | REG_MULTI_SZ | REG_EXPAND_SZ\n" @@ -15665,7 +15659,7 @@ msgid "" msgstr "" "REG IMPORT <檔案>\n" "\n" -" 從給定的檔案匯入機碼、值和資料到註冊表。\n" +" 從給定的檔案匯入機碼、值和資料到登錄。\n" "\n" " <檔案>\n" " 要匯入的登錄檔案的名稱和路徑。\n" @@ -15849,7 +15843,7 @@ msgstr "搜尋完成。相符項目的數目: %1!d!\n" #: programs/regedit/regedit.rc:34 msgid "&Registry" -msgstr "註冊表(&R)" +msgstr "登錄檔(&R)" #: programs/regedit/regedit.rc:36 msgid "&Import Registry File..." @@ -15921,7 +15915,7 @@ msgstr "移除我的最愛(&R)..." #: programs/regedit/regedit.rc:80 msgid "&About Registry Editor" -msgstr "關於註冊表編輯器(&A)" +msgstr "關於登錄檔編輯器(&A)" #: programs/regedit/regedit.rc:89 programs/regedit/regedit.rc:96 #: programs/regedit/regedit.rc:230 @@ -15934,7 +15928,7 @@ msgstr "修改二進位資料(&B)..." #: programs/regedit/regedit.rc:267 msgid "Export registry" -msgstr "匯出註冊表" +msgstr "要匯出的登錄" #: programs/regedit/regedit.rc:269 msgid "S&elected branch:" @@ -16016,28 +16010,28 @@ msgstr "編輯多字串" #: programs/regedit/regedit.rc:159 msgid "Contains commands for working with the whole registry" -msgstr "含有與註冊表有關的全部指令" +msgstr "包含登錄工作相關的全部命令" #: programs/regedit/regedit.rc:160 msgid "Contains commands for editing values or keys" -msgstr "含有與編輯數值有關的全部指令" +msgstr "包含編輯機碼或值的命令" #: programs/regedit/regedit.rc:161 msgid "Contains commands for customizing the registry window" -msgstr "含有與自訂註冊表視窗有關的全部指令" +msgstr "包含自訂登錄視窗的命令" #: programs/regedit/regedit.rc:162 msgid "Contains commands for accessing frequently used keys" -msgstr "含有與使用常用索引鍵有關的全部指令" +msgstr "包含使用常用的機碼的命令" #: programs/regedit/regedit.rc:163 msgid "" "Contains commands for displaying Help and information about Registry Editor" -msgstr "含有顯示登錄編輯程式說明及資訊的命令" +msgstr "包含顯示登錄編輯程式說明及資訊的命令" #: programs/regedit/regedit.rc:164 msgid "Contains commands for creating new keys or values" -msgstr "含有與建立新值有關的全部指令" +msgstr "包含建立新機碼或值的指令" #: programs/regedit/regedit.rc:149 msgid "Data" @@ -16045,7 +16039,7 @@ msgstr "資料" #: programs/regedit/regedit.rc:154 msgid "Registry Editor" -msgstr "註冊表編輯器" +msgstr "登錄檔編輯器" #: programs/regedit/regedit.rc:221 msgid "Import Registry File" @@ -16114,7 +16108,7 @@ msgstr "無法重新命名選定的登錄值" #: programs/regedit/regedit.rc:255 msgid "" "The keys and values contained in %1 were successfully added to the registry." -msgstr "%1 所包含的機碼和值已成功新增至註冊表。" +msgstr "%1 所包含的機碼和值已成功新增至登錄。" #: programs/regedit/regedit.rc:256 msgid "Unable to import %1. The specified file is not a valid registry file." @@ -16270,7 +16264,7 @@ msgstr "regedit: 該列有錯誤的語法。\n" #: programs/regedit/regedit.rc:187 msgid "Quits the Registry Editor" -msgstr "結束註冊表編輯器" +msgstr "結束登錄檔編輯器" #: programs/regedit/regedit.rc:188 msgid "Adds keys to the favorites list" @@ -16334,19 +16328,19 @@ msgstr "新增一個新的 32 位元值" #: programs/regedit/regedit.rc:177 msgid "Imports a text file into the registry" -msgstr "將純文字檔案匯入註冊表" +msgstr "將純文字檔案匯入登錄" #: programs/regedit/regedit.rc:179 msgid "Exports all or part of the registry to a text file" -msgstr "將註冊表匯出到純文字檔案" +msgstr "將登錄匯出到純文字檔案" #: programs/regedit/regedit.rc:180 msgid "Prints all or part of the registry" -msgstr "列印註冊表的全部或部分" +msgstr "列印登錄的全部或部分" #: programs/regedit/regedit.rc:181 msgid "Opens Registry Editor Help" -msgstr "開啟註冊表編輯器的說明" +msgstr "開啟登錄檔編輯器的說明" #: programs/regedit/regedit.rc:182 msgid "Displays program information, version number and copyright"
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
57
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Results per page:
10
25
50
100
200