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 2020
----- 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
743 discussions
Start a n
N
ew thread
Jacek Caban : wintab32: Fix -Wabsolute-value warning.
by Alexandre Julliard
28 May '20
28 May '20
Module: wine Branch: master Commit: ca8de0e9f88b53858695179d2eb3b3917b097639 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ca8de0e9f88b53858695179d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed May 27 23:55:58 2020 +0200 wintab32: Fix -Wabsolute-value warning. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wintab32/context.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/wintab32/context.c b/dlls/wintab32/context.c index ff9a4ca677..2da0462193 100644 --- a/dlls/wintab32/context.c +++ b/dlls/wintab32/context.c @@ -223,7 +223,10 @@ LPOPENCONTEXT AddPacketToContextQueue(LPWTPACKET packet, HWND hwnd) if (ptr->context.lcOutExtY > 0) packet->pkY = ptr->context.lcOutExtY - packet->pkY; else if (ptr->context.lcOutExtY < 0) - packet->pkY = abs(ptr->context.lcOutExtY + packet->pkY); + { + int y = ptr->context.lcOutExtY + packet->pkY; + packet->pkY = abs(y); + } DUMPPACKET(*packet);
1
0
0
0
Jacek Caban : kernel32/tests: Avoid using abs on ULONGLONG values.
by Alexandre Julliard
28 May '20
28 May '20
Module: wine Branch: master Commit: 0a3a2556c19df9e85cd48c17ed6ea83c5dc79ebd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0a3a2556c19df9e85cd48c17…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed May 27 23:55:35 2020 +0200 kernel32/tests: Avoid using abs on ULONGLONG values. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 2e26e2ace8..7001baa173 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -3546,7 +3546,7 @@ static BOOL check_file_time( const FILETIME *ft1, const FILETIME *ft2, UINT tole { ULONGLONG t1 = ((ULONGLONG)ft1->dwHighDateTime << 32) | ft1->dwLowDateTime; ULONGLONG t2 = ((ULONGLONG)ft2->dwHighDateTime << 32) | ft2->dwLowDateTime; - return abs(t1 - t2) <= tolerance; + return (t1 > t2 ? t1 - t2 : t2 - t1) <= tolerance; } static void test_ReplaceFileA(void)
1
0
0
0
Jacek Caban : kernel32/tests: Remove workaround for NT4.
by Alexandre Julliard
28 May '20
28 May '20
Module: wine Branch: master Commit: 90f81e619800858d77a485d05a03da57edd12a46 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=90f81e619800858d77a485d0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed May 27 23:55:30 2020 +0200 kernel32/tests: Remove workaround for NT4. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/resource.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/resource.c b/dlls/kernel32/tests/resource.c index aef131d32e..cd3921426b 100644 --- a/dlls/kernel32/tests/resource.c +++ b/dlls/kernel32/tests/resource.c @@ -405,8 +405,7 @@ static void check_exe( const sec_verify *verify ) dir = (void*) ((BYTE*) dos + sec[verify->rsrc_section].VirtualAddress); ok( dir->Characteristics == 0, "Characteristics wrong\n"); - ok( dir->TimeDateStamp == 0 || abs( dir->TimeDateStamp - GetTickCount() ) < 1000 /* nt4 */, - "TimeDateStamp wrong %u\n", dir->TimeDateStamp); + ok( dir->TimeDateStamp == 0, "TimeDateStamp wrong %u\n", dir->TimeDateStamp); ok( dir->MajorVersion == 4, "MajorVersion wrong\n"); ok( dir->MinorVersion == 0, "MinorVersion wrong\n");
1
0
0
0
Jacek Caban : dmusic/tests: Introduce compare_time helper.
by Alexandre Julliard
28 May '20
28 May '20
Module: wine Branch: master Commit: 5dd670c7c54d6c170088499021ce78a1694fdd9d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5dd670c7c54d6c1700884990…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed May 27 23:55:15 2020 +0200 dmusic/tests: Introduce compare_time helper. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmusic/tests/dmusic.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/dmusic/tests/dmusic.c b/dlls/dmusic/tests/dmusic.c index 776f9d0ec9..c7de6c5326 100644 --- a/dlls/dmusic/tests/dmusic.c +++ b/dlls/dmusic/tests/dmusic.c @@ -30,6 +30,12 @@ #include "dmusicf.h" #include "dmksctrl.h" +static BOOL compare_time(REFERENCE_TIME x, REFERENCE_TIME y, unsigned int max_diff) +{ + REFERENCE_TIME diff = x > y ? x - y : y - x; + return diff <= max_diff; +} + static void test_dmusic(void) { IDirectMusic *dmusic = NULL; @@ -800,7 +806,7 @@ static void test_master_clock(void) hr = IReferenceClock_GetTime(clock, &time1); ok(hr == S_OK, "Got hr %#x.\n", hr); time2 = counter.QuadPart * 10000000.0 / freq.QuadPart; - ok(abs(time1 - time2) < 20 * 10000, "Expected about %s, got %s.\n", + ok(compare_time(time1, time2, 20 * 10000), "Expected about %s, got %s.\n", wine_dbgstr_longlong(time2), wine_dbgstr_longlong(time1)); hr = IReferenceClock_GetTime(clock, &time2);
1
0
0
0
Zebediah Figura : quartz/vmr9: Trace argument values instead of omitting them.
by Alexandre Julliard
27 May '20
27 May '20
Module: wine Branch: master Commit: e48fabff525061c8eea9558084a97308cebe6b7b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e48fabff525061c8eea95580…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed May 27 11:47:38 2020 -0500 quartz/vmr9: Trace argument values instead of omitting them. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/vmr9.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 8ba82e8259..4ea3b483a7 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -2583,19 +2583,21 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface) return refCount; } -static HRESULT WINAPI VMR9_ImagePresenter_StartPresenting(IVMRImagePresenter9 *iface, DWORD_PTR id) +static HRESULT WINAPI VMR9_ImagePresenter_StartPresenting(IVMRImagePresenter9 *iface, DWORD_PTR cookie) { - struct default_presenter *This = impl_from_IVMRImagePresenter9(iface); + struct default_presenter *presenter = impl_from_IVMRImagePresenter9(iface); + + TRACE("presenter %p, cookie %#Ix.\n", presenter, cookie); - TRACE("(%p/%p/%p)->(...) stub\n", iface, This,This->pVMR9); return S_OK; } -static HRESULT WINAPI VMR9_ImagePresenter_StopPresenting(IVMRImagePresenter9 *iface, DWORD_PTR id) +static HRESULT WINAPI VMR9_ImagePresenter_StopPresenting(IVMRImagePresenter9 *iface, DWORD_PTR cookie) { - struct default_presenter *This = impl_from_IVMRImagePresenter9(iface); + struct default_presenter *presenter = impl_from_IVMRImagePresenter9(iface); + + TRACE("presenter %p, cookie %#Ix.\n", presenter, cookie); - TRACE("(%p/%p/%p)->(...) stub\n", iface, This,This->pVMR9); return S_OK; } @@ -2619,13 +2621,14 @@ static HRESULT VMR9_ImagePresenter_PresentOffscreenSurface(struct default_presen return hr; } -static HRESULT WINAPI VMR9_ImagePresenter_PresentImage(IVMRImagePresenter9 *iface, DWORD_PTR id, VMR9PresentationInfo *info) +static HRESULT WINAPI VMR9_ImagePresenter_PresentImage(IVMRImagePresenter9 *iface, + DWORD_PTR cookie, VMR9PresentationInfo *info) { struct default_presenter *This = impl_from_IVMRImagePresenter9(iface); HRESULT hr; BOOL render = FALSE; - TRACE("(%p/%p/%p)->(...) stub\n", iface, This, This->pVMR9); + TRACE("presenter %p, cookie %#Ix, info %p.\n", This, cookie, info); /* This might happen if we don't have active focus (eg on a different virtual desktop) */ if (!This->d3d9_dev) @@ -2857,14 +2860,14 @@ static HRESULT WINAPI VMR9_SurfaceAllocator_GetSurface(IVMRSurfaceAllocator9 *if } static HRESULT WINAPI VMR9_SurfaceAllocator_AdviseNotify(IVMRSurfaceAllocator9 *iface, - IVMRSurfaceAllocatorNotify9 *allocnotify) + IVMRSurfaceAllocatorNotify9 *notify) { - struct default_presenter *This = impl_from_IVMRSurfaceAllocator9(iface); + struct default_presenter *presenter = impl_from_IVMRSurfaceAllocator9(iface); - TRACE("(%p/%p)->(...)\n", iface, This); + TRACE("presenter %p, notify %p.\n", presenter, notify); /* No AddRef taken here or the base VMR9 filter would never be destroyed */ - This->SurfaceAllocatorNotify = allocnotify; + presenter->SurfaceAllocatorNotify = notify; return S_OK; }
1
0
0
0
Zebediah Figura : quartz/vmr9: Get rid of CreateRenderingWindow().
by Alexandre Julliard
27 May '20
27 May '20
Module: wine Branch: master Commit: c6abb3b241b67934b1bebebac70293ea3e0cdf3c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c6abb3b241b67934b1bebeba…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed May 27 11:47:37 2020 -0500 quartz/vmr9: Get rid of CreateRenderingWindow(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/vmr9.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 6f699ce70f..8ba82e8259 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -2751,8 +2751,10 @@ static UINT d3d9_adapter_from_hwnd(IDirect3D9 *d3d9, HWND hwnd, HMONITOR *mon_ou return d3d9_adapter; } -static BOOL CreateRenderingWindow(struct default_presenter *This, VMR9AllocationInfo *info, DWORD *numbuffers) +static HRESULT WINAPI VMR9_SurfaceAllocator_InitializeDevice(IVMRSurfaceAllocator9 *iface, + DWORD_PTR cookie, VMR9AllocationInfo *info, DWORD *numbuffers) { + struct default_presenter *This = impl_from_IVMRSurfaceAllocator9(iface); D3DPRESENT_PARAMETERS d3dpp; IDirect3DDevice9 *device; DWORD d3d9_adapter; @@ -2760,7 +2762,9 @@ static BOOL CreateRenderingWindow(struct default_presenter *This, VMR9Allocation HWND window; HRESULT hr; - TRACE("(%p)->()\n", This); + TRACE("presenter %p, cookie %#Ix, info %p, numbuffers %p.\n", This, cookie, info, numbuffers); + + This->info = *info; if (This->pVMR9->mode == VMR9Mode_Windowed) window = This->pVMR9->window.hwnd; @@ -2783,7 +2787,7 @@ static BOOL CreateRenderingWindow(struct default_presenter *This, VMR9Allocation if (FAILED(hr)) { ERR("Could not create device: %08x\n", hr); - return FALSE; + return hr; } IDirect3DDevice9_GetDeviceCaps(device, &caps); @@ -2791,14 +2795,14 @@ static BOOL CreateRenderingWindow(struct default_presenter *This, VMR9Allocation { WARN("Device does not support blitting from textures.\n"); IDirect3DDevice9_Release(device); - return FALSE; + return VFW_E_DDRAW_CAPS_NOT_SUITABLE; } This->d3d9_dev = device; IVMRSurfaceAllocatorNotify9_SetD3DDevice(This->SurfaceAllocatorNotify, This->d3d9_dev, This->hMon); if (!(This->d3d9_surfaces = calloc(*numbuffers, sizeof(IDirect3DSurface9 *)))) - return FALSE; + return E_OUTOFMEMORY; hr = VMR9_SurfaceAllocator_SetAllocationSettings(This, info); if (FAILED(hr)) @@ -2814,27 +2818,11 @@ static BOOL CreateRenderingWindow(struct default_presenter *This, VMR9Allocation if (FAILED(hr)) { IVMRSurfaceAllocator9_TerminateDevice(This->pVMR9->allocator, This->pVMR9->cookie); - return FALSE; + return hr; } This->num_surfaces = *numbuffers; - return TRUE; -} - -static HRESULT WINAPI VMR9_SurfaceAllocator_InitializeDevice(IVMRSurfaceAllocator9 *iface, - DWORD_PTR cookie, VMR9AllocationInfo *allocinfo, DWORD *numbuffers) -{ - struct default_presenter *This = impl_from_IVMRSurfaceAllocator9(iface); - - This->info = *allocinfo; - - if (!CreateRenderingWindow(This, allocinfo, numbuffers)) - { - ERR("Failed to create rendering window, expect no output!\n"); - return VFW_E_WRONG_STATE; - } - return S_OK; }
1
0
0
0
Zebediah Figura : quartz/vmr9: Remove the unused "allocator_mon" field.
by Alexandre Julliard
27 May '20
27 May '20
Module: wine Branch: master Commit: 6ccbc0579d7b3857687e2611ca586a4cbb9d99a3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6ccbc0579d7b3857687e2611…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed May 27 11:47:36 2020 -0500 quartz/vmr9: Remove the unused "allocator_mon" field. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/vmr9.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index bc03326599..6f699ce70f 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -97,7 +97,6 @@ struct quartz_vmr /* Presentation related members */ IDirect3DDevice9 *allocator_d3d9_dev; - HMONITOR allocator_mon; IDirect3DSurface9 **surfaces; DWORD num_surfaces; DWORD cur_surface; @@ -1987,7 +1986,6 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_SetD3DDevice(IVMRSurfaceAllocat IDirect3DDevice9_Release(filter->allocator_d3d9_dev); filter->allocator_d3d9_dev = device; IDirect3DDevice9_AddRef(device); - filter->allocator_mon = monitor; return S_OK; } @@ -2001,7 +1999,6 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_ChangeD3DDevice(IVMRSurfaceAllo IDirect3DDevice9_Release(This->allocator_d3d9_dev); This->allocator_d3d9_dev = device; IDirect3DDevice9_AddRef(This->allocator_d3d9_dev); - This->allocator_mon = monitor; return S_OK; }
1
0
0
0
Zebediah Figura : quartz/vmr9: Don't expose IVMRSurfaceAllocatorEx9 from the default presenter.
by Alexandre Julliard
27 May '20
27 May '20
Module: wine Branch: master Commit: aa44879a09b29997e68f416c0c6e77d0a0ea82bf URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aa44879a09b29997e68f416c…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed May 27 11:47:35 2020 -0500 quartz/vmr9: Don't expose IVMRSurfaceAllocatorEx9 from the default presenter. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/vmr9.c | 58 +++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index e02b642dbc..bc03326599 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -174,7 +174,7 @@ static inline struct quartz_vmr *impl_from_IVMRWindowlessControl9(IVMRWindowless struct default_presenter { IVMRImagePresenter9 IVMRImagePresenter9_iface; - IVMRSurfaceAllocatorEx9 IVMRSurfaceAllocatorEx9_iface; + IVMRSurfaceAllocator9 IVMRSurfaceAllocator9_iface; LONG refCount; @@ -195,9 +195,9 @@ static inline struct default_presenter *impl_from_IVMRImagePresenter9(IVMRImageP return CONTAINING_RECORD(iface, struct default_presenter, IVMRImagePresenter9_iface); } -static inline struct default_presenter *impl_from_IVMRSurfaceAllocatorEx9(IVMRSurfaceAllocatorEx9 *iface) +static inline struct default_presenter *impl_from_IVMRSurfaceAllocator9(IVMRSurfaceAllocator9 *iface) { - return CONTAINING_RECORD(iface, struct default_presenter, IVMRSurfaceAllocatorEx9_iface); + return CONTAINING_RECORD(iface, struct default_presenter, IVMRSurfaceAllocator9_iface); } static HRESULT VMR9DefaultAllocatorPresenterImpl_create(struct quartz_vmr *parent, LPVOID * ppv); @@ -1367,7 +1367,8 @@ static HRESULT WINAPI VMR9FilterConfig_SetRenderingMode(IVMRFilterConfig9 *iface hr = VMR9DefaultAllocatorPresenterImpl_create(This, (LPVOID*)&This->presenter); if (SUCCEEDED(hr)) - hr = IVMRImagePresenter9_QueryInterface(This->presenter, &IID_IVMRSurfaceAllocatorEx9, (LPVOID*)&This->allocator); + hr = IVMRImagePresenter9_QueryInterface(This->presenter, + &IID_IVMRSurfaceAllocator9, (void **)&This->allocator); if (FAILED(hr)) { ERR("Unable to find Presenter interface\n"); @@ -2530,8 +2531,8 @@ static HRESULT WINAPI VMR9_ImagePresenter_QueryInterface(IVMRImagePresenter9 *if if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IVMRImagePresenter9)) *ppv = &This->IVMRImagePresenter9_iface; - else if (IsEqualIID(riid, &IID_IVMRSurfaceAllocatorEx9)) - *ppv = &This->IVMRSurfaceAllocatorEx9_iface; + else if (IsEqualIID(riid, &IID_IVMRSurfaceAllocator9)) + *ppv = &This->IVMRSurfaceAllocator9_iface; if (*ppv) { @@ -2667,25 +2668,22 @@ static const IVMRImagePresenter9Vtbl VMR9_ImagePresenter = VMR9_ImagePresenter_PresentImage }; -static HRESULT WINAPI VMR9_SurfaceAllocator_QueryInterface(IVMRSurfaceAllocatorEx9 *iface, REFIID riid, LPVOID * ppv) +static HRESULT WINAPI VMR9_SurfaceAllocator_QueryInterface(IVMRSurfaceAllocator9 *iface, REFIID iid, void **out) { - struct default_presenter *This = impl_from_IVMRSurfaceAllocatorEx9(iface); - - return VMR9_ImagePresenter_QueryInterface(&This->IVMRImagePresenter9_iface, riid, ppv); + struct default_presenter *presenter = impl_from_IVMRSurfaceAllocator9(iface); + return IVMRImagePresenter9_QueryInterface(&presenter->IVMRImagePresenter9_iface, iid, out); } -static ULONG WINAPI VMR9_SurfaceAllocator_AddRef(IVMRSurfaceAllocatorEx9 *iface) +static ULONG WINAPI VMR9_SurfaceAllocator_AddRef(IVMRSurfaceAllocator9 *iface) { - struct default_presenter *This = impl_from_IVMRSurfaceAllocatorEx9(iface); - - return VMR9_ImagePresenter_AddRef(&This->IVMRImagePresenter9_iface); + struct default_presenter *presenter = impl_from_IVMRSurfaceAllocator9(iface); + return IVMRImagePresenter9_AddRef(&presenter->IVMRImagePresenter9_iface); } -static ULONG WINAPI VMR9_SurfaceAllocator_Release(IVMRSurfaceAllocatorEx9 *iface) +static ULONG WINAPI VMR9_SurfaceAllocator_Release(IVMRSurfaceAllocator9 *iface) { - struct default_presenter *This = impl_from_IVMRSurfaceAllocatorEx9(iface); - - return VMR9_ImagePresenter_Release(&This->IVMRImagePresenter9_iface); + struct default_presenter *presenter = impl_from_IVMRSurfaceAllocator9(iface); + return IVMRImagePresenter9_Release(&presenter->IVMRImagePresenter9_iface); } static HRESULT VMR9_SurfaceAllocator_SetAllocationSettings(struct default_presenter *This, VMR9AllocationInfo *allocinfo) @@ -2827,9 +2825,10 @@ static BOOL CreateRenderingWindow(struct default_presenter *This, VMR9Allocation return TRUE; } -static HRESULT WINAPI VMR9_SurfaceAllocator_InitializeDevice(IVMRSurfaceAllocatorEx9 *iface, DWORD_PTR id, VMR9AllocationInfo *allocinfo, DWORD *numbuffers) +static HRESULT WINAPI VMR9_SurfaceAllocator_InitializeDevice(IVMRSurfaceAllocator9 *iface, + DWORD_PTR cookie, VMR9AllocationInfo *allocinfo, DWORD *numbuffers) { - struct default_presenter *This = impl_from_IVMRSurfaceAllocatorEx9(iface); + struct default_presenter *This = impl_from_IVMRSurfaceAllocator9(iface); This->info = *allocinfo; @@ -2842,16 +2841,17 @@ static HRESULT WINAPI VMR9_SurfaceAllocator_InitializeDevice(IVMRSurfaceAllocato return S_OK; } -static HRESULT WINAPI VMR9_SurfaceAllocator_TerminateDevice(IVMRSurfaceAllocatorEx9 *iface, DWORD_PTR id) +static HRESULT WINAPI VMR9_SurfaceAllocator_TerminateDevice(IVMRSurfaceAllocator9 *iface, DWORD_PTR cookie) { - TRACE("iface %p, id %#lx.\n", iface, id); + TRACE("iface %p, cookie %#lx.\n", iface, cookie); return S_OK; } -static HRESULT WINAPI VMR9_SurfaceAllocator_GetSurface(IVMRSurfaceAllocatorEx9 *iface, DWORD_PTR id, DWORD surfaceindex, DWORD flags, IDirect3DSurface9 **surface) +static HRESULT WINAPI VMR9_SurfaceAllocator_GetSurface(IVMRSurfaceAllocator9 *iface, + DWORD_PTR cookie, DWORD surfaceindex, DWORD flags, IDirect3DSurface9 **surface) { - struct default_presenter *This = impl_from_IVMRSurfaceAllocatorEx9(iface); + struct default_presenter *This = impl_from_IVMRSurfaceAllocator9(iface); /* Update everything first, this is needed because the surface might be destroyed in the reset */ if (!This->d3d9_dev) @@ -2871,9 +2871,10 @@ static HRESULT WINAPI VMR9_SurfaceAllocator_GetSurface(IVMRSurfaceAllocatorEx9 * return S_OK; } -static HRESULT WINAPI VMR9_SurfaceAllocator_AdviseNotify(IVMRSurfaceAllocatorEx9 *iface, IVMRSurfaceAllocatorNotify9 *allocnotify) +static HRESULT WINAPI VMR9_SurfaceAllocator_AdviseNotify(IVMRSurfaceAllocator9 *iface, + IVMRSurfaceAllocatorNotify9 *allocnotify) { - struct default_presenter *This = impl_from_IVMRSurfaceAllocatorEx9(iface); + struct default_presenter *This = impl_from_IVMRSurfaceAllocator9(iface); TRACE("(%p/%p)->(...)\n", iface, This); @@ -2882,7 +2883,7 @@ static HRESULT WINAPI VMR9_SurfaceAllocator_AdviseNotify(IVMRSurfaceAllocatorEx9 return S_OK; } -static const IVMRSurfaceAllocatorEx9Vtbl VMR9_SurfaceAllocator = +static const IVMRSurfaceAllocator9Vtbl VMR9_SurfaceAllocator = { VMR9_SurfaceAllocator_QueryInterface, VMR9_SurfaceAllocator_AddRef, @@ -2891,7 +2892,6 @@ static const IVMRSurfaceAllocatorEx9Vtbl VMR9_SurfaceAllocator = VMR9_SurfaceAllocator_TerminateDevice, VMR9_SurfaceAllocator_GetSurface, VMR9_SurfaceAllocator_AdviseNotify, - NULL /* This isn't the SurfaceAllocatorEx type yet, working on it */ }; static IDirect3D9 *init_d3d9(HMODULE d3d9_handle) @@ -2940,7 +2940,7 @@ static HRESULT VMR9DefaultAllocatorPresenterImpl_create(struct quartz_vmr *paren } object->IVMRImagePresenter9_iface.lpVtbl = &VMR9_ImagePresenter; - object->IVMRSurfaceAllocatorEx9_iface.lpVtbl = &VMR9_SurfaceAllocator; + object->IVMRSurfaceAllocator9_iface.lpVtbl = &VMR9_SurfaceAllocator; object->refCount = 1; object->pVMR9 = parent;
1
0
0
0
Zebediah Figura : quartz/vmr9: Don't query for IVMRSurfaceAllocatorEx9.
by Alexandre Julliard
27 May '20
27 May '20
Module: wine Branch: master Commit: 39489e4d01ace78e90943c066e7e43105cf208a2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=39489e4d01ace78e90943c06…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed May 27 11:47:34 2020 -0500 quartz/vmr9: Don't query for IVMRSurfaceAllocatorEx9. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/vmr9.c | 1 + dlls/quartz/vmr9.c | 33 ++++++++++++--------------------- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 0a8ae371a6..2921d1aed0 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -2852,6 +2852,7 @@ static HRESULT WINAPI allocator_QueryInterface(IVMRSurfaceAllocator9 *iface, REF IVMRImagePresenter9_AddRef(&presenter_iface); return S_OK; } + ok(!IsEqualGUID(iid, &IID_IVMRSurfaceAllocatorEx9), "Unexpected query for IVMRSurfaceAllocatorEx9.\n"); *out = NULL; return E_NOTIMPL; } diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 7fca3550d1..e02b642dbc 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -79,9 +79,8 @@ struct quartz_vmr IOverlay IOverlay_iface; - IVMRSurfaceAllocatorEx9 *allocator; + IVMRSurfaceAllocator9 *allocator; IVMRImagePresenter9 *presenter; - BOOL allocator_is_ex; DWORD stream_count; DWORD mixing_prefs; @@ -345,7 +344,7 @@ static HRESULT initialize_device(struct quartz_vmr *filter, VMR9AllocationInfo * HRESULT hr; DWORD i; - if (FAILED(hr = IVMRSurfaceAllocatorEx9_InitializeDevice(filter->allocator, + if (FAILED(hr = IVMRSurfaceAllocator9_InitializeDevice(filter->allocator, filter->cookie, info, &count))) { WARN("Failed to initialize device (flags %#x), hr %#x.\n", info->dwFlags, hr); @@ -354,13 +353,13 @@ static HRESULT initialize_device(struct quartz_vmr *filter, VMR9AllocationInfo * for (i = 0; i < count; ++i) { - if (FAILED(hr = IVMRSurfaceAllocatorEx9_GetSurface(filter->allocator, + if (FAILED(hr = IVMRSurfaceAllocator9_GetSurface(filter->allocator, filter->cookie, i, 0, &filter->surfaces[i]))) { ERR("Failed to get surface %u, hr %#x.\n", i, hr); while (i--) IDirect3DSurface9_Release(filter->surfaces[i]); - IVMRSurfaceAllocatorEx9_TerminateDevice(filter->allocator, filter->cookie); + IVMRSurfaceAllocator9_TerminateDevice(filter->allocator, filter->cookie); return hr; } } @@ -533,7 +532,7 @@ static HRESULT WINAPI VMR9_BreakConnect(struct strmbase_renderer *This) for (i = 0; i < pVMR9->num_surfaces; ++i) IDirect3DSurface9_Release(pVMR9->surfaces[i]); free(pVMR9->surfaces); - IVMRSurfaceAllocatorEx9_TerminateDevice(pVMR9->allocator, pVMR9->cookie); + IVMRSurfaceAllocator9_TerminateDevice(pVMR9->allocator, pVMR9->cookie); pVMR9->num_surfaces = 0; } return hr; @@ -558,8 +557,8 @@ static void vmr_destroy(struct strmbase_renderer *iface) if (filter->allocator) { - IVMRSurfaceAllocatorEx9_TerminateDevice(filter->allocator, filter->cookie); - IVMRSurfaceAllocatorEx9_Release(filter->allocator); + IVMRSurfaceAllocator9_TerminateDevice(filter->allocator, filter->cookie); + IVMRSurfaceAllocator9_Release(filter->allocator); } if (filter->presenter) IVMRImagePresenter9_Release(filter->presenter); @@ -1353,7 +1352,7 @@ static HRESULT WINAPI VMR9FilterConfig_SetRenderingMode(IVMRFilterConfig9 *iface } if (This->allocator) - IVMRSurfaceAllocatorEx9_Release(This->allocator); + IVMRSurfaceAllocator9_Release(This->allocator); if (This->presenter) IVMRImagePresenter9_Release(This->presenter); @@ -1364,7 +1363,6 @@ static HRESULT WINAPI VMR9FilterConfig_SetRenderingMode(IVMRFilterConfig9 *iface { case VMR9Mode_Windowed: case VMR9Mode_Windowless: - This->allocator_is_ex = 0; This->cookie = ~0; hr = VMR9DefaultAllocatorPresenterImpl_create(This, (LPVOID*)&This->presenter); @@ -1378,7 +1376,7 @@ static HRESULT WINAPI VMR9FilterConfig_SetRenderingMode(IVMRFilterConfig9 *iface This->presenter = NULL; } else - hr = IVMRSurfaceAllocatorEx9_AdviseNotify(This->allocator, &This->IVMRSurfaceAllocatorNotify9_iface); + hr = IVMRSurfaceAllocator9_AdviseNotify(This->allocator, &This->IVMRSurfaceAllocatorNotify9_iface); break; case VMR9Mode_Renderless: break; @@ -1971,15 +1969,8 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AdviseSurfaceAllocator( if (FAILED(IVMRSurfaceAllocator9_QueryInterface(allocator, &IID_IVMRImagePresenter9, (void **)&filter->presenter))) return E_NOINTERFACE; - if (SUCCEEDED(IVMRSurfaceAllocator9_QueryInterface(allocator, - &IID_IVMRSurfaceAllocatorEx9, (void **)&filter->allocator))) - filter->allocator_is_ex = 1; - else - { - filter->allocator = (IVMRSurfaceAllocatorEx9 *)allocator; - IVMRSurfaceAllocator9_AddRef(allocator); - filter->allocator_is_ex = 0; - } + filter->allocator = allocator; + IVMRSurfaceAllocator9_AddRef(allocator); return S_OK; } @@ -2827,7 +2818,7 @@ static BOOL CreateRenderingWindow(struct default_presenter *This, VMR9Allocation if (FAILED(hr)) { - IVMRSurfaceAllocatorEx9_TerminateDevice(This->pVMR9->allocator, This->pVMR9->cookie); + IVMRSurfaceAllocator9_TerminateDevice(This->pVMR9->allocator, This->pVMR9->cookie); return FALSE; }
1
0
0
0
Zebediah Figura : quartz/vmr9: Use TRACE for some implemented methods.
by Alexandre Julliard
27 May '20
27 May '20
Module: wine Branch: master Commit: f020fe051b02d7bda90a1fdb028a60e2ab7400f0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f020fe051b02d7bda90a1fdb…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed May 27 11:47:33 2020 -0500 quartz/vmr9: Use TRACE for some implemented methods. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/vmr9.c | 59 +++++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index a716a6e712..7fca3550d1 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -1699,17 +1699,18 @@ static HRESULT WINAPI VMR9WindowlessControl_SetVideoPosition(IVMRWindowlessContr return S_OK; } -static HRESULT WINAPI VMR9WindowlessControl_GetVideoPosition(IVMRWindowlessControl9 *iface, RECT *source, RECT *dest) +static HRESULT WINAPI VMR9WindowlessControl_GetVideoPosition(IVMRWindowlessControl9 *iface, RECT *src, RECT *dst) { - struct quartz_vmr *This = impl_from_IVMRWindowlessControl9(iface); + struct quartz_vmr *filter = impl_from_IVMRWindowlessControl9(iface); - if (source) - *source = This->window.src; + TRACE("filter %p, src %p, dst %p.\n", filter, src, dst); - if (dest) - *dest = This->window.dst; + if (src) + *src = filter->window.src; + + if (dst) + *dst = filter->window.dst; - FIXME("(%p/%p)->(%p/%p) stub\n", iface, This, source, dest); return S_OK; } @@ -1955,42 +1956,46 @@ static ULONG WINAPI VMR9SurfaceAllocatorNotify_Release(IVMRSurfaceAllocatorNotif return refcount; } -static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AdviseSurfaceAllocator(IVMRSurfaceAllocatorNotify9 *iface, DWORD_PTR id, IVMRSurfaceAllocator9 *alloc) +static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AdviseSurfaceAllocator( + IVMRSurfaceAllocatorNotify9 *iface, DWORD_PTR cookie, IVMRSurfaceAllocator9 *allocator) { - struct quartz_vmr *This = impl_from_IVMRSurfaceAllocatorNotify9(iface); + struct quartz_vmr *filter = impl_from_IVMRSurfaceAllocatorNotify9(iface); - /* FIXME: This code is not tested!!! */ - FIXME("(%p/%p)->(...) stub\n", iface, This); - This->cookie = id; + TRACE("filter %p, cookie %#Ix, allocator %p.\n", filter, cookie, allocator); - if (This->presenter) + filter->cookie = cookie; + + if (filter->presenter) return VFW_E_WRONG_STATE; - if (FAILED(IVMRSurfaceAllocator9_QueryInterface(alloc, &IID_IVMRImagePresenter9, (void **)&This->presenter))) + if (FAILED(IVMRSurfaceAllocator9_QueryInterface(allocator, &IID_IVMRImagePresenter9, (void **)&filter->presenter))) return E_NOINTERFACE; - if (SUCCEEDED(IVMRSurfaceAllocator9_QueryInterface(alloc, &IID_IVMRSurfaceAllocatorEx9, (void **)&This->allocator))) - This->allocator_is_ex = 1; + if (SUCCEEDED(IVMRSurfaceAllocator9_QueryInterface(allocator, + &IID_IVMRSurfaceAllocatorEx9, (void **)&filter->allocator))) + filter->allocator_is_ex = 1; else { - This->allocator = (IVMRSurfaceAllocatorEx9 *)alloc; - IVMRSurfaceAllocator9_AddRef(alloc); - This->allocator_is_ex = 0; + filter->allocator = (IVMRSurfaceAllocatorEx9 *)allocator; + IVMRSurfaceAllocator9_AddRef(allocator); + filter->allocator_is_ex = 0; } return S_OK; } -static HRESULT WINAPI VMR9SurfaceAllocatorNotify_SetD3DDevice(IVMRSurfaceAllocatorNotify9 *iface, IDirect3DDevice9 *device, HMONITOR monitor) +static HRESULT WINAPI VMR9SurfaceAllocatorNotify_SetD3DDevice(IVMRSurfaceAllocatorNotify9 *iface, + IDirect3DDevice9 *device, HMONITOR monitor) { - struct quartz_vmr *This = impl_from_IVMRSurfaceAllocatorNotify9(iface); + struct quartz_vmr *filter = impl_from_IVMRSurfaceAllocatorNotify9(iface); - FIXME("(%p/%p)->(...) semi-stub\n", iface, This); - if (This->allocator_d3d9_dev) - IDirect3DDevice9_Release(This->allocator_d3d9_dev); - This->allocator_d3d9_dev = device; - IDirect3DDevice9_AddRef(This->allocator_d3d9_dev); - This->allocator_mon = monitor; + TRACE("filter %p, device %p, monitor %p.\n", filter, device, monitor); + + if (filter->allocator_d3d9_dev) + IDirect3DDevice9_Release(filter->allocator_d3d9_dev); + filter->allocator_d3d9_dev = device; + IDirect3DDevice9_AddRef(device); + filter->allocator_mon = monitor; return S_OK; }
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
75
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
Results per page:
10
25
50
100
200