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
September 2023
----- 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
920 discussions
Start a n
N
ew thread
Ziqing Hui : winegstreamer: Introduce new wg_muxer struct.
by Alexandre Julliard
12 Sep '23
12 Sep '23
Module: wine Branch: master Commit: 0915f5f2163f68ae7355f70df74bfd6d818c9953 URL:
https://gitlab.winehq.org/wine/wine/-/commit/0915f5f2163f68ae7355f70df74bfd…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Thu Aug 17 09:44:37 2023 +0800 winegstreamer: Introduce new wg_muxer struct. --- dlls/winegstreamer/Makefile.in | 1 + dlls/winegstreamer/gst_private.h | 3 + dlls/winegstreamer/main.c | 26 ++++++++ dlls/winegstreamer/unix_private.h | 5 ++ dlls/winegstreamer/unixlib.c | 22 ++++--- dlls/winegstreamer/unixlib.h | 10 ++++ dlls/winegstreamer/wg_muxer.c | 123 ++++++++++++++++++++++++++++++++++++++ dlls/winegstreamer/wg_parser.c | 25 +++++++- 8 files changed, 206 insertions(+), 9 deletions(-)
1
0
0
0
Alfred Agrell : quartz: Delete some redundant members from struct quartz_vmr.
by Alexandre Julliard
12 Sep '23
12 Sep '23
Module: wine Branch: master Commit: f413e9ab7de83b6eb0b9ce96086b4f5b7f93327f URL:
https://gitlab.winehq.org/wine/wine/-/commit/f413e9ab7de83b6eb0b9ce96086b4f…
Author: Alfred Agrell <floating(a)muncher.se> Date: Mon Sep 11 21:40:40 2023 +0200 quartz: Delete some redundant members from struct quartz_vmr. --- dlls/quartz/vmr9.c | 53 ++++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 6efc626f6f6..27ebe68e69a 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -94,7 +94,6 @@ struct quartz_vmr * windowed also as a special case of windowless. This is probably the easiest way. */ VMR9Mode mode; - BITMAPINFOHEADER bmiheader; HMODULE hD3d9; @@ -107,11 +106,14 @@ struct quartz_vmr HWND clipping_window; - LONG VideoWidth; - LONG VideoHeight; VMR9AspectRatioMode aspect_mode; }; +static const BITMAPINFOHEADER *get_filter_bitmap_header(const struct quartz_vmr *filter) +{ + return get_bitmap_header(&filter->renderer.sink.pin.mt); +} + static inline BOOL is_vmr9(const struct quartz_vmr *filter) { return IsEqualGUID(&filter->renderer.filter.clsid, &CLSID_VideoMixingRenderer9); @@ -251,7 +253,7 @@ static HRESULT vmr_render(struct strmbase_renderer *iface, IMediaSample *sample) } data_size = IMediaSample_GetActualDataLength(sample); - bitmap_header = get_bitmap_header(&filter->renderer.sink.pin.mt); + bitmap_header = get_filter_bitmap_header(filter); width = bitmap_header->biWidth; height = bitmap_header->biHeight; depth = bitmap_header->biBitCount; @@ -360,6 +362,7 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE HRESULT hr = E_FAIL; DWORD count = 1; unsigned int i; + const BITMAPINFOHEADER *bmiheader = get_bitmap_header(mt); static const struct { @@ -392,8 +395,8 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE info.Pool = D3DPOOL_DEFAULT; info.MinBuffers = count; - info.dwWidth = info.szAspectRatio.cx = info.szNativeSize.cx = filter->bmiheader.biWidth; - info.dwHeight = info.szAspectRatio.cy = info.szNativeSize.cy = filter->bmiheader.biHeight; + info.dwWidth = info.szAspectRatio.cx = info.szNativeSize.cx = bmiheader->biWidth; + info.dwHeight = info.szAspectRatio.cy = info.szNativeSize.cy = bmiheader->biHeight; if (!(filter->surfaces = calloc(count, sizeof(IDirect3DSurface9 *)))) return E_OUTOFMEMORY; @@ -402,15 +405,15 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE if (!is_vmr9(filter)) { - switch (filter->bmiheader.biCompression) + switch (bmiheader->biCompression) { case BI_RGB: - switch (filter->bmiheader.biBitCount) + switch (bmiheader->biBitCount) { case 24: info.Format = D3DFMT_R8G8B8; break; case 32: info.Format = D3DFMT_X8R8G8B8; break; default: - FIXME("Unhandled bit depth %u.\n", filter->bmiheader.biBitCount); + FIXME("Unhandled bit depth %u.\n", bmiheader->biBitCount); free(filter->surfaces); return VFW_E_TYPE_NOT_ACCEPTED; } @@ -422,12 +425,12 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE case mmioFOURCC('U','Y','V','Y'): case mmioFOURCC('Y','U','Y','2'): case mmioFOURCC('Y','V','1','2'): - info.Format = filter->bmiheader.biCompression; + info.Format = bmiheader->biCompression; info.dwFlags = VMR9AllocFlag_OffscreenSurface; break; default: - WARN("Unhandled video compression %#lx.\n", filter->bmiheader.biCompression); + WARN("Unhandled video compression %#lx.\n", bmiheader->biCompression); free(filter->surfaces); return VFW_E_TYPE_NOT_ACCEPTED; } @@ -495,10 +498,7 @@ static HRESULT vmr_connect(struct strmbase_renderer *iface, const AM_MEDIA_TYPE HRESULT hr; RECT rect; - filter->bmiheader = *bitmap_header; - filter->VideoWidth = bitmap_header->biWidth; - filter->VideoHeight = bitmap_header->biHeight; - SetRect(&rect, 0, 0, filter->VideoWidth, filter->VideoHeight); + SetRect(&rect, 0, 0, bitmap_header->biWidth, bitmap_header->biHeight); filter->window.src = rect; AdjustWindowRectEx(&rect, GetWindowLongW(window, GWL_STYLE), FALSE, @@ -645,9 +645,10 @@ static const struct strmbase_renderer_ops renderer_ops = static RECT vmr_get_default_rect(struct video_window *This) { struct quartz_vmr *pVMR9 = impl_from_video_window(This); + const BITMAPINFOHEADER *bmiheader = get_filter_bitmap_header(pVMR9); static RECT defRect; - SetRect(&defRect, 0, 0, pVMR9->VideoWidth, pVMR9->VideoHeight); + SetRect(&defRect, 0, 0, bmiheader->biWidth, bmiheader->biHeight); return defRect; } @@ -667,7 +668,7 @@ static HRESULT vmr_get_current_image(struct video_window *iface, LONG *size, LON EnterCriticalSection(&filter->renderer.filter.stream_cs); device = filter->allocator_d3d9_dev; - bih = *get_bitmap_header(&filter->renderer.sink.pin.mt); + bih = *get_filter_bitmap_header(filter); bih.biSizeImage = bih.biWidth * bih.biHeight * bih.biBitCount / 8; if (!image) @@ -1434,6 +1435,7 @@ static HRESULT WINAPI VMR7WindowlessControl_GetNativeVideoSize(IVMRWindowlessCon LONG *width, LONG *height, LONG *aspect_width, LONG *aspect_height) { struct quartz_vmr *filter = impl_from_IVMRWindowlessControl(iface); + const BITMAPINFOHEADER *bmiheader = get_filter_bitmap_header(filter); TRACE("filter %p, width %p, height %p, aspect_width %p, aspect_height %p.\n", filter, width, height, aspect_width, aspect_height); @@ -1441,12 +1443,12 @@ static HRESULT WINAPI VMR7WindowlessControl_GetNativeVideoSize(IVMRWindowlessCon if (!width || !height) return E_POINTER; - *width = filter->bmiheader.biWidth; - *height = filter->bmiheader.biHeight; + *width = bmiheader->biWidth; + *height = bmiheader->biHeight; if (aspect_width) - *aspect_width = filter->bmiheader.biWidth; + *aspect_width = bmiheader->biWidth; if (aspect_height) - *aspect_height = filter->bmiheader.biHeight; + *aspect_height = bmiheader->biHeight; return S_OK; } @@ -1634,6 +1636,7 @@ static HRESULT WINAPI VMR9WindowlessControl_GetNativeVideoSize(IVMRWindowlessCon LONG *width, LONG *height, LONG *aspect_width, LONG *aspect_height) { struct quartz_vmr *filter = impl_from_IVMRWindowlessControl9(iface); + const BITMAPINFOHEADER *bmiheader = get_filter_bitmap_header(filter); TRACE("filter %p, width %p, height %p, aspect_width %p, aspect_height %p.\n", filter, width, height, aspect_width, aspect_height); @@ -1641,12 +1644,12 @@ static HRESULT WINAPI VMR9WindowlessControl_GetNativeVideoSize(IVMRWindowlessCon if (!width || !height) return E_POINTER; - *width = filter->bmiheader.biWidth; - *height = filter->bmiheader.biHeight; + *width = bmiheader->biWidth; + *height = bmiheader->biHeight; if (aspect_width) - *aspect_width = filter->bmiheader.biWidth; + *aspect_width = bmiheader->biWidth; if (aspect_height) - *aspect_height = filter->bmiheader.biHeight; + *aspect_height = bmiheader->biHeight; return S_OK; }
1
0
0
0
Alfred Agrell : quartz/tests: Add test for VMR9SurfaceAllocatorNotify_ChangeD3DDevice.
by Alexandre Julliard
12 Sep '23
12 Sep '23
Module: wine Branch: master Commit: 3855fc7a60e48632f77be57027d1dc1c51294470 URL:
https://gitlab.winehq.org/wine/wine/-/commit/3855fc7a60e48632f77be57027d1dc…
Author: Alfred Agrell <floating(a)muncher.se> Date: Mon Sep 11 21:28:05 2023 +0200 quartz/tests: Add test for VMR9SurfaceAllocatorNotify_ChangeD3DDevice. --- dlls/quartz/tests/vmr9.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index a859673ceb6..6e566f39c58 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -4303,6 +4303,100 @@ static void test_notifyevent(void) ok(!ref, "Got outstanding refcount %ld.\n", ref); } +static void test_changed3ddevice(void) +{ + VIDEOINFOHEADER vih = + { + .bmiHeader.biSize = sizeof(BITMAPINFOHEADER), + .bmiHeader.biBitCount = 32, + .bmiHeader.biWidth = 32, + .bmiHeader.biHeight = 16, + .bmiHeader.biPlanes = 1, + .bmiHeader.biCompression = BI_RGB, + }; + AM_MEDIA_TYPE req_mt = + { + .majortype = MEDIATYPE_Video, + .subtype = MEDIASUBTYPE_RGB32, + .formattype = FORMAT_VideoInfo, + .cbFormat = sizeof(vih), + .pbFormat = (BYTE *)&vih, + }; + struct presenter presenter = + { + .IVMRSurfaceAllocator9_iface.lpVtbl = &allocator_vtbl, + .IVMRImagePresenter9_iface.lpVtbl = &presenter_vtbl, + .refcount = 1, + .accept_flags = VMR9AllocFlag_TextureSurface, + }; + IBaseFilter *filter = create_vmr9(VMR9Mode_Renderless); + IFilterGraph2 *graph = create_graph(); + IVMRSurfaceAllocatorNotify9 *notify; + IDirect3DDevice9 *device, *device2; + RECT rect = {0, 0, 640, 480}; + struct testfilter source; + HWND window; + HRESULT hr; + ULONG ref; + IPin *pin; + + testfilter_init(&source); + + AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE); + window = CreateWindowA("static", "quartz_test", WS_OVERLAPPEDWINDOW, 0, 0, + rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, NULL, NULL); + if (!(device = create_device(window))) + { + IBaseFilter_Release(filter); + DestroyWindow(window); + return; + } + + IBaseFilter_QueryInterface(filter, &IID_IVMRSurfaceAllocatorNotify9, (void **)¬ify); + presenter.notify = notify; + + hr = IVMRSurfaceAllocatorNotify9_AdviseSurfaceAllocator(notify, 0xabacab, + &presenter.IVMRSurfaceAllocator9_iface); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IVMRSurfaceAllocatorNotify9_SetD3DDevice(notify, device, MonitorFromWindow(window, MONITOR_DEFAULTTOPRIMARY)); + if (hr == E_NOINTERFACE) + { + win_skip("Direct3D does not support video rendering.\n"); + goto out; + } + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); + IFilterGraph2_AddFilter(graph, filter, NULL); + + IBaseFilter_FindPin(filter, L"VMR Input0", &pin); + hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + device2 = create_device(window); + ok(device2 != NULL, "Couldn't create device\n"); + + ok(presenter.got_TerminateDevice == 0, "got %d\n", presenter.got_TerminateDevice); + + hr = IVMRSurfaceAllocatorNotify9_ChangeD3DDevice(notify, device2, MonitorFromWindow(window, MONITOR_DEFAULTTOPRIMARY)); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(presenter.got_TerminateDevice == 1, "got %d\n", presenter.got_TerminateDevice); + + IDirect3DDevice9_Release(device2); + +out: + IPin_Release(pin); + ref = IFilterGraph2_Release(graph); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + IVMRSurfaceAllocatorNotify9_Release(notify); + ref = IBaseFilter_Release(filter); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ref = IDirect3DDevice9_Release(device); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + DestroyWindow(window); +} + START_TEST(vmr9) { IBaseFilter *filter; @@ -4340,6 +4434,7 @@ START_TEST(vmr9) test_mixing_prefs(); test_unconnected_eos(); test_notifyevent(); + test_changed3ddevice(); CoUninitialize(); }
1
0
0
0
Alfred Agrell : quartz/tests: Add test for VMR9SurfaceAllocatorNotify_NotifyEvent.
by Alexandre Julliard
12 Sep '23
12 Sep '23
Module: wine Branch: master Commit: d93f930b3e90013bbb5f92b9d28d57def0cbcff0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d93f930b3e90013bbb5f92b9d28d57…
Author: Alfred Agrell <floating(a)muncher.se> Date: Mon Sep 11 21:26:55 2023 +0200 quartz/tests: Add test for VMR9SurfaceAllocatorNotify_NotifyEvent. --- dlls/quartz/tests/vmr9.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 9d88afb295d..a859673ceb6 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -4267,6 +4267,42 @@ static void test_unconnected_eos(void) ok(!ref, "Got outstanding refcount %ld.\n", ref); } +static void test_notifyevent(void) +{ + IFilterGraph2 *graph = create_graph(); + IBaseFilter *filter = create_vmr9(VMR9Mode_Renderless); + IVMRSurfaceAllocatorNotify9 *notify; + IMediaEvent *eventsrc; + unsigned int ret; + HRESULT hr; + ULONG ref; + + hr = IFilterGraph2_AddFilter(graph, filter, NULL); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (void **)&eventsrc); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + ret = check_event_code(eventsrc, 0, 0x12345678, 0x9ABC, 0xDEF0); + ok(ret == 0, "Got %u custom events.\n", ret); + + hr = IBaseFilter_QueryInterface(filter, &IID_IVMRSurfaceAllocatorNotify9, (void **)¬ify); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + hr = IVMRSurfaceAllocatorNotify9_NotifyEvent(notify, 0x12345678, 0x9ABC, 0xDEF0); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + ret = check_event_code(eventsrc, 0, 0x12345678, 0x9ABC, 0xDEF0); + ok(ret == 1, "Got %u custom events.\n", ret); + + IMediaEvent_Release(eventsrc); + ref = IFilterGraph2_Release(graph); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ref = IBaseFilter_Release(filter); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ref = IVMRSurfaceAllocatorNotify9_Release(notify); + ok(!ref, "Got outstanding refcount %ld.\n", ref); +} + START_TEST(vmr9) { IBaseFilter *filter; @@ -4303,6 +4339,7 @@ START_TEST(vmr9) test_windowless_size(); test_mixing_prefs(); test_unconnected_eos(); + test_notifyevent(); CoUninitialize(); }
1
0
0
0
Alfred Agrell : quartz: Recreate surfaces in VMR9SurfaceAllocatorNotify_ChangeD3DDevice.
by Alexandre Julliard
12 Sep '23
12 Sep '23
Module: wine Branch: master Commit: 09e54b8919b2c08dca98e1cd44b5b37f80eb373e URL:
https://gitlab.winehq.org/wine/wine/-/commit/09e54b8919b2c08dca98e1cd44b5b3…
Author: Alfred Agrell <floating(a)muncher.se> Date: Mon Sep 11 21:26:27 2023 +0200 quartz: Recreate surfaces in VMR9SurfaceAllocatorNotify_ChangeD3DDevice. --- dlls/quartz/vmr9.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index d26b6cd8fea..6efc626f6f6 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -514,9 +514,8 @@ static HRESULT vmr_connect(struct strmbase_renderer *iface, const AM_MEDIA_TYPE return hr; } -static void vmr_disconnect(struct strmbase_renderer *This) +static void deallocate_surfaces(struct quartz_vmr *filter) { - struct quartz_vmr *filter = impl_from_IBaseFilter(&This->filter.IBaseFilter_iface); DWORD i; if (filter->mode && filter->allocator && filter->presenter) @@ -530,6 +529,12 @@ static void vmr_disconnect(struct strmbase_renderer *This) } } +static void vmr_disconnect(struct strmbase_renderer *This) +{ + struct quartz_vmr *filter = impl_from_IBaseFilter(&This->filter.IBaseFilter_iface); + deallocate_surfaces(filter); +} + static void vmr_destroy(struct strmbase_renderer *iface) { struct quartz_vmr *filter = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface); @@ -1999,16 +2004,24 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_SetD3DDevice(IVMRSurfaceAllocat return S_OK; } -static HRESULT WINAPI VMR9SurfaceAllocatorNotify_ChangeD3DDevice(IVMRSurfaceAllocatorNotify9 *iface, IDirect3DDevice9 *device, HMONITOR monitor) +static HRESULT WINAPI VMR9SurfaceAllocatorNotify_ChangeD3DDevice(IVMRSurfaceAllocatorNotify9 *iface, + IDirect3DDevice9 *device, HMONITOR monitor) { struct quartz_vmr *This = impl_from_IVMRSurfaceAllocatorNotify9(iface); - FIXME("(%p/%p)->(...) semi-stub\n", iface, This); + TRACE("(%p/%p)->(...).\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); + if (This->mode && This->allocator && This->presenter) + { + deallocate_surfaces(This); + allocate_surfaces(This, &This->renderer.sink.pin.mt); + } + return S_OK; }
1
0
0
0
Alfred Agrell : quartz: Fill in VMR9SurfaceAllocatorNotify_NotifyEvent stub.
by Alexandre Julliard
12 Sep '23
12 Sep '23
Module: wine Branch: master Commit: 7a5f36d50b9801f4ee56284a9f3758c1ce5b9821 URL:
https://gitlab.winehq.org/wine/wine/-/commit/7a5f36d50b9801f4ee56284a9f3758…
Author: Alfred Agrell <floating(a)muncher.se> Date: Mon Sep 11 21:10:47 2023 +0200 quartz: Fill in VMR9SurfaceAllocatorNotify_NotifyEvent stub. --- dlls/quartz/vmr9.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 8eee6587182..d26b6cd8fea 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -2118,9 +2118,17 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AllocateSurfaceHelper(IVMRSurfa static HRESULT WINAPI VMR9SurfaceAllocatorNotify_NotifyEvent(IVMRSurfaceAllocatorNotify9 *iface, LONG code, LONG_PTR param1, LONG_PTR param2) { struct quartz_vmr *This = impl_from_IVMRSurfaceAllocatorNotify9(iface); + IMediaEventSink *sink; + HRESULT hr; - FIXME("(%p/%p)->(...) stub\n", iface, This); - return E_NOTIMPL; + TRACE("filter %p, code %#lx, param1 %#Ix, param2 %#Ix.\n", This, code, param1, param2); + + hr = IFilterGraph_QueryInterface(This->renderer.filter.graph, &IID_IMediaEventSink, (void **)&sink); + if (FAILED(hr)) + return hr; + hr = IMediaEventSink_Notify(sink, code, param1, param2); + IMediaEventSink_Release(sink); + return hr; } static const IVMRSurfaceAllocatorNotify9Vtbl VMR9_SurfaceAllocatorNotify_Vtbl =
1
0
0
0
Rémi Bernon : dmime: Set the tool delivery type on the messages flags.
by Alexandre Julliard
12 Sep '23
12 Sep '23
Module: wine Branch: master Commit: 1f84523800671046076aac142babea56c9a1b79d URL:
https://gitlab.winehq.org/wine/wine/-/commit/1f84523800671046076aac142babea…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Sep 12 10:11:38 2023 +0200 dmime: Set the tool delivery type on the messages flags. --- dlls/dmime/graph.c | 11 +++++++++++ dlls/dmime/performance.c | 4 ++++ dlls/dmime/tests/dmime.c | 6 +++--- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/dlls/dmime/graph.c b/dlls/dmime/graph.c index 44996b0303e..d8f6bb88701 100644 --- a/dlls/dmime/graph.c +++ b/dlls/dmime/graph.c @@ -26,6 +26,7 @@ struct tool_entry { struct list entry; IDirectMusicTool *tool; + DWORD delivery; }; struct graph @@ -111,6 +112,7 @@ static ULONG WINAPI graph_Release(IDirectMusicGraph *iface) static HRESULT WINAPI graph_StampPMsg(IDirectMusicGraph *iface, DMUS_PMSG *msg) { + const DWORD delivery_flags = DMUS_PMSGF_TOOL_IMMEDIATE | DMUS_PMSGF_TOOL_QUEUE | DMUS_PMSGF_TOOL_ATTIME; struct graph *This = impl_from_IDirectMusicGraph(iface); struct tool_entry *entry, *next, *first; @@ -140,6 +142,9 @@ static HRESULT WINAPI graph_StampPMsg(IDirectMusicGraph *iface, DMUS_PMSG *msg) msg->pTool = next->tool; IDirectMusicTool_AddRef(msg->pTool); + msg->dwFlags &= ~delivery_flags; + msg->dwFlags |= next->delivery; + return S_OK; } @@ -148,6 +153,7 @@ static HRESULT WINAPI graph_InsertTool(IDirectMusicGraph *iface, IDirectMusicToo { struct graph *This = impl_from_IDirectMusicGraph(iface); struct tool_entry *entry, *next; + HRESULT hr; TRACE("(%p, %p, %p, %ld, %li)\n", This, tool, channels, channel_count, index); @@ -163,6 +169,11 @@ static HRESULT WINAPI graph_InsertTool(IDirectMusicGraph *iface, IDirectMusicToo entry->tool = tool; IDirectMusicTool_AddRef(tool); IDirectMusicTool_Init(tool, iface); + if (FAILED(hr = IDirectMusicTool_GetMsgDeliveryType(tool, &entry->delivery))) + { + WARN("Failed to get delivery type from tool %p, hr %#lx\n", tool, hr); + entry->delivery = DMUS_PMSGF_TOOL_IMMEDIATE; + } list_add_before(&next->entry, &entry->entry); return S_OK; diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 904008954a2..d277c5de043 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -1311,6 +1311,10 @@ static HRESULT WINAPI performance_graph_StampPMsg(IDirectMusicGraph *iface, DMUS if (hr == DMUS_S_LAST_TOOL) { + const DWORD delivery_flags = DMUS_PMSGF_TOOL_IMMEDIATE | DMUS_PMSGF_TOOL_QUEUE | DMUS_PMSGF_TOOL_ATTIME; + msg->dwFlags &= ~delivery_flags; + msg->dwFlags |= DMUS_PMSGF_TOOL_QUEUE; + if (msg->pTool) IDirectMusicTool_Release(msg->pTool); msg->pTool = &This->IDirectMusicTool_iface; IDirectMusicTool_AddRef(msg->pTool); diff --git a/dlls/dmime/tests/dmime.c b/dlls/dmime/tests/dmime.c index 17f11daf5ac..e178960b18f 100644 --- a/dlls/dmime/tests/dmime.c +++ b/dlls/dmime/tests/dmime.c @@ -756,7 +756,7 @@ static void test_graph(void) ok(!msg.dwSize, "got %ld\n", msg.dwSize); ok(!msg.rtTime, "got %I64d\n", msg.rtTime); ok(!msg.mtTime, "got %ld\n", msg.mtTime); - todo_wine ok(msg.dwFlags == DMUS_PMSGF_TOOL_IMMEDIATE, "got %#lx\n", msg.dwFlags); + ok(msg.dwFlags == DMUS_PMSGF_TOOL_IMMEDIATE, "got %#lx\n", msg.dwFlags); ok(!msg.dwPChannel, "got %ld\n", msg.dwPChannel); ok(!msg.dwVirtualTrackID, "got %ld\n", msg.dwVirtualTrackID); ok(!msg.dwType, "got %#lx\n", msg.dwType); @@ -1555,7 +1555,7 @@ static void test_performance_graph(void) ok(!msg.dwSize, "got %ld\n", msg.dwSize); ok(!msg.rtTime, "got %I64d\n", msg.rtTime); ok(!msg.mtTime, "got %ld\n", msg.mtTime); - todo_wine ok(msg.dwFlags == DMUS_PMSGF_TOOL_QUEUE, "got %#lx\n", msg.dwFlags); + ok(msg.dwFlags == DMUS_PMSGF_TOOL_QUEUE, "got %#lx\n", msg.dwFlags); ok(!msg.dwPChannel, "got %ld\n", msg.dwPChannel); ok(!msg.dwVirtualTrackID, "got %ld\n", msg.dwVirtualTrackID); ok(!msg.dwType, "got %#lx\n", msg.dwType); @@ -1611,7 +1611,7 @@ static void test_performance_graph(void) ok(!msg.dwSize, "got %ld\n", msg.dwSize); ok(!msg.rtTime, "got %I64d\n", msg.rtTime); ok(!msg.mtTime, "got %ld\n", msg.mtTime); - todo_wine ok(msg.dwFlags == DMUS_PMSGF_TOOL_IMMEDIATE, "got %#lx\n", msg.dwFlags); + ok(msg.dwFlags == DMUS_PMSGF_TOOL_IMMEDIATE, "got %#lx\n", msg.dwFlags); ok(!msg.dwPChannel, "got %ld\n", msg.dwPChannel); ok(!msg.dwVirtualTrackID, "got %ld\n", msg.dwVirtualTrackID); ok(!msg.dwType, "got %#lx\n", msg.dwType);
1
0
0
0
Rémi Bernon : dmime: Implement performance IDirectMusicGraph_StampPMsg.
by Alexandre Julliard
12 Sep '23
12 Sep '23
Module: wine Branch: master Commit: 09dc4a3f1739c2184695138a4c82b20954046c0c URL:
https://gitlab.winehq.org/wine/wine/-/commit/09dc4a3f1739c2184695138a4c82b2…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Sep 4 22:58:08 2023 +0200 dmime: Implement performance IDirectMusicGraph_StampPMsg. --- dlls/dmime/performance.c | 33 +++++++++++++++++++++++++++++++-- dlls/dmime/tests/dmime.c | 34 +++++++++++++++++----------------- 2 files changed, 48 insertions(+), 19 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 4085f70cc77..904008954a2 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -1293,8 +1293,37 @@ static ULONG WINAPI performance_graph_Release(IDirectMusicGraph *iface) static HRESULT WINAPI performance_graph_StampPMsg(IDirectMusicGraph *iface, DMUS_PMSG *msg) { struct performance *This = impl_from_IDirectMusicGraph(iface); - FIXME("(%p, %p): stub\n", This, msg); - return E_NOTIMPL; + HRESULT hr; + + TRACE("(%p, %p)\n", This, msg); + + if (!msg) return E_POINTER; + + /* FIXME: Implement segment and audio path graphs support */ + if (!This->pToolGraph) hr = DMUS_S_LAST_TOOL; + else if (FAILED(hr = IDirectMusicGraph_StampPMsg(This->pToolGraph, msg))) return hr; + + if (msg->pGraph) + { + IDirectMusicTool_Release(msg->pGraph); + msg->pGraph = NULL; + } + + if (hr == DMUS_S_LAST_TOOL) + { + if (msg->pTool) IDirectMusicTool_Release(msg->pTool); + msg->pTool = &This->IDirectMusicTool_iface; + IDirectMusicTool_AddRef(msg->pTool); + return S_OK; + } + + if (SUCCEEDED(hr)) + { + msg->pGraph = &This->IDirectMusicGraph_iface; + IDirectMusicTool_AddRef(msg->pGraph); + } + + return hr; } static HRESULT WINAPI performance_graph_InsertTool(IDirectMusicGraph *iface, IDirectMusicTool *tool, diff --git a/dlls/dmime/tests/dmime.c b/dlls/dmime/tests/dmime.c index c9c613a40c5..17f11daf5ac 100644 --- a/dlls/dmime/tests/dmime.c +++ b/dlls/dmime/tests/dmime.c @@ -1544,13 +1544,13 @@ static void test_performance_graph(void) /* test IDirectMusicGraph_StampPMsg usage */ hr = IDirectMusicGraph_StampPMsg(graph, NULL); - todo_wine ok(hr == E_POINTER, "got %#lx\n", hr); + ok(hr == E_POINTER, "got %#lx\n", hr); memset(&msg, 0, sizeof(msg)); hr = IDirectMusicGraph_StampPMsg(graph, &msg); - todo_wine ok(hr == S_OK, "got %#lx\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(msg.pGraph == NULL, "got %p\n", msg.pGraph); - todo_wine ok(msg.pTool != NULL, "got %p\n", msg.pTool); - if (msg.pTool) check_interface(msg.pTool, &IID_IDirectMusicPerformance, TRUE); + ok(msg.pTool != NULL, "got %p\n", msg.pTool); + check_interface(msg.pTool, &IID_IDirectMusicPerformance, TRUE); ok(!msg.dwSize, "got %ld\n", msg.dwSize); ok(!msg.rtTime, "got %I64d\n", msg.rtTime); @@ -1564,12 +1564,12 @@ static void test_performance_graph(void) ok(!msg.punkUser, "got %p\n", msg.punkUser); hr = IDirectMusicGraph_StampPMsg(graph, &msg); - todo_wine ok(hr == S_OK, "got %#lx\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(msg.pGraph == NULL, "got %p\n", msg.pGraph); - todo_wine ok(msg.pTool != NULL, "got %p\n", msg.pTool); - if (msg.pTool) check_interface(msg.pTool, &IID_IDirectMusicPerformance, TRUE); + ok(msg.pTool != NULL, "got %p\n", msg.pTool); + check_interface(msg.pTool, &IID_IDirectMusicPerformance, TRUE); - if (msg.pTool) IDirectMusicTool_Release(msg.pTool); + IDirectMusicTool_Release(msg.pTool); msg.pTool = NULL; IDirectMusicGraph_Release(graph); @@ -1604,9 +1604,9 @@ static void test_performance_graph(void) memset(&msg, 0, sizeof(msg)); hr = IDirectMusicGraph_StampPMsg(graph, &msg); - todo_wine ok(hr == S_OK, "got %#lx\n", hr); - todo_wine ok(msg.pGraph == graph, "got %p\n", msg.pGraph); - todo_wine ok(msg.pTool == tool, "got %p\n", msg.pTool); + ok(hr == S_OK, "got %#lx\n", hr); + ok(msg.pGraph == graph, "got %p\n", msg.pGraph); + ok(msg.pTool == tool, "got %p\n", msg.pTool); ok(!msg.dwSize, "got %ld\n", msg.dwSize); ok(!msg.rtTime, "got %I64d\n", msg.rtTime); @@ -1620,12 +1620,12 @@ static void test_performance_graph(void) ok(!msg.punkUser, "got %p\n", msg.punkUser); hr = IDirectMusicGraph_StampPMsg(graph, &msg); - todo_wine ok(hr == S_OK, "got %#lx\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(msg.pGraph == NULL, "got %p\n", msg.pGraph); - todo_wine ok(msg.pTool != NULL, "got %p\n", msg.pTool); - if (msg.pTool) check_interface(msg.pTool, &IID_IDirectMusicPerformance, TRUE); + ok(msg.pTool != NULL, "got %p\n", msg.pTool); + check_interface(msg.pTool, &IID_IDirectMusicPerformance, TRUE); - if (msg.pTool) IDirectMusicTool_Release(msg.pTool); + IDirectMusicTool_Release(msg.pTool); msg.pTool = NULL; IDirectMusicGraph_Release(graph); @@ -1871,7 +1871,7 @@ static void test_performance_pmsg(void) hr = IDirectMusicPerformance_QueryInterface(performance, &IID_IDirectMusicGraph, (void **)&graph); ok(hr == S_OK, "got %#lx\n", hr); hr = IDirectMusicGraph_StampPMsg(graph, msg); - todo_wine ok(hr == S_OK, "got %#lx\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); IDirectMusicGraph_Release(graph); hr = IDirectMusicPerformance_SendPMsg(performance, msg); @@ -1901,7 +1901,7 @@ static void test_performance_pmsg(void) hr = IDirectMusicPerformance_QueryInterface(performance, &IID_IDirectMusicGraph, (void **)&graph); ok(hr == S_OK, "got %#lx\n", hr); hr = IDirectMusicGraph_StampPMsg(graph, msg); - todo_wine ok(hr == S_OK, "got %#lx\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); IDirectMusicGraph_Release(graph); msg->dwFlags &= ~(DMUS_PMSGF_TOOL_IMMEDIATE | DMUS_PMSGF_TOOL_QUEUE | DMUS_PMSGF_TOOL_ATTIME);
1
0
0
0
Rémi Bernon : dmime: Implement IDirectMusicGraph_StampPMsg.
by Alexandre Julliard
12 Sep '23
12 Sep '23
Module: wine Branch: master Commit: 98db0c753aa4478d2ae7efdee3e3286ee02a9518 URL:
https://gitlab.winehq.org/wine/wine/-/commit/98db0c753aa4478d2ae7efdee3e328…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Sep 4 22:41:39 2023 +0200 dmime: Implement IDirectMusicGraph_StampPMsg. --- dlls/dmime/graph.c | 29 ++++++++++++++++++++++++++++- dlls/dmime/tests/dmime.c | 38 +++++++++++++++++++------------------- 2 files changed, 47 insertions(+), 20 deletions(-) diff --git a/dlls/dmime/graph.c b/dlls/dmime/graph.c index 1e6f16b6be0..44996b0303e 100644 --- a/dlls/dmime/graph.c +++ b/dlls/dmime/graph.c @@ -112,7 +112,34 @@ static ULONG WINAPI graph_Release(IDirectMusicGraph *iface) static HRESULT WINAPI graph_StampPMsg(IDirectMusicGraph *iface, DMUS_PMSG *msg) { struct graph *This = impl_from_IDirectMusicGraph(iface); - FIXME("(%p, %p): stub\n", This, msg); + struct tool_entry *entry, *next, *first; + + TRACE("(%p, %p)\n", This, msg); + + if (!msg) return E_POINTER; + + first = LIST_ENTRY(This->tools.next, struct tool_entry, entry); + LIST_FOR_EACH_ENTRY_SAFE(entry, next, &This->tools, struct tool_entry, entry) + if (entry->tool == msg->pTool) break; + if (&entry->entry == &This->tools) next = first; + + if (msg->pTool) + { + IDirectMusicTool_Release(msg->pTool); + msg->pTool = NULL; + } + + if (&next->entry == &This->tools) return DMUS_S_LAST_TOOL; + + if (!msg->pGraph) + { + msg->pGraph = iface; + IDirectMusicGraph_AddRef(msg->pGraph); + } + + msg->pTool = next->tool; + IDirectMusicTool_AddRef(msg->pTool); + return S_OK; } diff --git a/dlls/dmime/tests/dmime.c b/dlls/dmime/tests/dmime.c index 605830149e7..c9c613a40c5 100644 --- a/dlls/dmime/tests/dmime.c +++ b/dlls/dmime/tests/dmime.c @@ -746,12 +746,12 @@ static void test_graph(void) /* Test basic IDirectMusicGraph_StampPMsg usage */ hr = IDirectMusicGraph_StampPMsg(graph, NULL); - todo_wine ok(hr == E_POINTER, "got %#lx\n", hr); + ok(hr == E_POINTER, "got %#lx\n", hr); memset(&msg, 0, sizeof(msg)); hr = IDirectMusicGraph_StampPMsg(graph, &msg); ok(hr == S_OK, "got %#lx\n", hr); - todo_wine ok(msg.pGraph == graph, "got %p\n", msg.pGraph); - todo_wine ok(msg.pTool == tool1, "got %p\n", msg.pTool); + ok(msg.pGraph == graph, "got %p\n", msg.pGraph); + ok(msg.pTool == tool1, "got %p\n", msg.pTool); ok(!msg.dwSize, "got %ld\n", msg.dwSize); ok(!msg.rtTime, "got %I64d\n", msg.rtTime); @@ -766,19 +766,19 @@ static void test_graph(void) hr = IDirectMusicGraph_StampPMsg(graph, &msg); ok(hr == S_OK, "got %#lx\n", hr); - todo_wine ok(msg.pGraph == graph, "got %p\n", msg.pGraph); - todo_wine ok(msg.pTool == tool2, "got %p\n", msg.pTool); + ok(msg.pGraph == graph, "got %p\n", msg.pGraph); + ok(msg.pTool == tool2, "got %p\n", msg.pTool); hr = IDirectMusicGraph_StampPMsg(graph, &msg); - todo_wine ok(hr == DMUS_S_LAST_TOOL, "got %#lx\n", hr); - todo_wine ok(msg.pGraph == graph, "got %p\n", msg.pGraph); + ok(hr == DMUS_S_LAST_TOOL, "got %#lx\n", hr); + ok(msg.pGraph == graph, "got %p\n", msg.pGraph); ok(!msg.pTool, "got %p\n", msg.pTool); hr = IDirectMusicGraph_StampPMsg(graph, &msg); ok(hr == S_OK, "got %#lx\n", hr); - todo_wine ok(msg.pGraph == graph, "got %p\n", msg.pGraph); - todo_wine ok(msg.pTool == tool1, "got %p\n", msg.pTool); - if (msg.pGraph) IDirectMusicGraph_Release(msg.pGraph); + ok(msg.pGraph == graph, "got %p\n", msg.pGraph); + ok(msg.pTool == tool1, "got %p\n", msg.pTool); + IDirectMusicGraph_Release(msg.pGraph); msg.pGraph = NULL; - if (msg.pTool) IDirectMusicGraph_Release(msg.pTool); + IDirectMusicGraph_Release(msg.pTool); msg.pTool = NULL; @@ -794,16 +794,16 @@ static void test_graph(void) hr = IDirectMusicGraph_StampPMsg(graph, &msg); ok(hr == S_OK, "got %#lx\n", hr); ok(msg.pGraph == tmp_graph, "got %p\n", msg.pGraph); - todo_wine ok(msg.pTool == tool2, "got %p\n", msg.pTool); - if (msg.pGraph) IDirectMusicGraph_Release(msg.pGraph); + ok(msg.pTool == tool2, "got %p\n", msg.pTool); + IDirectMusicGraph_Release(msg.pGraph); msg.pGraph = NULL; msg.pGraph = graph; IDirectMusicGraph_AddRef(msg.pGraph); hr = IDirectMusicGraph_StampPMsg(tmp_graph, &msg); - todo_wine ok(hr == DMUS_S_LAST_TOOL, "got %#lx\n", hr); + ok(hr == DMUS_S_LAST_TOOL, "got %#lx\n", hr); ok(msg.pGraph == graph, "got %p\n", msg.pGraph); - todo_wine ok(msg.pTool == NULL, "got %p\n", msg.pTool); + ok(msg.pTool == NULL, "got %p\n", msg.pTool); msg.pTool = tool2; IDirectMusicTool_AddRef(msg.pTool); @@ -814,16 +814,16 @@ static void test_graph(void) hr = IDirectMusicGraph_StampPMsg(tmp_graph, &msg); ok(hr == S_OK, "got %#lx\n", hr); ok(msg.pGraph == graph, "got %p\n", msg.pGraph); - todo_wine ok(msg.pTool == tool1, "got %p\n", msg.pTool); - if (msg.pGraph) IDirectMusicGraph_Release(msg.pGraph); + ok(msg.pTool == tool1, "got %p\n", msg.pTool); + IDirectMusicGraph_Release(msg.pGraph); msg.pGraph = NULL; hr = IDirectMusicGraph_RemoveTool(graph, tool1); ok(hr == S_OK, "got %#lx\n", hr); hr = IDirectMusicGraph_StampPMsg(tmp_graph, &msg); - todo_wine ok(hr == DMUS_S_LAST_TOOL, "got %#lx\n", hr); + ok(hr == DMUS_S_LAST_TOOL, "got %#lx\n", hr); ok(msg.pGraph == NULL, "got %p\n", msg.pGraph); - todo_wine ok(msg.pTool == NULL, "got %p\n", msg.pTool); + ok(msg.pTool == NULL, "got %p\n", msg.pTool); IDirectMusicGraph_Release(tmp_graph);
1
0
0
0
Rémi Bernon : dmime: Get rid of the IDirectMusicGraphImpl typedef.
by Alexandre Julliard
12 Sep '23
12 Sep '23
Module: wine Branch: master Commit: 5d97483f2252bd37db0762b94af8843c1ba01262 URL:
https://gitlab.winehq.org/wine/wine/-/commit/5d97483f2252bd37db0762b94af884…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Sep 4 22:37:56 2023 +0200 dmime: Get rid of the IDirectMusicGraphImpl typedef. --- dlls/dmime/audiopath.c | 12 ++++++------ dlls/dmime/dmime_private.h | 1 - dlls/dmime/graph.c | 37 +++++++++++++++++++------------------ 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/dlls/dmime/audiopath.c b/dlls/dmime/audiopath.c index 013939f9dfa..aef48a5d2db 100644 --- a/dlls/dmime/audiopath.c +++ b/dlls/dmime/audiopath.c @@ -158,11 +158,11 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_GetObjectInPath (IDirectMusicAud { if (IsEqualIID (iidInterface, &IID_IDirectMusicGraph)) { if (NULL == This->pToolGraph) { - IDirectMusicGraphImpl* pGraph; + IDirectMusicGraph* pGraph; hr = create_dmgraph(&IID_IDirectMusicGraph, (void**)&pGraph); if (FAILED(hr)) return hr; - This->pToolGraph = (IDirectMusicGraph*) pGraph; + This->pToolGraph = pGraph; } *ppObject = This->pToolGraph; IDirectMusicGraph_AddRef((LPDIRECTMUSICGRAPH) *ppObject); @@ -191,14 +191,14 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_GetObjectInPath (IDirectMusicAud IDirectMusicGraph* pPerfoGraph = NULL; IDirectMusicPerformance8_GetGraph(This->pPerf, &pPerfoGraph); if (NULL == pPerfoGraph) { - IDirectMusicGraphImpl* pGraph = NULL; + IDirectMusicGraph* pGraph = NULL; hr = create_dmgraph(&IID_IDirectMusicGraph, (void**)&pGraph); if (FAILED(hr)) return hr; - IDirectMusicPerformance8_SetGraph(This->pPerf, (IDirectMusicGraph*) pGraph); + IDirectMusicPerformance8_SetGraph(This->pPerf, pGraph); /* we need release as SetGraph do an AddRef */ - IDirectMusicGraph_Release((LPDIRECTMUSICGRAPH) pGraph); - pPerfoGraph = (LPDIRECTMUSICGRAPH) pGraph; + IDirectMusicGraph_Release(pGraph); + pPerfoGraph = pGraph; } *ppObject = pPerfoGraph; return S_OK; diff --git a/dlls/dmime/dmime_private.h b/dlls/dmime/dmime_private.h index 28b0afc9af8..be0c463339f 100644 --- a/dlls/dmime/dmime_private.h +++ b/dlls/dmime/dmime_private.h @@ -45,7 +45,6 @@ /***************************************************************************** * Interfaces */ -typedef struct IDirectMusicGraphImpl IDirectMusicGraphImpl; typedef struct IDirectMusicAudioPathImpl IDirectMusicAudioPathImpl; /***************************************************************************** diff --git a/dlls/dmime/graph.c b/dlls/dmime/graph.c index 2e548690a96..1e6f16b6be0 100644 --- a/dlls/dmime/graph.c +++ b/dlls/dmime/graph.c @@ -28,27 +28,28 @@ struct tool_entry IDirectMusicTool *tool; }; -struct IDirectMusicGraphImpl { - IDirectMusicGraph IDirectMusicGraph_iface; - struct dmobject dmobj; - LONG ref; +struct graph +{ + IDirectMusicGraph IDirectMusicGraph_iface; + struct dmobject dmobj; + LONG ref; - struct list tools; + struct list tools; }; -static inline IDirectMusicGraphImpl *impl_from_IDirectMusicGraph(IDirectMusicGraph *iface) +static inline struct graph *impl_from_IDirectMusicGraph(IDirectMusicGraph *iface) { - return CONTAINING_RECORD(iface, IDirectMusicGraphImpl, IDirectMusicGraph_iface); + return CONTAINING_RECORD(iface, struct graph, IDirectMusicGraph_iface); } -static inline IDirectMusicGraphImpl *impl_from_IPersistStream(IPersistStream *iface) +static inline struct graph *impl_from_IPersistStream(IPersistStream *iface) { - return CONTAINING_RECORD(iface, IDirectMusicGraphImpl, dmobj.IPersistStream_iface); + return CONTAINING_RECORD(iface, struct graph, dmobj.IPersistStream_iface); } static HRESULT WINAPI graph_QueryInterface(IDirectMusicGraph *iface, REFIID riid, void **ret_iface) { - IDirectMusicGraphImpl *This = impl_from_IDirectMusicGraph(iface); + struct graph *This = impl_from_IDirectMusicGraph(iface); TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ret_iface); @@ -76,7 +77,7 @@ static HRESULT WINAPI graph_QueryInterface(IDirectMusicGraph *iface, REFIID riid static ULONG WINAPI graph_AddRef(IDirectMusicGraph *iface) { - IDirectMusicGraphImpl *This = impl_from_IDirectMusicGraph(iface); + struct graph *This = impl_from_IDirectMusicGraph(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("(%p): %ld\n", This, ref); @@ -86,7 +87,7 @@ static ULONG WINAPI graph_AddRef(IDirectMusicGraph *iface) static ULONG WINAPI graph_Release(IDirectMusicGraph *iface) { - IDirectMusicGraphImpl *This = impl_from_IDirectMusicGraph(iface); + struct graph *This = impl_from_IDirectMusicGraph(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p): %ld\n", This, ref); @@ -110,7 +111,7 @@ static ULONG WINAPI graph_Release(IDirectMusicGraph *iface) static HRESULT WINAPI graph_StampPMsg(IDirectMusicGraph *iface, DMUS_PMSG *msg) { - IDirectMusicGraphImpl *This = impl_from_IDirectMusicGraph(iface); + struct graph *This = impl_from_IDirectMusicGraph(iface); FIXME("(%p, %p): stub\n", This, msg); return S_OK; } @@ -118,7 +119,7 @@ static HRESULT WINAPI graph_StampPMsg(IDirectMusicGraph *iface, DMUS_PMSG *msg) static HRESULT WINAPI graph_InsertTool(IDirectMusicGraph *iface, IDirectMusicTool *tool, DWORD *channels, DWORD channel_count, LONG index) { - IDirectMusicGraphImpl *This = impl_from_IDirectMusicGraph(iface); + struct graph *This = impl_from_IDirectMusicGraph(iface); struct tool_entry *entry, *next; TRACE("(%p, %p, %p, %ld, %li)\n", This, tool, channels, channel_count, index); @@ -142,7 +143,7 @@ static HRESULT WINAPI graph_InsertTool(IDirectMusicGraph *iface, IDirectMusicToo static HRESULT WINAPI graph_GetTool(IDirectMusicGraph *iface, DWORD index, IDirectMusicTool **ret_tool) { - IDirectMusicGraphImpl *This = impl_from_IDirectMusicGraph(iface); + struct graph *This = impl_from_IDirectMusicGraph(iface); struct tool_entry *entry; TRACE("(%p, %ld, %p)\n", This, index, ret_tool); @@ -164,7 +165,7 @@ static HRESULT WINAPI graph_GetTool(IDirectMusicGraph *iface, DWORD index, IDire static HRESULT WINAPI graph_RemoveTool(IDirectMusicGraph *iface, IDirectMusicTool *tool) { - IDirectMusicGraphImpl *This = impl_from_IDirectMusicGraph(iface); + struct graph *This = impl_from_IDirectMusicGraph(iface); struct tool_entry *entry; TRACE("(%p, %p)\n", This, tool); @@ -240,7 +241,7 @@ static const IDirectMusicObjectVtbl dmobject_vtbl = { static HRESULT WINAPI graph_IPersistStream_Load(IPersistStream *iface, IStream *stream) { - IDirectMusicGraphImpl *This = impl_from_IPersistStream(iface); + struct graph *This = impl_from_IPersistStream(iface); FIXME("(%p, %p): Loading not implemented yet\n", This, stream); @@ -262,7 +263,7 @@ static const IPersistStreamVtbl persiststream_vtbl = { /* for ClassFactory */ HRESULT create_dmgraph(REFIID riid, void **ret_iface) { - IDirectMusicGraphImpl* obj; + struct graph *obj; HRESULT hr; *ret_iface = NULL;
1
0
0
0
← Newer
1
...
57
58
59
60
61
62
63
...
92
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Results per page:
10
25
50
100
200