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
November 2019
----- 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
1 participants
895 discussions
Start a n
N
ew thread
Zebediah Figura : quartz/tests: Add some tests for flushing on the VMR9.
by Alexandre Julliard
21 Nov '19
21 Nov '19
Module: wine Branch: master Commit: 866c4e2fde0dae11bb4af06608a039cab51eb454 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=866c4e2fde0dae11bb4af066…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Nov 20 21:06:30 2019 -0600 quartz/tests: Add some tests for flushing on the VMR9. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/vmr9.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 1550148355..93885e184d 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -1224,6 +1224,77 @@ static void test_filter_state(IMemInputPin *input, IFilterGraph2 *graph) IMediaControl_Release(control); } +static void test_flushing(IPin *pin, IMemInputPin *input, IFilterGraph2 *graph) +{ + IMemAllocator *allocator; + IMediaControl *control; + OAFilterState state; + HANDLE thread; + HRESULT hr; + + IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); + + hr = IMemInputPin_GetAllocator(input, &allocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IMemAllocator_Commit(allocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + IMemAllocator_Release(allocator); + + hr = IMediaControl_Pause(control); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + thread = send_frame(input); + todo_wine ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); + + hr = IMediaControl_GetState(control, 0, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IPin_BeginFlush(pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = join_thread(thread); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + thread = send_frame(input); + hr = join_thread(thread); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IPin_EndFlush(pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + /* We dropped the sample we were holding, so now we need a new one... */ + + hr = IMediaControl_GetState(control, 0, &state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + + thread = send_frame(input); + todo_wine ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); + + hr = IMediaControl_Run(control); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = join_thread(thread); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IPin_BeginFlush(pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + thread = send_frame(input); + hr = join_thread(thread); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IPin_EndFlush(pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + thread = send_frame(input); + hr = join_thread(thread); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_Stop(control); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + IMediaControl_Release(control); +} + static void test_connect_pin(void) { VIDEOINFOHEADER vih = @@ -1357,6 +1428,7 @@ static void test_connect_pin(void) ok(hr == S_OK, "Got hr %#x.\n", hr); test_filter_state(input, graph); + test_flushing(pin, input, graph); hr = IFilterGraph2_Disconnect(graph, pin); ok(hr == S_OK, "Got hr %#x.\n", hr);
1
0
0
0
Zebediah Figura : quartz/tests: Add some tests for VMR9 filter state.
by Alexandre Julliard
21 Nov '19
21 Nov '19
Module: wine Branch: master Commit: 2f5665aff66d084fafb15dd5c5401f193691941e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2f5665aff66d084fafb15dd5…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Nov 20 21:06:29 2019 -0600 quartz/tests: Add some tests for VMR9 filter state. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/vmr9.c | 226 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 226 insertions(+) diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 3346aaff84..1550148355 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -22,6 +22,7 @@ #include "dshow.h" #include "d3d9.h" #include "vmr9.h" +#include "wine/heap.h" #include "wine/strmbase.h" #include "wine/test.h" @@ -1014,6 +1015,215 @@ static void test_allocator(IMemInputPin *input) IMemAllocator_Release(req_allocator); } +struct frame_thread_params +{ + IMemInputPin *sink; + IMediaSample *sample; +}; + +static DWORD WINAPI frame_thread(void *arg) +{ + struct frame_thread_params *params = arg; + HRESULT hr; + + if (winetest_debug > 1) trace("%04x: Sending frame.\n", GetCurrentThreadId()); + hr = IMemInputPin_Receive(params->sink, params->sample); + if (winetest_debug > 1) trace("%04x: Returned %#x.\n", GetCurrentThreadId(), hr); + IMediaSample_Release(params->sample); + heap_free(params); + return hr; +} + +static HANDLE send_frame(IMemInputPin *sink) +{ + struct frame_thread_params *params = heap_alloc(sizeof(*params)); + REFERENCE_TIME start_time, end_time; + IMemAllocator *allocator; + IMediaSample *sample; + HANDLE thread; + HRESULT hr; + BYTE *data; + + hr = IMemInputPin_GetAllocator(sink, &allocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaSample_GetPointer(sample, &data); + ok(hr == S_OK, "Got hr %#x.\n", hr); + memset(data, 0x55, 32 * 16 * 4); + + hr = IMediaSample_SetActualDataLength(sample, 32 * 16 * 4); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + start_time = 0; + end_time = start_time + 10000000; + hr = IMediaSample_SetTime(sample, &start_time, &end_time); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + params->sink = sink; + params->sample = sample; + thread = CreateThread(NULL, 0, frame_thread, params, 0, NULL); + + IMemAllocator_Release(allocator); + return thread; +} + +static HRESULT join_thread_(int line, HANDLE thread) +{ + DWORD ret; + ok_(__FILE__, line)(!WaitForSingleObject(thread, 1000), "Wait failed.\n"); + GetExitCodeThread(thread, &ret); + CloseHandle(thread); + return ret; +} +#define join_thread(a) join_thread_(__LINE__, a) + +static void test_filter_state(IMemInputPin *input, IFilterGraph2 *graph) +{ + IMemAllocator *allocator; + IMediaControl *control; + IMediaSample *sample; + OAFilterState state; + HANDLE thread; + HRESULT hr; + + IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); + + thread = send_frame(input); + hr = join_thread(thread); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + + /* The renderer is not fully paused until it receives a sample. The thread + * sending the sample blocks in IMemInputPin_Receive() until the filter is + * stopped or run. */ + + hr = IMediaControl_Pause(control); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + + thread = send_frame(input); + + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + todo_wine ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); + + hr = IMediaControl_Stop(control); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = join_thread(thread); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + /* The sink will decommit our allocator for us when stopping, however it + * will not recommit it when pausing. */ + hr = IMemInputPin_GetAllocator(input, &allocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); + todo_wine ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + if (hr == S_OK) IMediaSample_Release(sample); + + hr = IMemAllocator_Commit(allocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + thread = send_frame(input); + hr = join_thread(thread); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + + hr = IMediaControl_Pause(control); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + + thread = send_frame(input); + + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + todo_wine ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); + + hr = IMediaControl_Run(control); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = join_thread(thread); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + thread = send_frame(input); + hr = join_thread(thread); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_Pause(control); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + + thread = send_frame(input); + + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + todo_wine ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); + + hr = IMediaControl_Run(control); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = join_thread(thread); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_Pause(control); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + + hr = IMediaControl_Stop(control); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMemAllocator_Commit(allocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_Pause(control); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + + hr = IMediaControl_Run(control); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + + thread = send_frame(input); + hr = join_thread(thread); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_Stop(control); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + IMemAllocator_Release(allocator); + IMediaControl_Release(control); +} + static void test_connect_pin(void) { VIDEOINFOHEADER vih = @@ -1032,9 +1242,11 @@ static void test_connect_pin(void) .cbFormat = sizeof(vih), .pbFormat = (BYTE *)&vih, }; + ALLOCATOR_PROPERTIES req_props = {1, 32 * 16 * 4, 1, 0}, ret_props; IBaseFilter *filter = create_vmr9(VMR9Mode_Windowed); IFilterGraph2 *graph = create_graph(); struct testfilter source; + IMemAllocator *allocator; IMemInputPin *input; unsigned int i, j; AM_MEDIA_TYPE mt; @@ -1132,6 +1344,20 @@ static void test_connect_pin(void) test_allocator(input); + hr = IMemInputPin_GetAllocator(input, &allocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(!memcmp(&ret_props, &req_props, sizeof(req_props)), "Properties did not match.\n"); + hr = IMemAllocator_Commit(allocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + IMemAllocator_Release(allocator); + + hr = IMemInputPin_ReceiveCanBlock(input); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + test_filter_state(input, graph); + hr = IFilterGraph2_Disconnect(graph, pin); ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin);
1
0
0
0
Zebediah Figura : quartz/tests: Add some tests for VMR9 allocator negotiation.
by Alexandre Julliard
21 Nov '19
21 Nov '19
Module: wine Branch: master Commit: 21aa7a106fbf3daad36244927070c324f58f01ca URL:
https://source.winehq.org/git/wine.git/?a=commit;h=21aa7a106fbf3daad3624492…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Nov 20 21:06:28 2019 -0600 quartz/tests: Add some tests for VMR9 allocator negotiation. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/vmr9.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index e30da6b782..3346aaff84 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -964,6 +964,56 @@ static void testfilter_init(struct testfilter *filter) strmbase_source_init(&filter->source, &testsource_vtbl, &filter->filter, L"", &testsource_ops); } +static void test_allocator(IMemInputPin *input) +{ + IMemAllocator *req_allocator, *ret_allocator; + ALLOCATOR_PROPERTIES props, req_props; + HRESULT hr; + + hr = IMemInputPin_GetAllocatorRequirements(input, &props); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + + hr = IMemInputPin_GetAllocator(input, &ret_allocator); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + + if (hr == S_OK) + { + hr = IMemAllocator_GetProperties(ret_allocator, &props); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(!props.cBuffers, "Got %d buffers.\n", props.cBuffers); + ok(!props.cbBuffer, "Got size %d.\n", props.cbBuffer); + ok(!props.cbAlign, "Got alignment %d.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + + hr = IMemInputPin_NotifyAllocator(input, ret_allocator, TRUE); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + req_props.cBuffers = 1; + req_props.cbBuffer = 32 * 16 * 4; + req_props.cbAlign = 1; + req_props.cbPrefix = 0; + hr = IMemAllocator_SetProperties(ret_allocator, &req_props, &props); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(props.cBuffers == 1, "Got %d buffers.\n", props.cBuffers); + ok(props.cbBuffer == 32 * 16 * 4, "Got size %d.\n", props.cbBuffer); + ok(props.cbAlign == 1, "Got alignment %d.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + + IMemAllocator_Release(ret_allocator); + } + + hr = IMemInputPin_NotifyAllocator(input, NULL, TRUE); + todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + + CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, + &IID_IMemAllocator, (void **)&req_allocator); + + hr = IMemInputPin_NotifyAllocator(input, req_allocator, TRUE); + todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + + IMemAllocator_Release(req_allocator); +} + static void test_connect_pin(void) { VIDEOINFOHEADER vih = @@ -985,6 +1035,7 @@ static void test_connect_pin(void) IBaseFilter *filter = create_vmr9(VMR9Mode_Windowed); IFilterGraph2 *graph = create_graph(); struct testfilter source; + IMemInputPin *input; unsigned int i, j; AM_MEDIA_TYPE mt; IPin *pin, *peer; @@ -1077,6 +1128,10 @@ static void test_connect_pin(void) ok(hr == S_OK, "Got hr %#x.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n"); + IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&input); + + test_allocator(input); + hr = IFilterGraph2_Disconnect(graph, pin); ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); @@ -1093,6 +1148,7 @@ static void test_connect_pin(void) ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); out: + IMemInputPin_Release(input); IPin_Release(pin); ref = IFilterGraph2_Release(graph); ok(!ref, "Got outstanding refcount %d.\n", ref);
1
0
0
0
Zebediah Figura : quartz/tests: Add some tests for flushing on the VMR7.
by Alexandre Julliard
21 Nov '19
21 Nov '19
Module: wine Branch: master Commit: 4f3dd5b3c56fea089db2f4fbfd35c72f4f00d85c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4f3dd5b3c56fea089db2f4fb…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Nov 20 21:06:27 2019 -0600 quartz/tests: Add some tests for flushing on the VMR7. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/vmr7.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index eb39a66742..50a1521f6e 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -1220,6 +1220,77 @@ static void test_filter_state(IMemInputPin *input, IFilterGraph2 *graph) IMediaControl_Release(control); } +static void test_flushing(IPin *pin, IMemInputPin *input, IFilterGraph2 *graph) +{ + IMemAllocator *allocator; + IMediaControl *control; + OAFilterState state; + HANDLE thread; + HRESULT hr; + + IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); + + hr = IMemInputPin_GetAllocator(input, &allocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IMemAllocator_Commit(allocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + IMemAllocator_Release(allocator); + + hr = IMediaControl_Pause(control); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + thread = send_frame(input); + todo_wine ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); + + hr = IMediaControl_GetState(control, 0, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IPin_BeginFlush(pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = join_thread(thread); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + thread = send_frame(input); + hr = join_thread(thread); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IPin_EndFlush(pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + /* We dropped the sample we were holding, so now we need a new one... */ + + hr = IMediaControl_GetState(control, 0, &state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + + thread = send_frame(input); + todo_wine ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); + + hr = IMediaControl_Run(control); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = join_thread(thread); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IPin_BeginFlush(pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + thread = send_frame(input); + hr = join_thread(thread); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IPin_EndFlush(pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + thread = send_frame(input); + hr = join_thread(thread); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_Stop(control); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + IMediaControl_Release(control); +} + static void test_connect_pin(void) { VIDEOINFOHEADER vih = @@ -1353,6 +1424,7 @@ static void test_connect_pin(void) ok(hr == S_OK, "Got hr %#x.\n", hr); test_filter_state(input, graph); + test_flushing(pin, input, graph); hr = IFilterGraph2_Disconnect(graph, pin); ok(hr == S_OK, "Got hr %#x.\n", hr);
1
0
0
0
Zebediah Figura : quartz/tests: Add some tests for VMR7 filter state.
by Alexandre Julliard
21 Nov '19
21 Nov '19
Module: wine Branch: master Commit: 6bac59199096feae36ce3fb0381007894f77adf5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6bac59199096feae36ce3fb0…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Nov 20 21:06:26 2019 -0600 quartz/tests: Add some tests for VMR7 filter state. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/vmr7.c | 226 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 226 insertions(+) diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index fdd493c089..eb39a66742 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -22,6 +22,7 @@ #include "dshow.h" #include "d3d9.h" #include "vmr9.h" +#include "wine/heap.h" #include "wine/strmbase.h" #include "wine/test.h" @@ -1010,6 +1011,215 @@ static void test_allocator(IMemInputPin *input) IMemAllocator_Release(req_allocator); } +struct frame_thread_params +{ + IMemInputPin *sink; + IMediaSample *sample; +}; + +static DWORD WINAPI frame_thread(void *arg) +{ + struct frame_thread_params *params = arg; + HRESULT hr; + + if (winetest_debug > 1) trace("%04x: Sending frame.\n", GetCurrentThreadId()); + hr = IMemInputPin_Receive(params->sink, params->sample); + if (winetest_debug > 1) trace("%04x: Returned %#x.\n", GetCurrentThreadId(), hr); + IMediaSample_Release(params->sample); + heap_free(params); + return hr; +} + +static HANDLE send_frame(IMemInputPin *sink) +{ + struct frame_thread_params *params = heap_alloc(sizeof(*params)); + REFERENCE_TIME start_time, end_time; + IMemAllocator *allocator; + IMediaSample *sample; + HANDLE thread; + HRESULT hr; + BYTE *data; + + hr = IMemInputPin_GetAllocator(sink, &allocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaSample_GetPointer(sample, &data); + ok(hr == S_OK, "Got hr %#x.\n", hr); + memset(data, 0x55, 32 * 16 * 4); + + hr = IMediaSample_SetActualDataLength(sample, 32 * 16 * 4); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + start_time = 0; + end_time = start_time + 10000000; + hr = IMediaSample_SetTime(sample, &start_time, &end_time); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + params->sink = sink; + params->sample = sample; + thread = CreateThread(NULL, 0, frame_thread, params, 0, NULL); + + IMemAllocator_Release(allocator); + return thread; +} + +static HRESULT join_thread_(int line, HANDLE thread) +{ + DWORD ret; + ok_(__FILE__, line)(!WaitForSingleObject(thread, 1000), "Wait failed.\n"); + GetExitCodeThread(thread, &ret); + CloseHandle(thread); + return ret; +} +#define join_thread(a) join_thread_(__LINE__, a) + +static void test_filter_state(IMemInputPin *input, IFilterGraph2 *graph) +{ + IMemAllocator *allocator; + IMediaControl *control; + IMediaSample *sample; + OAFilterState state; + HANDLE thread; + HRESULT hr; + + IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); + + thread = send_frame(input); + hr = join_thread(thread); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + + /* The renderer is not fully paused until it receives a sample. The thread + * sending the sample blocks in IMemInputPin_Receive() until the filter is + * stopped or run. */ + + hr = IMediaControl_Pause(control); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + + thread = send_frame(input); + + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + todo_wine ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); + + hr = IMediaControl_Stop(control); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = join_thread(thread); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + /* The sink will decommit our allocator for us when stopping, however it + * will not recommit it when pausing. */ + hr = IMemInputPin_GetAllocator(input, &allocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); + todo_wine ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + if (hr == S_OK) IMediaSample_Release(sample); + + hr = IMemAllocator_Commit(allocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + thread = send_frame(input); + hr = join_thread(thread); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + + hr = IMediaControl_Pause(control); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + + thread = send_frame(input); + + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + todo_wine ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); + + hr = IMediaControl_Run(control); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = join_thread(thread); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + thread = send_frame(input); + hr = join_thread(thread); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_Pause(control); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + + thread = send_frame(input); + + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + todo_wine ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); + + hr = IMediaControl_Run(control); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = join_thread(thread); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_Pause(control); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + + hr = IMediaControl_Stop(control); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMemAllocator_Commit(allocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_Pause(control); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + + hr = IMediaControl_Run(control); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + + thread = send_frame(input); + hr = join_thread(thread); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_Stop(control); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IMediaControl_GetState(control, 0, &state); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + IMemAllocator_Release(allocator); + IMediaControl_Release(control); +} + static void test_connect_pin(void) { VIDEOINFOHEADER vih = @@ -1028,9 +1238,11 @@ static void test_connect_pin(void) .cbFormat = sizeof(vih), .pbFormat = (BYTE *)&vih, }; + ALLOCATOR_PROPERTIES req_props = {1, 32 * 16 * 4, 1, 0}, ret_props; IBaseFilter *filter = create_vmr7(VMRMode_Windowed); IFilterGraph2 *graph = create_graph(); struct testfilter source; + IMemAllocator *allocator; IMemInputPin *input; AM_MEDIA_TYPE mt; IPin *pin, *peer; @@ -1128,6 +1340,20 @@ static void test_connect_pin(void) test_allocator(input); + hr = IMemInputPin_GetAllocator(input, &allocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(!memcmp(&ret_props, &req_props, sizeof(req_props)), "Properties did not match.\n"); + hr = IMemAllocator_Commit(allocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + IMemAllocator_Release(allocator); + + hr = IMemInputPin_ReceiveCanBlock(input); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + test_filter_state(input, graph); + hr = IFilterGraph2_Disconnect(graph, pin); ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin);
1
0
0
0
Nikolay Sivov : comctl32/rebar: Fix invalid band index access.
by Alexandre Julliard
21 Nov '19
21 Nov '19
Module: wine Branch: master Commit: d6c0f9f22a7f8925a44b5c304dced749c442a5d8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d6c0f9f22a7f8925a44b5c30…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Nov 21 10:45:20 2019 +0300 comctl32/rebar: Fix invalid band index access. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47991
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/rebar.c | 6 ++++-- dlls/comctl32/tests/rebar.c | 21 ++++++++++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 8c667a192b..6bca2f1818 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -1298,8 +1298,8 @@ static int REBAR_SetBandsHeight(const REBAR_INFO *infoPtr, INT iBeginBand, INT i REBAR_BAND *lpBand; int yMaxHeight = 0; int yPos = yStart; - int row = REBAR_GetBand(infoPtr, iBeginBand)->iRow; - int i; + int row, i; + for (i = iBeginBand; i < iEndBand; i = next_visible(infoPtr, i)) { lpBand = REBAR_GetBand(infoPtr, i); @@ -1308,6 +1308,8 @@ static int REBAR_SetBandsHeight(const REBAR_INFO *infoPtr, INT iBeginBand, INT i } TRACE("Bands [%d; %d) height: %d\n", iBeginBand, iEndBand, yMaxHeight); + row = iBeginBand < iEndBand ? REBAR_GetBand(infoPtr, iBeginBand)->iRow : 0; + for (i = iBeginBand; i < iEndBand; i = next_visible(infoPtr, i)) { lpBand = REBAR_GetBand(infoPtr, i); diff --git a/dlls/comctl32/tests/rebar.c b/dlls/comctl32/tests/rebar.c index 3b1be77497..6c82295d40 100644 --- a/dlls/comctl32/tests/rebar.c +++ b/dlls/comctl32/tests/rebar.c @@ -499,6 +499,7 @@ static void test_layout(void) REBARBANDINFOA rbi; HIMAGELIST himl; REBARINFO ri; + int count; rbsize_results_init(); @@ -660,9 +661,27 @@ static void test_layout(void) SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi); check_sizes(); - rbsize_results_free(); DestroyWindow(hRebar); pImageList_Destroy(himl); + + /* One hidden band. */ + hRebar = create_rebar_control(); + + rbi.cbSize = REBARBANDINFOA_V6_SIZE; + rbi.fMask = RBBIM_STYLE | RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_CHILD; + rbi.fStyle = RBBS_HIDDEN; + rbi.cx = 200; + rbi.cxMinChild = 100; + rbi.cyMinChild = 30; + rbi.hwndChild = NULL; + + SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi); + count = SendMessageA(hRebar, RB_GETROWCOUNT, 0, 0); + ok(!count, "Unexpected row count %d.\n", count); + + DestroyWindow(hRebar); + + rbsize_results_free(); } #if 0 /* use this to generate more tests */
1
0
0
0
Zebediah Figura : quartz/tests: Add some tests for allocator negotiation on the VMR7.
by Alexandre Julliard
21 Nov '19
21 Nov '19
Module: wine Branch: master Commit: 448fc5328dee071e629174cfddae321b2fb5a9e2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=448fc5328dee071e629174cf…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Nov 20 21:06:25 2019 -0600 quartz/tests: Add some tests for allocator negotiation on the VMR7. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/vmr7.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index 73017290fb..fdd493c089 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -960,6 +960,56 @@ static void testfilter_init(struct testfilter *filter) strmbase_source_init(&filter->source, &testsource_vtbl, &filter->filter, L"", &testsource_ops); } +static void test_allocator(IMemInputPin *input) +{ + IMemAllocator *req_allocator, *ret_allocator; + ALLOCATOR_PROPERTIES props, req_props; + HRESULT hr; + + hr = IMemInputPin_GetAllocatorRequirements(input, &props); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + + hr = IMemInputPin_GetAllocator(input, &ret_allocator); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + + if (hr == S_OK) + { + hr = IMemAllocator_GetProperties(ret_allocator, &props); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(!props.cBuffers, "Got %d buffers.\n", props.cBuffers); + ok(!props.cbBuffer, "Got size %d.\n", props.cbBuffer); + ok(!props.cbAlign, "Got alignment %d.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + + hr = IMemInputPin_NotifyAllocator(input, ret_allocator, TRUE); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + req_props.cBuffers = 1; + req_props.cbBuffer = 32 * 16 * 4; + req_props.cbAlign = 1; + req_props.cbPrefix = 0; + hr = IMemAllocator_SetProperties(ret_allocator, &req_props, &props); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(props.cBuffers == 1, "Got %d buffers.\n", props.cBuffers); + ok(props.cbBuffer == 32 * 16 * 4, "Got size %d.\n", props.cbBuffer); + ok(props.cbAlign == 1, "Got alignment %d.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + + IMemAllocator_Release(ret_allocator); + } + + hr = IMemInputPin_NotifyAllocator(input, NULL, TRUE); + todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + + CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, + &IID_IMemAllocator, (void **)&req_allocator); + + hr = IMemInputPin_NotifyAllocator(input, req_allocator, TRUE); + todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + + IMemAllocator_Release(req_allocator); +} + static void test_connect_pin(void) { VIDEOINFOHEADER vih = @@ -981,6 +1031,7 @@ static void test_connect_pin(void) IBaseFilter *filter = create_vmr7(VMRMode_Windowed); IFilterGraph2 *graph = create_graph(); struct testfilter source; + IMemInputPin *input; AM_MEDIA_TYPE mt; IPin *pin, *peer; unsigned int i; @@ -1073,6 +1124,10 @@ static void test_connect_pin(void) ok(hr == S_OK, "Got hr %#x.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n"); + IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&input); + + test_allocator(input); + hr = IFilterGraph2_Disconnect(graph, pin); ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); @@ -1088,6 +1143,7 @@ static void test_connect_pin(void) hr = IPin_ConnectionMediaType(pin, &mt); ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + IMemInputPin_Release(input); IPin_Release(pin); ref = IFilterGraph2_Release(graph); ok(!ref, "Got outstanding refcount %d.\n", ref);
1
0
0
0
Alexandre Julliard : wineboot: Also set the Flags value under ProfileList.
by Alexandre Julliard
21 Nov '19
21 Nov '19
Module: wine Branch: master Commit: 63f823157081c3efab5d71242b4b9f03b0c0033a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=63f823157081c3efab5d7124…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 21 09:24:35 2019 +0100 wineboot: Also set the Flags value under ProfileList. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/wineboot/wineboot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index 9710b78ab7..0a404c74a8 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -1204,9 +1204,10 @@ static void update_user_profile(void) if (!RegCreateKeyExW(hkey, sid, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &profile_hkey, NULL)) { + DWORD flags = 0; if (SHGetSpecialFolderPathW(NULL, profile, CSIDL_PROFILE, TRUE)) set_reg_value(profile_hkey, profile_image_path, profile); - + RegSetValueExW( profile_hkey, L"Flags", 0, REG_DWORD, (const BYTE *)&flags, sizeof(flags) ); RegCloseKey(profile_hkey); }
1
0
0
0
Dmitry Timoshkov : wineboot: Automatically create ProfileList key for current user.
by Alexandre Julliard
20 Nov '19
20 Nov '19
Module: wine Branch: master Commit: aa3d01e65019fb2f135f74cf26cfa1661ca09325 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aa3d01e65019fb2f135f74cf…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Nov 20 19:25:13 2019 +0800 wineboot: Automatically create ProfileList key for current user. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/wineboot/wineboot.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index cd5c9505b3..9710b78ab7 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -61,6 +61,7 @@ #include <unistd.h> #include <windows.h> #include <winternl.h> +#include <sddl.h> #include <wine/svcctl.h> #include <wine/asm.h> #include <wine/debug.h> @@ -1174,6 +1175,47 @@ static void install_root_pnp_devices(void) SetupDiDestroyDeviceInfoList(set); } +static void update_user_profile(void) +{ + static const WCHAR profile_list[] = {'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s',' ','N','T','\\', + 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', + 'P','r','o','f','i','l','e','L','i','s','t',0}; + static const WCHAR profile_image_path[] = {'P','r','o','f','i','l','e','I','m','a','g','e','P','a','t','h',0}; + char token_buf[sizeof(TOKEN_USER) + sizeof(SID) + sizeof(DWORD) * SID_MAX_SUB_AUTHORITIES]; + HANDLE token; + WCHAR profile[MAX_PATH], *sid; + DWORD size; + HKEY hkey, profile_hkey; + + if (!OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &token)) + return; + + size = sizeof(token_buf); + GetTokenInformation(token, TokenUser, token_buf, size, &size); + CloseHandle(token); + + ConvertSidToStringSidW(((TOKEN_USER *)token_buf)->User.Sid, &sid); + + if (!RegCreateKeyExW(HKEY_LOCAL_MACHINE, profile_list, 0, NULL, 0, + KEY_ALL_ACCESS, NULL, &hkey, NULL)) + { + if (!RegCreateKeyExW(hkey, sid, 0, NULL, 0, + KEY_ALL_ACCESS, NULL, &profile_hkey, NULL)) + { + if (SHGetSpecialFolderPathW(NULL, profile, CSIDL_PROFILE, TRUE)) + set_reg_value(profile_hkey, profile_image_path, profile); + + RegCloseKey(profile_hkey); + } + + RegCloseKey(hkey); + } + + LocalFree(sid); +} + /* execute rundll32 on the wine.inf file if necessary */ static void update_wineprefix( BOOL force ) { @@ -1218,6 +1260,7 @@ static void update_wineprefix( BOOL force ) DestroyWindow( hwnd ); } install_root_pnp_devices(); + update_user_profile(); WINE_MESSAGE( "wine: configuration in '%s' has been updated.\n", prettyprint_configdir() ); }
1
0
0
0
Nikolay Sivov : mfreadwrite/tests: Add some missing checks (Coverity).
by Alexandre Julliard
20 Nov '19
20 Nov '19
Module: wine Branch: master Commit: b8a846a5d156e8643b727ea5658e0b3297f9dd2a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b8a846a5d156e8643b727ea5…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Nov 20 13:12:19 2019 +0300 mfreadwrite/tests: Add some missing checks (Coverity). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfreadwrite/tests/mfplat.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/dlls/mfreadwrite/tests/mfplat.c b/dlls/mfreadwrite/tests/mfplat.c index 9678f64efe..e03d74981a 100644 --- a/dlls/mfreadwrite/tests/mfplat.c +++ b/dlls/mfreadwrite/tests/mfplat.c @@ -309,17 +309,22 @@ static HRESULT WINAPI test_source_CreatePresentationDescriptor(IMFMediaSource *i { for (i = 0; i < ARRAY_SIZE(source->streams); ++i) { - MFCreateMediaType(&media_type); + hr = MFCreateMediaType(&media_type); + ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); - IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio); - IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFAudioFormat_PCM); + hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio); + ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + hr = IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFAudioFormat_PCM); + ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); - MFCreateStreamDescriptor(i, 1, &media_type, &sds[i]); + hr = MFCreateStreamDescriptor(i, 1, &media_type, &sds[i]); + ok(hr == S_OK, "Failed to create stream descriptor, hr %#x.\n", hr); IMFMediaType_Release(media_type); } - MFCreatePresentationDescriptor(ARRAY_SIZE(sds), sds, &source->pd); + hr = MFCreatePresentationDescriptor(ARRAY_SIZE(sds), sds, &source->pd); + ok(hr == S_OK, "Failed to create presentation descriptor, hr %#x.\n", hr); for (i = 0; i < ARRAY_SIZE(sds); ++i) IMFStreamDescriptor_Release(sds[i]); @@ -349,6 +354,7 @@ static HRESULT WINAPI test_source_Start(IMFMediaSource *iface, IMFPresentationDe struct test_source *source = impl_from_IMFMediaSource(iface); MediaEventType event_type; PROPVARIANT var; + HRESULT hr; int i; ok(time_format && IsEqualGUID(time_format, &GUID_NULL), "Unexpected time format %s.\n", @@ -359,7 +365,8 @@ static HRESULT WINAPI test_source_Start(IMFMediaSource *iface, IMFPresentationDe EnterCriticalSection(&source->cs); event_type = source->state == SOURCE_RUNNING ? MESourceSeeked : MESourceStarted; - IMFMediaEventQueue_QueueEventParamVar(source->event_queue, event_type, &GUID_NULL, S_OK, NULL); + hr = IMFMediaEventQueue_QueueEventParamVar(source->event_queue, event_type, &GUID_NULL, S_OK, NULL); + ok(hr == S_OK, "Failed to queue event, hr %#x.\n", hr); for (i = 0; i < ARRAY_SIZE(source->streams); ++i) { @@ -370,11 +377,13 @@ static HRESULT WINAPI test_source_Start(IMFMediaSource *iface, IMFPresentationDe var.punkVal = (IUnknown *)&source->streams[i]->IMFMediaStream_iface; event_type = source->streams[i]->is_new ? MENewStream : MEUpdatedStream; source->streams[i]->is_new = FALSE; - IMFMediaEventQueue_QueueEventParamVar(source->event_queue, event_type, &GUID_NULL, S_OK, &var); + hr = IMFMediaEventQueue_QueueEventParamVar(source->event_queue, event_type, &GUID_NULL, S_OK, &var); + ok(hr == S_OK, "Failed to queue event, hr %#x.\n", hr); event_type = source->state == SOURCE_RUNNING ? MEStreamSeeked : MEStreamStarted; - IMFMediaEventQueue_QueueEventParamVar(source->streams[i]->event_queue, event_type, &GUID_NULL, + hr = IMFMediaEventQueue_QueueEventParamVar(source->streams[i]->event_queue, event_type, &GUID_NULL, S_OK, NULL); + ok(hr == S_OK, "Failed to queue event, hr %#x.\n", hr); } source->state = SOURCE_RUNNING; @@ -399,8 +408,10 @@ static HRESULT WINAPI test_source_Pause(IMFMediaSource *iface) static HRESULT WINAPI test_source_Shutdown(IMFMediaSource *iface) { struct test_source *source = impl_from_IMFMediaSource(iface); + HRESULT hr; - IMFMediaEventQueue_Shutdown(source->event_queue); + hr = IMFMediaEventQueue_Shutdown(source->event_queue); + ok(hr == S_OK, "Failed to shut down event queue, hr %#x.\n", hr); return S_OK; }
1
0
0
0
← Newer
1
...
36
37
38
39
40
41
42
...
90
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
Results per page:
10
25
50
100
200