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
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
February 2020
----- 2025 -----
June 2025
May 2025
April 2025
March 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
874 discussions
Start a n
N
ew thread
Michael Stefaniuc : dmime: Split out the perf default port creation.
by Alexandre Julliard
16 Feb '20
16 Feb '20
Module: wine Branch: master Commit: d966413a49c8168e8cb9211e182e2c324d7249bf URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d966413a49c8168e8cb9211e…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Fri Feb 14 01:21:05 2020 +0100 dmime: Split out the perf default port creation. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmime/performance.c | 78 +++++++++++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 30 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index c492ebdcb1..b12247ea31 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -624,39 +624,57 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_RemoveNotificationType(IDirec return S_OK; } +static HRESULT perf_dmport_create(IDirectMusicPerformance8Impl *perf, DMUS_PORTPARAMS *params) +{ + IDirectMusicPort *port; + GUID guid; + unsigned int i; + HRESULT hr; + + if (FAILED(hr = IDirectMusic8_GetDefaultPort(perf->dmusic, &guid))) + return hr; + + params->dwSize = sizeof(params); + params->dwValidParams |= DMUS_PORTPARAMS_SHARE; + params->fShare = TRUE; + + if (FAILED(hr = IDirectMusic8_CreatePort(perf->dmusic, &guid, params, &port, NULL))) + return hr; + if (FAILED(hr = IDirectMusicPort_Activate(port, TRUE))) { + IDirectMusicPort_Release(port); + return hr; + } + for (i = 0; i < params->dwChannelGroups; i++) + pchannel_block_set(&perf->pchannels, i, port, i + 1, FALSE); + + return S_OK; +} + static HRESULT WINAPI IDirectMusicPerformance8Impl_AddPort(IDirectMusicPerformance8 *iface, - IDirectMusicPort *pPort) + IDirectMusicPort *port) { - IDirectMusicPerformance8Impl *This = impl_from_IDirectMusicPerformance8(iface); - HRESULT hr = E_FAIL; + IDirectMusicPerformance8Impl *This = impl_from_IDirectMusicPerformance8(iface); - FIXME("(%p, %p): stub\n", This, pPort); - if (!This->dmusic) - return DMUS_E_NOT_INIT; - if (NULL == pPort) { - GUID port_guid; - IDirectMusicPort* pDefaultPort = NULL; - DMUS_PORTPARAMS params; - hr = IDirectMusic8_GetDefaultPort(This->dmusic, &port_guid); - if (FAILED(hr)) return hr; - ZeroMemory(¶ms, sizeof(params)); - params.dwSize = sizeof(params); - params.dwValidParams = DMUS_PORTPARAMS_CHANNELGROUPS | DMUS_PORTPARAMS_SHARE; - params.dwChannelGroups = 1; - params.fShare = TRUE; - hr = IDirectMusic8_CreatePort(This->dmusic, &port_guid, ¶ms, &pDefaultPort, NULL); - if (FAILED(hr)) return hr; - hr = IDirectMusicPort_Activate(pDefaultPort, TRUE); - if (FAILED(hr)) { IDirectMusicPort_Release(pDefaultPort); return hr; } - IDirectMusicPerformance8_AssignPChannelBlock(iface, 0, pDefaultPort, 1); - } else { - IDirectMusicPort_AddRef(pPort); - } - /** - * We should remember added Ports (for example using a list) - * and control if Port is registered for each api who use ports - */ - return S_OK; + FIXME("(%p, %p): semi-stub\n", This, port); + + if (!This->dmusic) + return DMUS_E_NOT_INIT; + + if (!port) { + DMUS_PORTPARAMS params = { + .dwValidParams = DMUS_PORTPARAMS_CHANNELGROUPS, + .dwChannelGroups = 1 + }; + + return perf_dmport_create(This, ¶ms); + } + + IDirectMusicPort_AddRef(port); + /** + * We should remember added Ports (for example using a list) + * and control if Port is registered for each api who use ports + */ + return S_OK; } static HRESULT WINAPI IDirectMusicPerformance8Impl_RemovePort(IDirectMusicPerformance8 *iface,
1
0
0
0
Michael Stefaniuc : dmime/tests: Move some ok() calls to make it clear what is being tested.
by Alexandre Julliard
16 Feb '20
16 Feb '20
Module: wine Branch: master Commit: 67f55f9b13376789d02c9389515b68f14e69a673 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=67f55f9b13376789d02c9389…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Fri Feb 14 01:21:04 2020 +0100 dmime/tests: Move some ok() calls to make it clear what is being tested. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmime/tests/performance.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/dlls/dmime/tests/performance.c b/dlls/dmime/tests/performance.c index e6a3fe2271..ff275eb9c2 100644 --- a/dlls/dmime/tests/performance.c +++ b/dlls/dmime/tests/performance.c @@ -270,35 +270,27 @@ static void test_createport(void) /* dwValidParams == 0 -> S_OK, filled struct */ portparams.dwValidParams = 0; - hr = IDirectMusic_CreatePort(music, &CLSID_DirectMusicSynth, - &portparams, &port, NULL); + hr = IDirectMusic_CreatePort(music, &CLSID_DirectMusicSynth, &portparams, &port, NULL); ok(hr == S_OK, "CreatePort failed: %08x\n", hr); ok(port != NULL, "Didn't get IDirectMusicPort pointer\n"); - + todo_wine ok(portparams.dwValidParams, "portparams struct was not filled in\n"); IDirectMusicPort_Release(port); port = NULL; - todo_wine ok(portparams.dwValidParams != 0, "portparams struct was not filled in\n"); - /* dwValidParams != 0, invalid param -> S_FALSE, filled struct */ portparams.dwValidParams = DMUS_PORTPARAMS_CHANNELGROUPS; portparams.dwChannelGroups = 0; - hr = IDirectMusic_CreatePort(music, &CLSID_DirectMusicSynth, - &portparams, &port, NULL); + hr = IDirectMusic_CreatePort(music, &CLSID_DirectMusicSynth, &portparams, &port, NULL); todo_wine ok(hr == S_FALSE, "CreatePort failed: %08x\n", hr); ok(port != NULL, "Didn't get IDirectMusicPort pointer\n"); - + ok(portparams.dwValidParams, "portparams struct was not filled in\n"); IDirectMusicPort_Release(port); port = NULL; - ok(portparams.dwValidParams != 0, "portparams struct was not filled in\n"); - /* dwValidParams != 0, valid params -> S_OK */ - hr = IDirectMusic_CreatePort(music, &CLSID_DirectMusicSynth, - &portparams, &port, NULL); + hr = IDirectMusic_CreatePort(music, &CLSID_DirectMusicSynth, &portparams, &port, NULL); ok(hr == S_OK, "CreatePort failed: %08x\n", hr); ok(port != NULL, "Didn't get IDirectMusicPort pointer\n"); - IDirectMusicPort_Release(port); port = NULL; @@ -307,12 +299,10 @@ static void test_createport(void) hr = IDirectMusic_CreatePort(music, &GUID_NULL, &portparams, &port, NULL); ok(hr == S_OK, "CreatePort failed: %08x\n", hr); ok(port != NULL, "Didn't get IDirectMusicPort pointer\n"); - + todo_wine ok(portparams.dwValidParams, "portparams struct was not filled in\n"); IDirectMusicPort_Release(port); port = NULL; - todo_wine ok(portparams.dwValidParams != 0, "portparams struct was not filled in\n"); - /* null GUID fails */ portparams.dwValidParams = 0; hr = IDirectMusic_CreatePort(music, NULL, &portparams, &port, NULL);
1
0
0
0
Nikolay Sivov : ntdll: Add missing spec file entry for TpStartAsyncIoOperation().
by Alexandre Julliard
16 Feb '20
16 Feb '20
Module: wine Branch: master Commit: dec6abf75488784900a07bfc0327bcfb25adfda7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dec6abf75488784900a07bfc…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Feb 15 22:11:30 2020 +0300 ntdll: Add missing spec file entry for TpStartAsyncIoOperation(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/ntdll.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 7aa953ca6c..57055ae34e 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -1083,6 +1083,7 @@ @ stdcall TpSetTimer(ptr ptr long long) @ stdcall TpSetWait(ptr long ptr) @ stdcall TpSimpleTryPost(ptr ptr ptr) +@ stdcall TpStartAsyncIoOperation(ptr) @ stdcall TpWaitForTimer(ptr long) @ stdcall TpWaitForWait(ptr long) @ stdcall TpWaitForWork(ptr long)
1
0
0
0
Brendan Shanks : ntoskrnl: Fix emulation of RIP-relative addressing.
by Alexandre Julliard
16 Feb '20
16 Feb '20
Module: wine Branch: master Commit: 3810fb1ef047a6552354992958af3a7d26180229 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3810fb1ef047a65523549929…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Fri Feb 14 14:26:01 2020 -0800 ntoskrnl: Fix emulation of RIP-relative addressing. The target address is relative to the RIP of the next instruction, not the current RIP. Signed-off-by: Brendan Shanks <bshanks(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/instr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/ntoskrnl.exe/instr.c b/dlls/ntoskrnl.exe/instr.c index 05bdd23e82..77803f07d7 100644 --- a/dlls/ntoskrnl.exe/instr.c +++ b/dlls/ntoskrnl.exe/instr.c @@ -522,7 +522,7 @@ static void store_reg_byte( CONTEXT *context, BYTE regmodrm, const BYTE *addr, i * * Return the address of an instruction operand (from the mod/rm byte). */ -static BYTE *INSTR_GetOperandAddr( CONTEXT *context, BYTE *instr, +static BYTE *INSTR_GetOperandAddr( CONTEXT *context, BYTE *instr, int addl_instr_len, int long_addr, int rex, int segprefix, int *len ) { int mod, rm, ss = 0, off, have_sib = 0; @@ -566,6 +566,7 @@ static BYTE *INSTR_GetOperandAddr( CONTEXT *context, BYTE *instr, if (!long_addr) base &= 0xffffffff; GET_VAL( &off, DWORD ); base += (signed long)off; + base += (signed long)*len + (signed long)addl_instr_len; } break; @@ -793,7 +794,7 @@ static DWORD emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context ) case 0xb6: /* movzx Eb, Gv */ case 0xb7: /* movzx Ew, Gv */ { - BYTE *data = INSTR_GetOperandAddr( context, instr + 2, long_addr, + BYTE *data = INSTR_GetOperandAddr( context, instr + 2, prefixlen + 2, long_addr, rex, segprefix, &len ); unsigned int data_size = (instr[1] == 0xb7) ? 2 : 1; SIZE_T offset = data - user_shared_data; @@ -815,7 +816,7 @@ static DWORD emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context ) case 0x8a: /* mov Eb, Gb */ case 0x8b: /* mov Ev, Gv */ { - BYTE *data = INSTR_GetOperandAddr( context, instr + 1, long_addr, + BYTE *data = INSTR_GetOperandAddr( context, instr + 1, prefixlen + 1, long_addr, rex, segprefix, &len ); unsigned int data_size = (*instr == 0x8b) ? get_op_size( long_op, rex ) : 1; SIZE_T offset = data - user_shared_data;
1
0
0
0
Hans Leidekker : winhttp/tests: Use wide character string literals.
by Alexandre Julliard
16 Feb '20
16 Feb '20
Module: wine Branch: master Commit: ef908c59c1274f6cd8652795739a165f544b6e50 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ef908c59c1274f6cd8652795…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Feb 14 16:41:38 2020 +0100 winhttp/tests: Use wide character string literals. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winhttp/tests/notification.c | 55 ++-- dlls/winhttp/tests/url.c | 115 +++---- dlls/winhttp/tests/winhttp.c | 645 ++++++++++++++++---------------------- 3 files changed, 326 insertions(+), 489 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=ef908c59c1274f6cd865…
1
0
0
0
Zebediah Figura : winegstreamer: Negotiate allocators per source pin.
by Alexandre Julliard
16 Feb '20
16 Feb '20
Module: wine Branch: master Commit: 6745afd81d38e26b8890bd97163eb1e4494c6cb1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6745afd81d38e26b8890bd97…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Feb 13 22:55:56 2020 -0600 winegstreamer: Negotiate allocators per source pin. In particular, pass the correct buffer size for the format we have chosen. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48570
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/gstdemux.c | 91 +++++++++---------------------------------- 1 file changed, 19 insertions(+), 72 deletions(-) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index b62f44b6a1..1337cd0a81 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -57,7 +57,6 @@ struct gstdemux struct strmbase_sink sink; IAsyncReader *reader; - IMemAllocator *alloc; struct gstdemux_source **sources; unsigned int source_count; @@ -70,7 +69,6 @@ struct gstdemux GstPad *my_src, *their_sink; GstBus *bus; guint64 start, nextofs, nextpullofs, stop; - ALLOCATOR_PROPERTIES props; HANDLE no_more_pads_event, duration_event, error_event; HANDLE push_thread; @@ -486,11 +484,6 @@ static gboolean setcaps_sink(GstPad *pad, GstCaps *caps) if (!amt_from_gst_caps(caps, &pin->mt)) return FALSE; - if (IsEqualGUID(&pin->mt.formattype, &FORMAT_VideoInfo)) - { - VIDEOINFOHEADER *vih = (VIDEOINFOHEADER *)pin->mt.pbFormat; - filter->props.cbBuffer = max(filter->props.cbBuffer, vih->bmiHeader.biSizeImage); - } SetEvent(pin->caps_event); return TRUE; } @@ -1295,7 +1288,7 @@ static void unknown_type(GstElement *bin, GstPad *pad, GstCaps *caps, gpointer u g_free(strcaps); } -static HRESULT GST_Connect(struct gstdemux *This, IPin *pConnectPin, ALLOCATOR_PROPERTIES *props) +static HRESULT GST_Connect(struct gstdemux *This, IPin *pConnectPin) { LONGLONG avail; GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE( @@ -1304,7 +1297,6 @@ static HRESULT GST_Connect(struct gstdemux *This, IPin *pConnectPin, ALLOCATOR_P GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); - This->props = *props; IAsyncReader_Length(This->reader, &This->filesize, &avail); if (!This->bus) { @@ -1329,7 +1321,6 @@ static HRESULT GST_Connect(struct gstdemux *This, IPin *pConnectPin, ALLOCATOR_P return E_FAIL; This->initial = FALSE; - *props = This->props; This->nextofs = This->nextpullofs = 0; return S_OK; } @@ -1378,9 +1369,6 @@ static void gstdemux_destroy(struct strmbase_filter *iface) assert(hr == S_OK); } - if (filter->alloc) - IMemAllocator_Release(filter->alloc); - filter->alloc = NULL; if (filter->reader) IAsyncReader_Release(filter->reader); filter->reader = NULL; @@ -1529,46 +1517,16 @@ static HRESULT sink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE static HRESULT gstdemux_sink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *pmt) { struct gstdemux *filter = impl_from_strmbase_sink(iface); - IMemAllocator *allocator = NULL; - ALLOCATOR_PROPERTIES props; HRESULT hr = S_OK; mark_wine_thread(); - props.cBuffers = 8; - props.cbBuffer = 16384; - props.cbAlign = 1; - props.cbPrefix = 0; - filter->reader = NULL; - filter->alloc = NULL; if (FAILED(hr = IPin_QueryInterface(peer, &IID_IAsyncReader, (void **)&filter->reader))) return hr; - if (FAILED(hr = GST_Connect(filter, peer, &props))) - goto err; - - /* Some applications depend on IAsyncReader::RequestAllocator() passing a - * non-NULL preferred allocator. */ - hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC, - &IID_IMemAllocator, (void **)&allocator); - if (FAILED(hr)) - goto err; - hr = IAsyncReader_RequestAllocator(filter->reader, allocator, &props, &filter->alloc); - IMemAllocator_Release(allocator); - if (FAILED(hr)) - { - WARN("Failed to get allocator, hr %#x.\n", hr); - goto err; - } - - if (FAILED(hr = IMemAllocator_Commit(filter->alloc))) - { - WARN("Failed to commit allocator, hr %#x.\n", hr); - IMemAllocator_Release(filter->alloc); - filter->alloc = NULL; + if (FAILED(hr = GST_Connect(filter, peer))) goto err; - } return S_OK; err: @@ -1584,7 +1542,6 @@ static void gstdemux_sink_disconnect(struct strmbase_sink *iface) mark_wine_thread(); - IMemAllocator_Decommit(filter->alloc); GST_RemoveOutputPins(filter); } @@ -2083,37 +2040,27 @@ static HRESULT source_get_media_type(struct strmbase_pin *iface, unsigned int in } static HRESULT WINAPI GSTOutPin_DecideBufferSize(struct strmbase_source *iface, - IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest) + IMemAllocator *allocator, ALLOCATOR_PROPERTIES *props) { - struct gstdemux_source *This = impl_source_from_IPin(&iface->pin.IPin_iface); - TRACE("(%p)->(%p, %p)\n", This, pAlloc, ppropInputRequest); - /* Unused */ - return S_OK; -} - -static HRESULT WINAPI GSTOutPin_DecideAllocator(struct strmbase_source *base, - IMemInputPin *pPin, IMemAllocator **pAlloc) -{ - struct gstdemux_source *pin = impl_source_from_IPin(&base->pin.IPin_iface); - struct gstdemux *filter = impl_from_strmbase_filter(pin->pin.pin.filter); - HRESULT hr; - - TRACE("pin %p, peer %p, allocator %p.\n", pin, pPin, pAlloc); + struct gstdemux_source *pin = impl_source_from_IPin(&iface->pin.IPin_iface); + unsigned int buffer_size = 16384; + ALLOCATOR_PROPERTIES ret_props; - *pAlloc = NULL; - if (filter->alloc) + if (IsEqualGUID(&pin->pin.pin.mt.formattype, &FORMAT_VideoInfo)) { - hr = IMemInputPin_NotifyAllocator(pPin, filter->alloc, FALSE); - if (SUCCEEDED(hr)) - { - *pAlloc = filter->alloc; - IMemAllocator_AddRef(*pAlloc); - } + VIDEOINFOHEADER *format = (VIDEOINFOHEADER *)pin->pin.pin.mt.pbFormat; + buffer_size = format->bmiHeader.biSizeImage; + } + else if (IsEqualGUID(&pin->pin.pin.mt.formattype, &FORMAT_WaveFormatEx)) + { + WAVEFORMATEX *format = (WAVEFORMATEX *)pin->pin.pin.mt.pbFormat; + buffer_size = format->nAvgBytesPerSec; } - else - hr = VFW_E_NO_ALLOCATOR; - return hr; + props->cBuffers = max(props->cBuffers, 1); + props->cbBuffer = max(props->cbBuffer, buffer_size); + props->cbAlign = max(props->cbAlign, 1); + return IMemAllocator_SetProperties(allocator, props, &ret_props); } static void free_source_pin(struct gstdemux_source *pin) @@ -2155,8 +2102,8 @@ static const struct strmbase_source_ops source_ops = .base.pin_query_accept = source_query_accept, .base.pin_get_media_type = source_get_media_type, .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection, + .pfnDecideAllocator = BaseOutputPinImpl_DecideAllocator, .pfnDecideBufferSize = GSTOutPin_DecideBufferSize, - .pfnDecideAllocator = GSTOutPin_DecideAllocator, }; static struct gstdemux_source *create_pin(struct gstdemux *filter, const WCHAR *name)
1
0
0
0
Zebediah Figura : winegstreamer: Read samples synchronously in push_data().
by Alexandre Julliard
16 Feb '20
16 Feb '20
Module: wine Branch: master Commit: c90a36e38c460cd195dd3d9a2e3e950eb528faab URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c90a36e38c460cd195dd3d9a…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Feb 13 22:55:55 2020 -0600 winegstreamer: Read samples synchronously in push_data(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/gst_cbs.c | 9 ----- dlls/winegstreamer/gst_cbs.h | 5 --- dlls/winegstreamer/gstdemux.c | 81 ++++++++++++------------------------------- 3 files changed, 23 insertions(+), 72 deletions(-) diff --git a/dlls/winegstreamer/gst_cbs.c b/dlls/winegstreamer/gst_cbs.c index e7a4b41d55..679d87c52f 100644 --- a/dlls/winegstreamer/gst_cbs.c +++ b/dlls/winegstreamer/gst_cbs.c @@ -227,15 +227,6 @@ void unknown_type_wrapper(GstElement *bin, GstPad *pad, GstCaps *caps, gpointer call_cb(&cbdata); } -void release_sample_wrapper(gpointer data) -{ - struct cb_data cbdata = { RELEASE_SAMPLE }; - - cbdata.u.release_sample_data.data = data; - - call_cb(&cbdata); -} - gboolean query_sink_wrapper(GstPad *pad, GstObject *parent, GstQuery *query) { struct cb_data cbdata = { QUERY_SINK }; diff --git a/dlls/winegstreamer/gst_cbs.h b/dlls/winegstreamer/gst_cbs.h index 46f8add57c..a425671da7 100644 --- a/dlls/winegstreamer/gst_cbs.h +++ b/dlls/winegstreamer/gst_cbs.h @@ -42,7 +42,6 @@ enum CB_TYPE { REMOVED_DECODED_PAD, AUTOPLUG_BLACKLIST, UNKNOWN_TYPE, - RELEASE_SAMPLE, QUERY_SINK }; @@ -122,9 +121,6 @@ struct cb_data { GstCaps *caps; gpointer user; } unknown_type_data; - struct release_sample_data { - gpointer data; - } release_sample_data; struct query_sink_data { GstPad *pad; GstObject *parent; @@ -159,7 +155,6 @@ GstFlowReturn got_data_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) D void removed_decoded_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) DECLSPEC_HIDDEN; GstAutoplugSelectResult autoplug_blacklist_wrapper(GstElement *bin, GstPad *pad, GstCaps *caps, GstElementFactory *fact, gpointer user) DECLSPEC_HIDDEN; void unknown_type_wrapper(GstElement *bin, GstPad *pad, GstCaps *caps, gpointer user) DECLSPEC_HIDDEN; -void release_sample_wrapper(gpointer data) DECLSPEC_HIDDEN; void Gstreamer_transform_pad_added_wrapper(GstElement *filter, GstPad *pad, gpointer user) DECLSPEC_HIDDEN; gboolean query_sink_wrapper(GstPad *pad, GstObject *parent, GstQuery *query) DECLSPEC_HIDDEN; diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 0b5fee3027..b62f44b6a1 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -97,8 +97,6 @@ static inline struct gstdemux *impl_from_strmbase_filter(struct strmbase_filter return CONTAINING_RECORD(iface, struct gstdemux, filter); } -static const char *media_quark_string = "media-sample"; - static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0}; static const IMediaSeekingVtbl GST_Seeking_Vtbl; static const IQualityControlVtbl GSTOutPin_QualityControl_Vtbl; @@ -744,21 +742,20 @@ static gboolean event_sink(GstPad *pad, GstObject *parent, GstEvent *event) } } -static void release_sample(void *data) -{ - ULONG ret; - ret = IMediaSample_Release((IMediaSample *)data); - TRACE("Releasing %p returns %u\n", data, ret); -} - static DWORD CALLBACK push_data(LPVOID iface) { LONGLONG maxlen, curlen; struct gstdemux *This = iface; - IMediaSample *buf; - DWORD_PTR user; + GstMapInfo mapping; + GstBuffer *buffer; HRESULT hr; + if (!(buffer = gst_buffer_new_allocate(NULL, 16384, NULL))) + { + ERR("Failed to allocate memory.\n"); + return 0; + } + IBaseFilter_AddRef(&This->filter.IBaseFilter_iface); if (!This->stop) @@ -768,51 +765,30 @@ static DWORD CALLBACK push_data(LPVOID iface) TRACE("Starting..\n"); for (;;) { - REFERENCE_TIME tStart, tStop; ULONG len; - GstBuffer *gstbuf; - gsize bufsize; - BYTE *data; int ret; - hr = IMemAllocator_GetBuffer(This->alloc, &buf, NULL, NULL, 0); - if (FAILED(hr)) - break; - if (This->nextofs >= maxlen) break; - len = IMediaSample_GetSize(buf); - if (This->nextofs + len > maxlen) - len = maxlen - This->nextofs; - - tStart = MEDIATIME_FROM_BYTES(This->nextofs); - tStop = tStart + MEDIATIME_FROM_BYTES(len); - IMediaSample_SetTime(buf, &tStart, &tStop); + len = min(16384, maxlen - This->nextofs); - hr = IAsyncReader_Request(This->reader, buf, 0); - if (FAILED(hr)) { - IMediaSample_Release(buf); + if (!gst_buffer_map_range(buffer, -1, len, &mapping, GST_MAP_WRITE)) + { + ERR("Failed to map buffer.\n"); break; } - This->nextofs += len; - hr = IAsyncReader_WaitForNext(This->reader, -1, &buf, &user); - if (FAILED(hr) || !buf) { - if (buf) - IMediaSample_Release(buf); + hr = IAsyncReader_SyncRead(This->reader, This->nextofs, len, mapping.data); + gst_buffer_unmap(buffer, &mapping); + if (hr != S_OK) + { + ERR("Failed to read data, hr %#x.\n", hr); break; } - IMediaSample_GetPointer(buf, &data); - bufsize = IMediaSample_GetActualDataLength(buf); - gstbuf = gst_buffer_new_wrapped_full(0, data, bufsize, 0, bufsize, buf, release_sample_wrapper); - IMediaSample_AddRef(buf); - gst_mini_object_set_qdata(GST_MINI_OBJECT(gstbuf), g_quark_from_static_string(media_quark_string), buf, release_sample_wrapper); - if (!gstbuf) { - IMediaSample_Release(buf); - break; - } - gstbuf->duration = gstbuf->pts = -1; - ret = gst_pad_push(This->my_src, gstbuf); + This->nextofs += len; + + buffer->duration = buffer->pts = -1; + ret = gst_pad_push(This->my_src, buffer); if (ret >= 0) hr = S_OK; else @@ -825,14 +801,9 @@ static DWORD CALLBACK push_data(LPVOID iface) break; } - gst_pad_push_event(This->my_src, gst_event_new_eos()); + gst_buffer_unref(buffer); - TRACE("Almost stopping.. %08x\n", hr); - do { - IAsyncReader_WaitForNext(This->reader, 0, &buf, &user); - if (buf) - IMediaSample_Release(buf); - } while (buf); + gst_pad_push_event(This->my_src, gst_event_new_eos()); TRACE("Stopping.. %08x\n", hr); @@ -2332,12 +2303,6 @@ void CALLBACK perform_cb(TP_CALLBACK_INSTANCE *instance, void *user) unknown_type(data->bin, data->pad, data->caps, data->user); break; } - case RELEASE_SAMPLE: - { - struct release_sample_data *data = &cbdata->u.release_sample_data; - release_sample(data->data); - break; - } case QUERY_SINK: { struct query_sink_data *data = &cbdata->u.query_sink_data;
1
0
0
0
Zebediah Figura : quartz/filesource: Zero-initialize the file source filter.
by Alexandre Julliard
16 Feb '20
16 Feb '20
Module: wine Branch: master Commit: 5c057693c8ef0956bbe37ba8b85a5631296d5e71 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5c057693c8ef0956bbe37ba8…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Feb 13 22:55:54 2020 -0600 quartz/filesource: Zero-initialize the file source filter. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filesource.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index 11cc438be2..c1f7f69d5e 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -352,7 +352,7 @@ static void async_reader_destroy(struct strmbase_filter *iface) CloseHandle(filter->port); strmbase_filter_cleanup(&filter->filter); - CoTaskMemFree(filter); + free(filter); } static HRESULT async_reader_query_interface(struct strmbase_filter *iface, REFIID iid, void **out) @@ -414,31 +414,24 @@ static DWORD CALLBACK io_thread(void *arg) HRESULT AsyncReader_create(IUnknown *outer, void **out) { - AsyncReader *pAsyncRead; - - pAsyncRead = CoTaskMemAlloc(sizeof(AsyncReader)); + AsyncReader *object; - if (!pAsyncRead) + if (!(object = calloc(1, sizeof(*object)))) return E_OUTOFMEMORY; - strmbase_filter_init(&pAsyncRead->filter, outer, &CLSID_AsyncReader, &filter_ops); + strmbase_filter_init(&object->filter, outer, &CLSID_AsyncReader, &filter_ops); - pAsyncRead->IFileSourceFilter_iface.lpVtbl = &FileSource_Vtbl; + object->IFileSourceFilter_iface.lpVtbl = &FileSource_Vtbl; + object->IAsyncReader_iface.lpVtbl = &FileAsyncReader_Vtbl; - pAsyncRead->IAsyncReader_iface.lpVtbl = &FileAsyncReader_Vtbl; - - pAsyncRead->pszFileName = NULL; - - InitializeCriticalSection(&pAsyncRead->sample_cs); - pAsyncRead->sample_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": FileAsyncReader.sample_cs"); - InitializeConditionVariable(&pAsyncRead->sample_cv); - pAsyncRead->port = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0); - pAsyncRead->io_thread = CreateThread(NULL, 0, io_thread, pAsyncRead, 0, NULL); - - *out = &pAsyncRead->filter.IUnknown_inner; - - TRACE("-- created at %p\n", pAsyncRead); + InitializeCriticalSection(&object->sample_cs); + object->sample_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": FileAsyncReader.sample_cs"); + InitializeConditionVariable(&object->sample_cv); + object->port = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0); + object->io_thread = CreateThread(NULL, 0, io_thread, object, 0, NULL); + TRACE("Created file source %p.\n", object); + *out = &object->filter.IUnknown_inner; return S_OK; }
1
0
0
0
Zebediah Figura : d3dcompiler: Get rid of the unused "subexpressions" field of struct hlsl_ir_expr.
by Alexandre Julliard
16 Feb '20
16 Feb '20
Module: wine Branch: master Commit: 81a7da48b999a5fc4cf7470101fe88c489787593 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=81a7da48b999a5fc4cf74701…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Tue Feb 11 22:54:21 2020 -0600 d3dcompiler: Get rid of the unused "subexpressions" field of struct hlsl_ir_expr. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dcompiler_43/d3dcompiler_private.h | 1 - dlls/d3dcompiler_43/utils.c | 1 - 2 files changed, 2 deletions(-) diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h index 9c58830ffe..3146f57c59 100644 --- a/dlls/d3dcompiler_43/d3dcompiler_private.h +++ b/dlls/d3dcompiler_43/d3dcompiler_private.h @@ -879,7 +879,6 @@ struct hlsl_ir_expr struct hlsl_ir_node node; enum hlsl_ir_expr_op op; struct hlsl_ir_node *operands[3]; - struct list *subexpressions; }; enum hlsl_ir_jump_type diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c index a1470cd0f5..5e497495e6 100644 --- a/dlls/d3dcompiler_43/utils.c +++ b/dlls/d3dcompiler_43/utils.c @@ -2186,7 +2186,6 @@ static void free_ir_constructor(struct hlsl_ir_constructor *constructor) static void free_ir_expr(struct hlsl_ir_expr *expr) { - free_instr_list(expr->subexpressions); d3dcompiler_free(expr); }
1
0
0
0
Zebediah Figura : d3dcompiler: Parse the comma operator.
by Alexandre Julliard
16 Feb '20
16 Feb '20
Module: wine Branch: master Commit: 0778e817872fc350de15442bfb0bccb105932333 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0778e817872fc350de15442b…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Tue Feb 11 22:54:20 2020 -0600 d3dcompiler: Parse the comma operator. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dcompiler_43/hlsl.y | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y index f9e091af51..52b2b6310b 100644 --- a/dlls/d3dcompiler_43/hlsl.y +++ b/dlls/d3dcompiler_43/hlsl.y @@ -2455,7 +2455,9 @@ expr: assignment_expr } | expr ',' assignment_expr { - FIXME("Comma expression\n"); + $$ = $1; + list_move_tail($$, $3); + d3dcompiler_free($3); } %%
1
0
0
0
← Newer
1
...
37
38
39
40
41
42
43
...
88
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
Results per page:
10
25
50
100
200