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
May 2022
----- 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
907 discussions
Start a n
N
ew thread
Rémi Bernon : windows.gaming.input: Reset spare CS pointer before deleting it.
by Alexandre Julliard
11 May '22
11 May '22
Module: wine Branch: master Commit: c3c11d08037dac90f5fac4151884f0f08211d1e2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c3c11d08037dac90f5fac415…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri May 6 13:05:36 2022 +0200 windows.gaming.input: Reset spare CS pointer before deleting it. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windows.gaming.input/async.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/windows.gaming.input/async.c b/dlls/windows.gaming.input/async.c index dfcb4144e74..fc593bc6121 100644 --- a/dlls/windows.gaming.input/async.c +++ b/dlls/windows.gaming.input/async.c @@ -98,6 +98,7 @@ static ULONG WINAPI async_impl_Release( IWineAsyncInfoImpl *iface ) IAsyncInfo_Close( &impl->IAsyncInfo_iface ); if (impl->param) IUnknown_Release( impl->param ); if (impl->invoker) IUnknown_Release( impl->invoker ); + impl->cs.DebugInfo->Spare[0] = 0; DeleteCriticalSection( &impl->cs ); free( impl ); }
1
0
0
0
Rémi Bernon : windows.gaming.input: AddRef on the returned async handler in get_Completed.
by Alexandre Julliard
11 May '22
11 May '22
Module: wine Branch: master Commit: d7701deddc00dbe37b6891105d01588533eba991 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d7701deddc00dbe37b689110…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed May 4 19:32:14 2022 +0200 windows.gaming.input: AddRef on the returned async handler in get_Completed. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windows.gaming.input/async.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/windows.gaming.input/async.c b/dlls/windows.gaming.input/async.c index 1426b3d8481..dfcb4144e74 100644 --- a/dlls/windows.gaming.input/async.c +++ b/dlls/windows.gaming.input/async.c @@ -146,7 +146,8 @@ static HRESULT WINAPI async_impl_get_Completed( IWineAsyncInfoImpl *iface, IWine EnterCriticalSection( &impl->cs ); if (impl->status == Closed) hr = E_ILLEGAL_METHOD_CALL; - *handler = (impl->handler != HANDLER_NOT_SET) ? impl->handler : NULL; + if (impl->handler == NULL || impl->handler == HANDLER_NOT_SET) *handler = NULL; + else IWineAsyncOperationCompletedHandler_AddRef( (*handler = impl->handler) ); LeaveCriticalSection( &impl->cs ); return hr;
1
0
0
0
Rémi Bernon : dinput/tests: Wait for the expected report to actually be pending.
by Alexandre Julliard
11 May '22
11 May '22
Module: wine Branch: master Commit: 606dc246ff0e6ac710288e4d9dc2fcf55568b1af URL:
https://source.winehq.org/git/wine.git/?a=commit;h=606dc246ff0e6ac710288e4d…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri May 6 15:10:03 2022 +0200 dinput/tests: Wait for the expected report to actually be pending. There is a race otherwise where we try to complete a pending IRP but because the async is writing the report from another thread we didn't find it and instead ignored it. Instead we need to atomically check if there was a pending IRP, and if the queue is empty, or queue the wait. Later, when a report is going to be marked as pending, and if there's someone waiting for it already, we instead complete it immediately. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/tests/dinput_test.h | 5 +++-- dlls/dinput/tests/driver_bus.c | 45 ++++++++++++++++++++++++++++---------- dlls/dinput/tests/driver_hid.h | 7 +++++- dlls/dinput/tests/force_feedback.c | 4 ++-- dlls/dinput/tests/hid.c | 6 +++-- 5 files changed, 48 insertions(+), 19 deletions(-) diff --git a/dlls/dinput/tests/dinput_test.h b/dlls/dinput/tests/dinput_test.h index 0adbd0b1ac8..c4ee42ca1c8 100644 --- a/dlls/dinput/tests/dinput_test.h +++ b/dlls/dinput/tests/dinput_test.h @@ -103,8 +103,9 @@ BOOL sync_ioctl_( const char *file, int line, HANDLE device, DWORD code, void *i #define set_hid_expect( a, b, c ) set_hid_expect_( __FILE__, __LINE__, a, b, c ) void set_hid_expect_( const char *file, int line, HANDLE device, struct hid_expect *expect, DWORD expect_size ); -#define wait_hid_expect( a, b ) wait_hid_expect_( __FILE__, __LINE__, a, b, FALSE ) -void wait_hid_expect_( const char *file, int line, HANDLE device, DWORD timeout, BOOL todo ); +#define wait_hid_expect( a, b ) wait_hid_expect_( __FILE__, __LINE__, a, b, FALSE, FALSE ) +#define wait_hid_pending( a, b ) wait_hid_expect_( __FILE__, __LINE__, a, b, TRUE, FALSE ) +void wait_hid_expect_( const char *file, int line, HANDLE device, DWORD timeout, BOOL wait_pending, BOOL todo ); #define send_hid_input( a, b, c ) send_hid_input_( __FILE__, __LINE__, a, b, c ) void send_hid_input_( const char *file, int line, HANDLE device, struct hid_expect *expect, DWORD expect_size ); diff --git a/dlls/dinput/tests/driver_bus.c b/dlls/dinput/tests/driver_bus.c index 6554d50c14b..6a1994e509c 100644 --- a/dlls/dinput/tests/driver_bus.c +++ b/dlls/dinput/tests/driver_bus.c @@ -188,26 +188,34 @@ static NTSTATUS expect_queue_add_pending( struct expect_queue *queue, IRP *irp ) return status; } -static void expect_queue_clear_pending( struct expect_queue *queue ) +/* complete an expect report previously marked as pending, or wait for one and then for the queue to empty */ +static NTSTATUS expect_queue_wait_pending( struct expect_queue *queue, IRP *irp ) { + NTSTATUS status; + IRP *pending; KIRQL irql; - IRP *irp; KeAcquireSpinLock( &queue->lock, &irql ); - if ((irp = queue->pending_wait)) + if ((pending = queue->pending_wait)) { queue->pending_wait = NULL; - if (!IoSetCancelRoutine( irp, NULL )) irp = NULL; + if (!IoSetCancelRoutine( pending, NULL )) pending = NULL; } + + if (pending && queue->pos == queue->end) status = STATUS_SUCCESS; + else status = expect_queue_add_pending_locked( queue, irp ); KeReleaseSpinLock( &queue->lock, irql ); - if (irp) + if (pending) { - irp->IoStatus.Status = STATUS_SUCCESS; - IoCompleteRequest( irp, IO_NO_INCREMENT ); + pending->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest( pending, IO_NO_INCREMENT ); } + + return status; } +/* wait for the expect queue to empty */ static NTSTATUS expect_queue_wait( struct expect_queue *queue, IRP *irp ) { NTSTATUS status; @@ -257,11 +265,21 @@ static void expect_queue_next( struct expect_queue *queue, ULONG code, HID_XFER_ if (running_under_wine || !queue->pos->wine_only) break; queue->pos++; } - if (queue->pos == queue->end && (irp = queue->pending_wait)) + + if ((irp = queue->pending_wait)) { - queue->pending_wait = NULL; - if (!IoSetCancelRoutine( irp, NULL )) irp = NULL; + /* don't mark the IRP as pending if someone's already waiting */ + if (expect->ret_status == STATUS_PENDING) expect->ret_status = STATUS_SUCCESS; + + /* complete the pending wait IRP if the queue is now empty */ + if (queue->pos != queue->end) irp = NULL; + else + { + queue->pending_wait = NULL; + if (!IoSetCancelRoutine( irp, NULL )) irp = NULL; + } } + memcpy( context, queue->context, context_size ); KeReleaseSpinLock( &queue->lock, irql ); @@ -1244,9 +1262,12 @@ static NTSTATUS WINAPI pdo_ioctl( DEVICE_OBJECT *device, IRP *irp ) status = STATUS_SUCCESS; break; case IOCTL_WINETEST_HID_WAIT_EXPECT: - expect_queue_clear_pending( &impl->expect_queue ); - status = expect_queue_wait( &impl->expect_queue, irp ); + { + struct wait_expect_params wait_params = *(struct wait_expect_params *)irp->AssociatedIrp.SystemBuffer; + if (!wait_params.wait_pending) status = expect_queue_wait( &impl->expect_queue, irp ); + else status = expect_queue_wait_pending( &impl->expect_queue, irp ); break; + } case IOCTL_WINETEST_HID_SEND_INPUT: input_queue_reset( &impl->input_queue, irp->AssociatedIrp.SystemBuffer, in_size ); status = STATUS_SUCCESS; diff --git a/dlls/dinput/tests/driver_hid.h b/dlls/dinput/tests/driver_hid.h index 4711d391bfe..c5641097df3 100644 --- a/dlls/dinput/tests/driver_hid.h +++ b/dlls/dinput/tests/driver_hid.h @@ -42,7 +42,7 @@ DEFINE_GUID(control_class,0xdeadbeef,0x29ef,0x4538,0xa5,0xfd,0xb6,0x95,0x73,0xa3,0x62,0xc0); #define IOCTL_WINETEST_HID_SET_EXPECT CTL_CODE(FILE_DEVICE_KEYBOARD, 0x800, METHOD_IN_DIRECT, FILE_ANY_ACCESS) -#define IOCTL_WINETEST_HID_WAIT_EXPECT CTL_CODE(FILE_DEVICE_KEYBOARD, 0x801, METHOD_NEITHER, FILE_ANY_ACCESS) +#define IOCTL_WINETEST_HID_WAIT_EXPECT CTL_CODE(FILE_DEVICE_KEYBOARD, 0x801, METHOD_IN_DIRECT, FILE_ANY_ACCESS) #define IOCTL_WINETEST_HID_SEND_INPUT CTL_CODE(FILE_DEVICE_KEYBOARD, 0x802, METHOD_IN_DIRECT, FILE_ANY_ACCESS) #define IOCTL_WINETEST_HID_SET_CONTEXT CTL_CODE(FILE_DEVICE_KEYBOARD, 0x803, METHOD_IN_DIRECT, FILE_ANY_ACCESS) #define IOCTL_WINETEST_CREATE_DEVICE CTL_CODE(FILE_DEVICE_KEYBOARD, 0x804, METHOD_IN_DIRECT, FILE_ANY_ACCESS) @@ -61,6 +61,11 @@ struct hid_expect BYTE report_buf[128]; }; +struct wait_expect_params +{ + BOOL wait_pending; +}; + /* create/remove device */ #define MAX_HID_DESCRIPTOR_LEN 2048 diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c index f5b387f3566..976b1b93863 100644 --- a/dlls/dinput/tests/force_feedback.c +++ b/dlls/dinput/tests/force_feedback.c @@ -5536,7 +5536,7 @@ static void test_windows_gaming_input(void) ok( !bool_async_handler.invoked, "handler invoked\n" ); IAsyncInfo_Release( async_info ); - wait_hid_expect( file, 100 ); + wait_hid_pending( file, 100 ); ret = WaitForSingleObject( bool_async_handler.event, 100 ); ok( ret == 0, "WaitForSingleObject returned %#lx\n", ret ); CloseHandle( bool_async_handler.event ); @@ -5581,7 +5581,7 @@ static void test_windows_gaming_input(void) ok( !bool_async_handler.invoked, "handler invoked\n" ); IAsyncInfo_Release( async_info ); - wait_hid_expect( file, 500 ); + wait_hid_pending( file, 100 ); ret = WaitForSingleObject( bool_async_handler.event, 100 ); ok( ret == 0, "WaitForSingleObject returned %#lx\n", ret ); CloseHandle( bool_async_handler.event ); diff --git a/dlls/dinput/tests/hid.c b/dlls/dinput/tests/hid.c index 7e2d9cf86cf..00a3d65fe4d 100644 --- a/dlls/dinput/tests/hid.c +++ b/dlls/dinput/tests/hid.c @@ -911,10 +911,12 @@ void set_hid_expect_( const char *file, int line, HANDLE device, struct hid_expe ok_(file, line)( ret, "IOCTL_WINETEST_HID_SET_EXPECT failed, last error %lu\n", GetLastError() ); } -void wait_hid_expect_( const char *file, int line, HANDLE device, DWORD timeout, BOOL todo ) +void wait_hid_expect_( const char *file, int line, HANDLE device, DWORD timeout, BOOL wait_pending, BOOL todo ) { + struct wait_expect_params params = {.wait_pending = wait_pending}; + todo_wine_if(todo) { - BOOL ret = sync_ioctl_( file, line, device, IOCTL_WINETEST_HID_WAIT_EXPECT, NULL, 0, NULL, 0, timeout ); + BOOL ret = sync_ioctl_( file, line, device, IOCTL_WINETEST_HID_WAIT_EXPECT, ¶ms, sizeof(params), NULL, 0, timeout ); ok_(file, line)( ret, "IOCTL_WINETEST_HID_WAIT_EXPECT failed, last error %lu\n", GetLastError() ); }
1
0
0
0
Rémi Bernon : mf/tests: Update a broken IMFMediaSink_AddStreamSink result check.
by Alexandre Julliard
11 May '22
11 May '22
Module: wine Branch: master Commit: b7fa00be65363132f1fd8686bfa0a81b394c0dba URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b7fa00be65363132f1fd8686…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri May 6 09:18:43 2022 +0200 mf/tests: Update a broken IMFMediaSink_AddStreamSink result check. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/tests/mf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index cc6bec40234..8f2c050e3c6 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -4821,7 +4821,7 @@ todo_wine { /* Same test for a substream. */ hr = IMFMediaSink_AddStreamSink(sink, 1, NULL, &stream_sink2); - ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(hr == S_OK || broken(hr == E_INVALIDARG), "Unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) {
1
0
0
0
Rémi Bernon : mf/tests: Tweak topology loader tests results based on the video processor presence.
by Alexandre Julliard
11 May '22
11 May '22
Module: wine Branch: master Commit: bd527c1946cc92dfeee072542815e71b2e3d1861 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bd527c1946cc92dfeee07254…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri May 6 09:17:50 2022 +0200 mf/tests: Tweak topology loader tests results based on the video processor presence. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/tests/mf.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index a32005863d3..cc6bec40234 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -65,6 +65,7 @@ DEFINE_GUID(DMOVideoFormat_RGB8, D3DFMT_P8, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x static HRESULT (WINAPI *pMFCreateSampleCopierMFT)(IMFTransform **copier); static HRESULT (WINAPI *pMFGetTopoNodeCurrentType)(IMFTopologyNode *node, DWORD stream, BOOL output, IMFMediaType **type); +static BOOL has_video_processor; static BOOL is_vista(void) { return !pMFGetTopoNodeCurrentType; @@ -1885,6 +1886,7 @@ enum loader_test_flags LOADER_EXPECTED_DECODER = 0x1, LOADER_EXPECTED_CONVERTER = 0x2, LOADER_TODO = 0x4, + LOADER_NEEDS_VIDEO_PROCESSOR = 0x8, }; static void test_topology_loader(void) @@ -1972,7 +1974,7 @@ static void test_topology_loader(void) MF_CONNECT_ALLOW_CONVERTER, S_OK, - LOADER_EXPECTED_CONVERTER | LOADER_TODO, + LOADER_NEEDS_VIDEO_PROCESSOR | LOADER_EXPECTED_CONVERTER | LOADER_TODO, }, { @@ -2021,7 +2023,7 @@ static void test_topology_loader(void) MF_CONNECT_ALLOW_CONVERTER, MF_E_TRANSFORM_NOT_POSSIBLE_FOR_CURRENT_MEDIATYPE_COMBINATION, - LOADER_TODO, + LOADER_NEEDS_VIDEO_PROCESSOR | LOADER_TODO, }, { @@ -2185,9 +2187,14 @@ static void test_topology_loader(void) ok(!count, "Unexpected count %u.\n", count); hr = IMFTopoLoader_Load(loader, topology, &full_topology, NULL); - todo_wine_if(test->flags & LOADER_TODO) - ok(hr == test->expected_result, "Unexpected hr %#lx on test %u.\n", hr, i); - ok(full_topology != topology, "Unexpected instance.\n"); + if (test->flags & LOADER_NEEDS_VIDEO_PROCESSOR && !has_video_processor) + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx on test %u.\n", hr, i); + else + { + todo_wine_if(test->flags & LOADER_TODO) + ok(hr == test->expected_result, "Unexpected hr %#lx on test %u.\n", hr, i); + ok(full_topology != topology, "Unexpected instance.\n"); + } if (test->expected_result == S_OK && hr == S_OK) { @@ -3629,6 +3636,7 @@ static void test_video_processor(void) transform_inputs, ARRAY_SIZE(transform_inputs), transform_outputs, ARRAY_SIZE(transform_outputs), &transform, &CLSID_VideoProcessorMFT, &class_id)) goto failed; + has_video_processor = TRUE; todo_wine check_interface(transform, &IID_IMFVideoProcessorControl, TRUE); @@ -8183,6 +8191,7 @@ START_TEST(mf) return; } + test_video_processor(); test_topology(); test_topology_tee_node(); test_topology_loader(); @@ -8195,7 +8204,6 @@ START_TEST(mf) test_presentation_clock(); test_sample_grabber(); test_sample_grabber_is_mediatype_supported(); - test_video_processor(); test_quality_manager(); test_sar(); test_evr();
1
0
0
0
Rémi Bernon : winegstreamer: Register the video processor transform.
by Alexandre Julliard
11 May '22
11 May '22
Module: wine Branch: master Commit: fc2128d7fcd869b238932d50f034b8ff3e8be65c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fc2128d7fcd869b238932d50…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri May 6 09:46:48 2022 +0200 winegstreamer: Register the video processor transform. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/mfplat.c | 60 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c index 395b4239924..2e53afb0542 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c @@ -472,6 +472,56 @@ HRESULT mfplat_DllRegisterServer(void) {MFMediaType_Video, MFVideoFormat_YUY2}, }; + MFT_REGISTER_TYPE_INFO video_processor_input_types[] = + { + {MFMediaType_Video, MFVideoFormat_IYUV}, + {MFMediaType_Video, MFVideoFormat_YV12}, + {MFMediaType_Video, MFVideoFormat_NV12}, + {MFMediaType_Video, MFVideoFormat_YUY2}, + {MFMediaType_Video, MFVideoFormat_ARGB32}, + {MFMediaType_Video, MFVideoFormat_RGB32}, + {MFMediaType_Video, MFVideoFormat_NV11}, + {MFMediaType_Video, MFVideoFormat_AYUV}, + {MFMediaType_Video, MFVideoFormat_UYVY}, + {MFMediaType_Video, MEDIASUBTYPE_P208}, + {MFMediaType_Video, MFVideoFormat_RGB24}, + {MFMediaType_Video, MFVideoFormat_RGB555}, + {MFMediaType_Video, MFVideoFormat_RGB565}, + {MFMediaType_Video, MFVideoFormat_RGB8}, + {MFMediaType_Video, MFVideoFormat_I420}, + {MFMediaType_Video, MFVideoFormat_Y216}, + {MFMediaType_Video, MFVideoFormat_v410}, + {MFMediaType_Video, MFVideoFormat_Y41P}, + {MFMediaType_Video, MFVideoFormat_Y41T}, + {MFMediaType_Video, MFVideoFormat_Y42T}, + {MFMediaType_Video, MFVideoFormat_YVYU}, + {MFMediaType_Video, MFVideoFormat_420O}, + }; + MFT_REGISTER_TYPE_INFO video_processor_output_types[] = + { + {MFMediaType_Video, MFVideoFormat_IYUV}, + {MFMediaType_Video, MFVideoFormat_YV12}, + {MFMediaType_Video, MFVideoFormat_NV12}, + {MFMediaType_Video, MFVideoFormat_YUY2}, + {MFMediaType_Video, MFVideoFormat_ARGB32}, + {MFMediaType_Video, MFVideoFormat_RGB32}, + {MFMediaType_Video, MFVideoFormat_NV11}, + {MFMediaType_Video, MFVideoFormat_AYUV}, + {MFMediaType_Video, MFVideoFormat_UYVY}, + {MFMediaType_Video, MEDIASUBTYPE_P208}, + {MFMediaType_Video, MFVideoFormat_RGB24}, + {MFMediaType_Video, MFVideoFormat_RGB555}, + {MFMediaType_Video, MFVideoFormat_RGB565}, + {MFMediaType_Video, MFVideoFormat_RGB8}, + {MFMediaType_Video, MFVideoFormat_I420}, + {MFMediaType_Video, MFVideoFormat_Y216}, + {MFMediaType_Video, MFVideoFormat_v410}, + {MFMediaType_Video, MFVideoFormat_Y41P}, + {MFMediaType_Video, MFVideoFormat_Y41T}, + {MFMediaType_Video, MFVideoFormat_Y42T}, + {MFMediaType_Video, MFVideoFormat_YVYU}, + }; + struct mft { GUID clsid; @@ -515,6 +565,16 @@ HRESULT mfplat_DllRegisterServer(void) ARRAY_SIZE(h264_decoder_output_types), h264_decoder_output_types, }, + { + CLSID_VideoProcessorMFT, + MFT_CATEGORY_VIDEO_PROCESSOR, + L"Microsoft Video Processor MFT", + MFT_ENUM_FLAG_SYNCMFT, + ARRAY_SIZE(video_processor_input_types), + video_processor_input_types, + ARRAY_SIZE(video_processor_output_types), + video_processor_output_types, + }, }; unsigned int i;
1
0
0
0
Rémi Bernon : winegstreamer: Move MFT registration list out of static scope.
by Alexandre Julliard
11 May '22
11 May '22
Module: wine Branch: master Commit: 529efbb4c91365f2f555b3c09ffda946f3843f5d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=529efbb4c91365f2f555b3c0…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Apr 27 09:19:21 2022 +0200 winegstreamer: Move MFT registration list out of static scope. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/mfplat.c | 178 ++++++++++++++++++++------------------------ 1 file changed, 79 insertions(+), 99 deletions(-) diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c index 4b177f79924..395b4239924 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c @@ -437,114 +437,93 @@ HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj) return CLASS_E_CLASSNOTAVAILABLE; } -static WCHAR audio_converterW[] = L"Audio Converter"; -static const GUID *const audio_converter_supported_types[] = +HRESULT mfplat_DllRegisterServer(void) { - &MFAudioFormat_PCM, - &MFAudioFormat_Float, -}; + MFT_REGISTER_TYPE_INFO audio_converter_supported_types[] = + { + {MFMediaType_Audio, MFAudioFormat_PCM}, + {MFMediaType_Audio, MFAudioFormat_Float}, + }; -static WCHAR wma_decoderW[] = L"WMAudio Decoder MFT"; -static const GUID *const wma_decoder_input_types[] = -{ - &MEDIASUBTYPE_MSAUDIO1, - &MFAudioFormat_WMAudioV8, - &MFAudioFormat_WMAudioV9, - &MFAudioFormat_WMAudio_Lossless, -}; -static const GUID *const wma_decoder_output_types[] = -{ - &MFAudioFormat_PCM, - &MFAudioFormat_Float, -}; + MFT_REGISTER_TYPE_INFO wma_decoder_input_types[] = + { + {MFMediaType_Audio, MEDIASUBTYPE_MSAUDIO1}, + {MFMediaType_Audio, MFAudioFormat_WMAudioV8}, + {MFMediaType_Audio, MFAudioFormat_WMAudioV9}, + {MFMediaType_Audio, MFAudioFormat_WMAudio_Lossless}, + }; + MFT_REGISTER_TYPE_INFO wma_decoder_output_types[] = + { + {MFMediaType_Audio, MFAudioFormat_PCM}, + {MFMediaType_Audio, MFAudioFormat_Float}, + }; -static WCHAR h264_decoderW[] = L"Microsoft H264 Video Decoder MFT"; -static const GUID *const h264_decoder_input_types[] = -{ - &MFVideoFormat_H264, - &MFVideoFormat_H264_ES, -}; -static const GUID *const h264_decoder_output_types[] = -{ - &MFVideoFormat_NV12, - &MFVideoFormat_YV12, - &MFVideoFormat_IYUV, - &MFVideoFormat_I420, - &MFVideoFormat_YUY2, -}; + MFT_REGISTER_TYPE_INFO h264_decoder_input_types[] = + { + {MFMediaType_Video, MFVideoFormat_H264}, + {MFMediaType_Video, MFVideoFormat_H264_ES}, + }; + MFT_REGISTER_TYPE_INFO h264_decoder_output_types[] = + { + {MFMediaType_Video, MFVideoFormat_NV12}, + {MFMediaType_Video, MFVideoFormat_YV12}, + {MFMediaType_Video, MFVideoFormat_IYUV}, + {MFMediaType_Video, MFVideoFormat_I420}, + {MFMediaType_Video, MFVideoFormat_YUY2}, + }; -static const struct mft -{ - const GUID *clsid; - const GUID *category; - LPWSTR name; - const UINT32 flags; - const GUID *major_type; - const UINT32 input_types_count; - const GUID *const *input_types; - const UINT32 output_types_count; - const GUID *const *output_types; -} -mfts[] = -{ - { - &CLSID_WINEAudioConverter, - &MFT_CATEGORY_AUDIO_EFFECT, - audio_converterW, - MFT_ENUM_FLAG_SYNCMFT, - &MFMediaType_Audio, - ARRAY_SIZE(audio_converter_supported_types), - audio_converter_supported_types, - 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, - }, - { - &CLSID_MSH264DecoderMFT, - &MFT_CATEGORY_VIDEO_DECODER, - h264_decoderW, - MFT_ENUM_FLAG_SYNCMFT, - &MFMediaType_Video, - ARRAY_SIZE(h264_decoder_input_types), - h264_decoder_input_types, - ARRAY_SIZE(h264_decoder_output_types), - h264_decoder_output_types, - }, -}; + struct mft + { + GUID clsid; + GUID category; + WCHAR name[MAX_PATH]; + UINT32 flags; + UINT32 input_types_count; + MFT_REGISTER_TYPE_INFO *input_types; + UINT32 output_types_count; + MFT_REGISTER_TYPE_INFO *output_types; + } + mfts[] = + { + { + CLSID_WINEAudioConverter, + MFT_CATEGORY_AUDIO_EFFECT, + L"Audio Converter", + MFT_ENUM_FLAG_SYNCMFT, + ARRAY_SIZE(audio_converter_supported_types), + audio_converter_supported_types, + ARRAY_SIZE(audio_converter_supported_types), + audio_converter_supported_types, + }, + { + CLSID_WMADecMediaObject, + MFT_CATEGORY_AUDIO_DECODER, + L"WMAudio Decoder MFT", + MFT_ENUM_FLAG_SYNCMFT, + ARRAY_SIZE(wma_decoder_input_types), + wma_decoder_input_types, + ARRAY_SIZE(wma_decoder_output_types), + wma_decoder_output_types, + }, + { + CLSID_MSH264DecoderMFT, + MFT_CATEGORY_VIDEO_DECODER, + L"Microsoft H264 Video Decoder MFT", + MFT_ENUM_FLAG_SYNCMFT, + ARRAY_SIZE(h264_decoder_input_types), + h264_decoder_input_types, + ARRAY_SIZE(h264_decoder_output_types), + h264_decoder_output_types, + }, + }; -HRESULT mfplat_DllRegisterServer(void) -{ - unsigned int i, j; + unsigned int i; HRESULT hr; - MFT_REGISTER_TYPE_INFO input_types[4], output_types[5]; for (i = 0; i < ARRAY_SIZE(mfts); i++) { - const struct mft *cur = &mfts[i]; - - for (j = 0; j < cur->input_types_count; j++) - { - input_types[j].guidMajorType = *(cur->major_type); - input_types[j].guidSubtype = *(cur->input_types[j]); - } - for (j = 0; j < cur->output_types_count; j++) - { - output_types[j].guidMajorType = *(cur->major_type); - output_types[j].guidSubtype = *(cur->output_types[j]); - } - - hr = MFTRegister(*(cur->clsid), *(cur->category), cur->name, cur->flags, cur->input_types_count, - input_types, cur->output_types_count, output_types, NULL); + hr = MFTRegister(mfts[i].clsid, mfts[i].category, mfts[i].name, mfts[i].flags, mfts[i].input_types_count, + mfts[i].input_types, mfts[i].output_types_count, mfts[i].output_types, NULL); if (FAILED(hr)) { @@ -552,6 +531,7 @@ HRESULT mfplat_DllRegisterServer(void) return hr; } } + return S_OK; }
1
0
0
0
Andrew Eikum : mfplat: Allow NULL length pointer in IMFAttributes::GetAllocatedString.
by Alexandre Julliard
11 May '22
11 May '22
Module: wine Branch: master Commit: ca10760d2e7ea4f8718741592fd639f589247e53 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ca10760d2e7ea4f871874159…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Mon May 9 10:56:29 2022 -0500 mfplat: Allow NULL length pointer in IMFAttributes::GetAllocatedString. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/main.c | 3 ++- dlls/mfplat/tests/mfplat.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index cee052defeb..08195bca448 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -2670,7 +2670,8 @@ HRESULT attributes_GetAllocatedString(struct attributes *attributes, REFGUID key if (SUCCEEDED(hr)) { *value = attrval.pwszVal; - *length = lstrlenW(*value); + if (length) + *length = lstrlenW(*value); } return hr; diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index 8d21f2ed60e..8f18fcb293d 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -1638,6 +1638,11 @@ static void test_attributes(void) ok(hr == S_OK, "Failed to get string length, hr %#lx.\n", hr); ok(string_length == lstrlenW(stringW), "Unexpected length %u.\n", string_length); + hr = IMFAttributes_GetAllocatedString(attributes, &DUMMY_GUID1, &string, NULL); + ok(hr == S_OK, "Failed to get allocated string, hr %#lx.\n", hr); + ok(!lstrcmpW(string, stringW), "Unexpected string %s.\n", wine_dbgstr_w(string)); + CoTaskMemFree(string); + string_length = 0xdeadbeef; hr = IMFAttributes_GetAllocatedString(attributes, &DUMMY_GUID1, &string, &string_length); ok(hr == S_OK, "Failed to get allocated string, hr %#lx.\n", hr);
1
0
0
0
Nikolay Sivov : evr/sample: Use explicit critical section for release handling.
by Alexandre Julliard
11 May '22
11 May '22
Module: wine Branch: master Commit: d686663d22cb027fae7607acf3bae96ab34018f5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d686663d22cb027fae7607ac…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue May 10 19:16:18 2022 +0300 evr/sample: Use explicit critical section for release handling. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/evr/sample.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/evr/sample.c b/dlls/evr/sample.c index 738f803fe66..3521e6c4d51 100644 --- a/dlls/evr/sample.c +++ b/dlls/evr/sample.c @@ -923,7 +923,7 @@ static ULONG WINAPI video_sample_Release(IMFSample *iface) ULONG refcount = InterlockedDecrement(&sample->refcount); IMFAsyncResult *tracked_result = NULL; - IMFSample_LockStore(sample->sample); + EnterCriticalSection(&sample->cs); if (sample->tracked_result && sample->tracked_refcount == refcount) { tracked_result = sample->tracked_result; @@ -931,7 +931,7 @@ static ULONG WINAPI video_sample_Release(IMFSample *iface) sample->tracked_result = NULL; sample->tracked_refcount = 0; } - IMFSample_UnlockStore(sample->sample); + LeaveCriticalSection(&sample->cs); if (tracked_result) IMFAsyncResult_Release(tracked_result);
1
0
0
0
Nikolay Sivov : evr/sample: Avoid a race condition when releasing a tracked sample.
by Alexandre Julliard
11 May '22
11 May '22
Module: wine Branch: master Commit: ce71f5a05f226b3f68328d4632cd78ac9440d073 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ce71f5a05f226b3f68328d46…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue May 10 19:16:17 2022 +0300 evr/sample: Avoid a race condition when releasing a tracked sample. Same as b1807751219e256867eaac5cc4d8b97a5482978f. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/evr/sample.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dlls/evr/sample.c b/dlls/evr/sample.c index 1d29b6cdc2c..738f803fe66 100644 --- a/dlls/evr/sample.c +++ b/dlls/evr/sample.c @@ -920,19 +920,21 @@ static ULONG WINAPI video_sample_AddRef(IMFSample *iface) static ULONG WINAPI video_sample_Release(IMFSample *iface) { struct video_sample *sample = impl_from_IMFSample(iface); - ULONG refcount; + ULONG refcount = InterlockedDecrement(&sample->refcount); + IMFAsyncResult *tracked_result = NULL; IMFSample_LockStore(sample->sample); - if (sample->tracked_result && sample->tracked_refcount == (sample->refcount - 1)) + if (sample->tracked_result && sample->tracked_refcount == refcount) { - video_sample_tracking_thread_invoke(sample->tracked_result); - IMFAsyncResult_Release(sample->tracked_result); + tracked_result = sample->tracked_result; + video_sample_tracking_thread_invoke(tracked_result); sample->tracked_result = NULL; sample->tracked_refcount = 0; } IMFSample_UnlockStore(sample->sample); - refcount = InterlockedDecrement(&sample->refcount); + if (tracked_result) + IMFAsyncResult_Release(tracked_result); TRACE("%p, refcount %lu.\n", iface, refcount);
1
0
0
0
← Newer
1
...
60
61
62
63
64
65
66
...
91
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Results per page:
10
25
50
100
200