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
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
May 2024
----- 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
1 participants
705 discussions
Start a n
N
ew thread
Zhiyi Zhang : comctl32/tests: Add WM_SETFONT tests.
by Alexandre Julliard
28 May '24
28 May '24
Module: wine Branch: master Commit: daa6f9b1b20c5e1cd1b9e5a16c8d80e77fb7cc38 URL:
https://gitlab.winehq.org/wine/wine/-/commit/daa6f9b1b20c5e1cd1b9e5a16c8d80…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue May 14 11:43:46 2024 +0800 comctl32/tests: Add WM_SETFONT tests. --- dlls/comctl32/tests/misc.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c index d2bb85b2d75..e5ac43a7ae0 100644 --- a/dlls/comctl32/tests/misc.c +++ b/dlls/comctl32/tests/misc.c @@ -1160,6 +1160,102 @@ static void test_WM_STYLECHANGED(void) DestroyWindow(parent); } +static void test_WM_SETFONT(void) +{ + HFONT hfont, hfont2; + HWND parent, hwnd; + LOGFONTA lf; + int i, ret; + + static const struct + { + const CHAR *class_name; + BOOL use_system_font; + } + tests[] = + { + {ANIMATE_CLASSA, TRUE}, + {WC_BUTTONA}, + {WC_COMBOBOXA}, + {WC_COMBOBOXEXA}, + {DATETIMEPICK_CLASSA}, + {WC_EDITA}, + {WC_HEADERA}, + {HOTKEY_CLASSA}, + {WC_IPADDRESSA, TRUE}, + {WC_LISTBOXA}, + {WC_LISTVIEWA}, + {MONTHCAL_CLASSA}, + {WC_NATIVEFONTCTLA, TRUE}, + {WC_PAGESCROLLERA, TRUE}, + {PROGRESS_CLASSA}, + {REBARCLASSNAMEA}, + {WC_STATICA}, + {STATUSCLASSNAMEA}, + {"SysLink"}, + {WC_TABCONTROLA}, + {TOOLBARCLASSNAMEA}, + {TOOLTIPS_CLASSA}, + {TRACKBAR_CLASSA, TRUE}, + {WC_TREEVIEWA}, + {UPDOWN_CLASSA, TRUE}, + {WC_SCROLLBARA, TRUE}, + }; + + parent = CreateWindowA(WC_STATICA, "parent", WS_POPUP | WS_VISIBLE, 100, 100, 100, 100, + 0, 0, 0, 0); + ok(parent != NULL, "CreateWindowA failed, error %lu.\n", GetLastError()); + + for (i = 0; i < ARRAY_SIZE(tests); ++i) + { + winetest_push_context("%s", tests[i].class_name); + + hwnd = CreateWindowA(tests[i].class_name, "test", WS_POPUP | WS_VISIBLE, 0, 0, 50, 50, parent, + 0, 0, 0); + /* SysLink is unavailable in comctl32 v5 */ + if (!hwnd && !lstrcmpA(tests[i].class_name, "SysLink")) + { + winetest_pop_context(); + continue; + } + + ZeroMemory(&lf, sizeof(lf)); + lf.lfWeight = FW_NORMAL; + lf.lfHeight = 20; + lstrcpyA(lf.lfFaceName, "Tahoma"); + hfont = CreateFontIndirectA(&lf); + ok(hfont != NULL, "CreateFontIndirectA failed, error %lu.\n", GetLastError()); + + SendMessageA(hwnd, WM_SETFONT, (WPARAM)hfont, TRUE); + hfont2 = (HFONT)SendMessageA(hwnd, WM_GETFONT, 0, 0); + if (tests[i].use_system_font) + ok(hfont2 == NULL, "Got unexpected font %p.\n", hfont2); + else + todo_wine_if(!lstrcmpA(tests[i].class_name, TOOLTIPS_CLASSA)) + ok(hfont2 == hfont, "Got unexpected font %p.\n", hfont2); + ret = GetObjectA(hfont, sizeof(lf), &lf); + ok(ret == sizeof(lf), "GetObjectA failed, error %lu.\n", GetLastError()); + + DestroyWindow(hwnd); + + ret = GetObjectA(hfont, sizeof(lf), &lf); + if (!lstrcmpA(tests[i].class_name, WC_IPADDRESSA)) + { + todo_wine + ok(ret == 0, "GetObjectA succeeded.\n"); + } + else + { + todo_wine_if(!lstrcmpA(tests[i].class_name, "SysLink")) + ok(ret == sizeof(lf), "GetObjectA failed, error %lu.\n", GetLastError()); + } + + winetest_pop_context(); + } + + DestroyWindow(parent); +} + START_TEST(misc) { ULONG_PTR ctx_cookie; @@ -1173,6 +1269,7 @@ START_TEST(misc) test_Alloc(); test_comctl32_classes(FALSE); test_WM_STYLECHANGED(); + test_WM_SETFONT(); FreeLibrary(hComctl32); @@ -1188,6 +1285,7 @@ START_TEST(misc) test_WM_THEMECHANGED(); test_WM_SYSCOLORCHANGE(); test_WM_STYLECHANGED(); + test_WM_SETFONT(); unload_v6_module(ctx_cookie, hCtx); FreeLibrary(hComctl32);
1
0
0
0
Paul Gofman : mf: Implement audio capture device enumeration in MFEnumDeviceSources().
by Alexandre Julliard
28 May '24
28 May '24
Module: wine Branch: master Commit: b32c69b0866a369e67d3abaae22e6f302cbd24c7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b32c69b0866a369e67d3abaae22e6f…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri May 24 19:08:52 2024 -0600 mf: Implement audio capture device enumeration in MFEnumDeviceSources(). --- dlls/mf/Makefile.in | 1 + dlls/mf/main.c | 23 +++++++-- dlls/mf/mf_private.h | 2 + dlls/mf/sac.c | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++ dlls/mf/tests/mf.c | 10 ++-- 5 files changed, 157 insertions(+), 10 deletions(-) diff --git a/dlls/mf/Makefile.in b/dlls/mf/Makefile.in index 8eb1809be9b..d9f0123767d 100644 --- a/dlls/mf/Makefile.in +++ b/dlls/mf/Makefile.in @@ -13,6 +13,7 @@ SOURCES = \ mf.idl \ mf.rc \ quality.c \ + sac.c \ samplegrabber.c \ sar.c \ scheme_handler.c \ diff --git a/dlls/mf/main.c b/dlls/mf/main.c index 92558a86b30..e74a4ae8e4c 100644 --- a/dlls/mf/main.c +++ b/dlls/mf/main.c @@ -747,16 +747,29 @@ HRESULT WINAPI MFShutdownObject(IUnknown *object) /*********************************************************************** * MFEnumDeviceSources (mf.@) */ -HRESULT WINAPI MFEnumDeviceSources(IMFAttributes *attributes, IMFActivate ***sources, UINT32 *count) +HRESULT WINAPI MFEnumDeviceSources(IMFAttributes *attributes, IMFActivate ***sources, UINT32 *ret_count) { - FIXME("%p, %p, %p.\n", attributes, sources, count); + GUID source_type; + HRESULT hr; + + TRACE("%p, %p, %p.\n", attributes, sources, ret_count); - if (!attributes || !sources || !count) + if (!attributes || !sources || !ret_count) return E_INVALIDARG; - *count = 0; + if (FAILED(hr = IMFAttributes_GetGUID(attributes, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE, &source_type))) + return hr; - return S_OK; + if (IsEqualGUID(&source_type, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_GUID)) + { + FIXME("Not implemented for video capture devices.\n"); + *ret_count = 0; + return S_OK; + } + if (IsEqualGUID(&source_type, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_GUID)) + return enum_audio_capture_sources(attributes, sources, ret_count); + + return E_INVALIDARG; } struct simple_type_handler diff --git a/dlls/mf/mf_private.h b/dlls/mf/mf_private.h index 401e1f55b49..7d169c0711f 100644 --- a/dlls/mf/mf_private.h +++ b/dlls/mf/mf_private.h @@ -122,3 +122,5 @@ extern HRESULT create_topology(TOPOID id, IMFTopology **topology); extern HRESULT topology_node_get_object(IMFTopologyNode *node, REFIID riid, void **obj); extern HRESULT topology_node_get_type_handler(IMFTopologyNode *node, DWORD stream, BOOL output, IMFMediaTypeHandler **handler); extern HRESULT topology_node_init_media_type(IMFTopologyNode *node, DWORD stream, BOOL output, IMFMediaType **type); + +extern HRESULT enum_audio_capture_sources(IMFAttributes *attributes, IMFActivate ***sources, UINT32 *ret_count); diff --git a/dlls/mf/sac.c b/dlls/mf/sac.c new file mode 100644 index 00000000000..d5c6518a72c --- /dev/null +++ b/dlls/mf/sac.c @@ -0,0 +1,131 @@ +/* + * Copyright 2024 Paul Gofman for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS + +#include "mfapi.h" +#include "mfidl.h" +#include "mf_private.h" +#include "mmdeviceapi.h" +#include "audioclient.h" + +#include "initguid.h" +#include "devpkey.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(mfplat); + +static HRESULT audio_capture_create_object(IMFAttributes *attributes, void *user_context, IUnknown **obj) +{ + FIXME("%p, %p, %p stub.\n", attributes, user_context, obj); + + return E_NOTIMPL; +} + +static void audio_capture_shutdown_object(void *user_context, IUnknown *obj) +{ + TRACE("%p %p.\n", user_context, obj); +} + +static void audio_capture_free_private(void *user_context) +{ + TRACE("%p.\n", user_context); +} + +static const struct activate_funcs audio_capture_activate_funcs = +{ + audio_capture_create_object, + audio_capture_shutdown_object, + audio_capture_free_private, +}; + +HRESULT enum_audio_capture_sources(IMFAttributes *attributes, IMFActivate ***ret_sources, UINT32 *ret_count) +{ + IMMDeviceEnumerator *devenum = NULL; + IMMDeviceCollection *devices = NULL; + UINT32 i, count, created_count = 0; + IMFActivate **sources = NULL; + ERole role; + HRESULT hr; + + if (FAILED(hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, + (void **)&devenum))) + goto done; + if (SUCCEEDED(IMFAttributes_GetUINT32(attributes, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ROLE, (UINT32 *)&role))) + FIXME("Specifying role (%d) is not supported.\n", role); + if (FAILED(hr = IMMDeviceEnumerator_EnumAudioEndpoints(devenum, eCapture, DEVICE_STATE_ACTIVE, &devices))) + goto done; + if (FAILED(hr = IMMDeviceCollection_GetCount(devices, &count))) + goto done; + sources = CoTaskMemAlloc(count * sizeof(*sources)); + for (i = 0; i < count; ++i) + { + IMMDevice *device = NULL; + IPropertyStore *ps; + WCHAR *str = NULL; + PROPVARIANT pv; + + if (FAILED(hr = create_activation_object(NULL, &audio_capture_activate_funcs, &sources[i]))) + goto done; + ++created_count; + + hr = IMFActivate_SetGUID(sources[i], &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_GUID); + if (SUCCEEDED(hr)) + hr = IMMDeviceCollection_Item(devices, i, &device); + if (SUCCEEDED(hr)) + hr = IMMDevice_GetId(device, &str); + if (SUCCEEDED(hr)) + hr = IMFActivate_SetString(sources[i], &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ENDPOINT_ID, str); + CoTaskMemFree(str); + + PropVariantInit(&pv); + if (SUCCEEDED(hr) && SUCCEEDED((hr = IMMDevice_OpenPropertyStore(device, STGM_READ, &ps)))) + { + hr = IPropertyStore_GetValue(ps, (const PROPERTYKEY*)&DEVPKEY_Device_FriendlyName, &pv); + IPropertyStore_Release(ps); + } + if (device) + IMMDevice_Release(device); + + if (SUCCEEDED(hr) && pv.vt != VT_LPWSTR) + hr = E_FAIL; + + if (SUCCEEDED(hr)) + hr = IMFActivate_SetString(sources[i], &MF_DEVSOURCE_ATTRIBUTE_FRIENDLY_NAME, pv.pwszVal); + PropVariantClear(&pv); + if (FAILED(hr)) + goto done; + } + *ret_count = count; + *ret_sources = sources; + +done: + if (FAILED(hr)) + { + for (i = 0; i < created_count; ++i) + IMFActivate_Release(sources[i]); + CoTaskMemFree(sources); + } + if (devices) + IMMDeviceCollection_Release(devices); + if (devenum) + IMMDeviceEnumerator_Release(devenum); + TRACE("ret %#lx, *ret_count %u.\n", hr, *ret_count); + return hr; +} diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 6847030b329..a2f183e5cc4 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -6446,8 +6446,8 @@ static void test_MFEnumDeviceSources(void) sources = (void *)0xdeadbeef; count = 0xdeadbeef; hr = MFEnumDeviceSources(attrs, &sources, &count); - todo_wine ok(hr == MF_E_ATTRIBUTENOTFOUND, "got %#lx.\n", hr); - todo_wine ok(count == 0xdeadbeef, "got %#x.\n", count); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "got %#lx.\n", hr); + ok(count == 0xdeadbeef, "got %#x.\n", count); ok(sources == (void *)0xdeadbeef, "got %p.\n", sources); hr = CoInitialize(NULL); @@ -6456,7 +6456,7 @@ static void test_MFEnumDeviceSources(void) hr = IMFAttributes_SetGUID(attrs, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE); ok(hr == S_OK, "got %#lx.\n", hr); hr = MFEnumDeviceSources(attrs, &sources, &count); - todo_wine ok(hr == E_INVALIDARG, "got %#lx.\n", hr); + ok(hr == E_INVALIDARG, "got %#lx.\n", hr); hr = IMFAttributes_SetGUID(attrs, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_GUID); ok(hr == S_OK, "got %#lx.\n", hr); @@ -6474,7 +6474,7 @@ static void test_MFEnumDeviceSources(void) ok(hr == S_OK, "got %#lx.\n", hr); hr = IMMDeviceCollection_GetCount(devices, &count2); ok(hr == S_OK, "got %#lx.\n", hr); - todo_wine ok(count2 == count, "got %u, %u.\n", count, count2); + ok(count2 == count, "got %u, %u.\n", count, count2); for (i = 0; i < count; ++i) { @@ -6493,7 +6493,7 @@ static void test_MFEnumDeviceSources(void) ok(!wcscmp(str, device_id), "got %s, %s.\n", debugstr_w(str), debugstr_w(device_id)); hr = IMFActivate_GetString(source, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_SYMBOLIC_LINK, str, sizeof(str), NULL); - ok(hr == S_OK || broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Win7 */, "got %#lx.\n", hr); + todo_wine ok(hr == S_OK || broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Win7 */, "got %#lx.\n", hr); if (hr == S_OK) { swprintf(expect_str, ARRAY_SIZE(expect_str), L"%s%s#%s", mmdev_path_prefix, device_id, devinterface_audio_capture_wstr);
1
0
0
0
Paul Gofman : mf/tests: Add a test for MFEnumDeviceSources().
by Alexandre Julliard
28 May '24
28 May '24
Module: wine Branch: master Commit: 499af3e4f2cd57190e3047e0f18b1de29be033f3 URL:
https://gitlab.winehq.org/wine/wine/-/commit/499af3e4f2cd57190e3047e0f18b1d…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Mon May 27 13:30:08 2024 -0600 mf/tests: Add a test for MFEnumDeviceSources(). --- dlls/mf/tests/mf.c | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 110 insertions(+), 1 deletion(-) diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index fa5b0f55391..6847030b329 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -30,7 +30,6 @@ #include "mfapi.h" #include "mferror.h" #include "mfidl.h" -#include "mmdeviceapi.h" #include "uuids.h" #include "wmcodecdsp.h" #include "nserror.h" @@ -40,6 +39,8 @@ #include "wine/test.h" #include "initguid.h" +#include "mmdeviceapi.h" +#include "devpkey.h" #include "evr9.h" #define DEFINE_EXPECT(func) \ @@ -6426,6 +6427,113 @@ static void test_media_session_Start(void) ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); } +static void test_MFEnumDeviceSources(void) +{ + static const WCHAR devinterface_audio_capture_wstr[] = L"{2eef81be-33fa-4800-9670-1cd474972c3f}"; + static const WCHAR mmdev_path_prefix[] = L"\\\\?\\SWD#MMDEVAPI#"; + IMMDeviceEnumerator *devenum; + IMMDeviceCollection *devices; + UINT32 i, count, count2; + IMFActivate **sources; + IMFAttributes *attrs; + IMMDevice *device; + HRESULT hr; + GUID guid; + + hr = MFCreateAttributes(&attrs, 3); + ok(hr == S_OK, "got %#lx.\n", hr); + + sources = (void *)0xdeadbeef; + count = 0xdeadbeef; + hr = MFEnumDeviceSources(attrs, &sources, &count); + todo_wine ok(hr == MF_E_ATTRIBUTENOTFOUND, "got %#lx.\n", hr); + todo_wine ok(count == 0xdeadbeef, "got %#x.\n", count); + ok(sources == (void *)0xdeadbeef, "got %p.\n", sources); + + hr = CoInitialize(NULL); + ok(hr == S_OK, "got %#lx.\n", hr); + + hr = IMFAttributes_SetGUID(attrs, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE); + ok(hr == S_OK, "got %#lx.\n", hr); + hr = MFEnumDeviceSources(attrs, &sources, &count); + todo_wine ok(hr == E_INVALIDARG, "got %#lx.\n", hr); + + hr = IMFAttributes_SetGUID(attrs, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_GUID); + ok(hr == S_OK, "got %#lx.\n", hr); + + /* Some random guid. */ + hr = IMFAttributes_SetUINT32(attrs, &CLSID_MMDeviceEnumerator, 1); + ok(hr == S_OK, "got %#lx.\n", hr); + + hr = MFEnumDeviceSources(attrs, &sources, &count); + ok(hr == S_OK, "got %#lx.\n", hr); + + hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, (void **)&devenum); + ok(hr == S_OK, "got %#lx.\n", hr); + hr = IMMDeviceEnumerator_EnumAudioEndpoints(devenum, eCapture, DEVICE_STATE_ACTIVE, &devices); + ok(hr == S_OK, "got %#lx.\n", hr); + hr = IMMDeviceCollection_GetCount(devices, &count2); + ok(hr == S_OK, "got %#lx.\n", hr); + todo_wine ok(count2 == count, "got %u, %u.\n", count, count2); + + for (i = 0; i < count; ++i) + { + WCHAR str[512], expect_str[512], *device_id; + IMFActivate *source = sources[i]; + IPropertyStore *ps; + PROPVARIANT pv; + + hr = IMMDeviceCollection_Item(devices, i, &device); + ok(hr == S_OK, "got %#lx.\n", hr); + + hr = IMFActivate_GetString(source, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ENDPOINT_ID, str, sizeof(str), NULL); + ok(hr == S_OK, "got %#lx.\n", hr); + hr = IMMDevice_GetId(device, &device_id); + ok(hr == S_OK, "got %#lx.\n", hr); + ok(!wcscmp(str, device_id), "got %s, %s.\n", debugstr_w(str), debugstr_w(device_id)); + + hr = IMFActivate_GetString(source, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_SYMBOLIC_LINK, str, sizeof(str), NULL); + ok(hr == S_OK || broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Win7 */, "got %#lx.\n", hr); + if (hr == S_OK) + { + swprintf(expect_str, ARRAY_SIZE(expect_str), L"%s%s#%s", mmdev_path_prefix, device_id, devinterface_audio_capture_wstr); + ok(!wcscmp(str, expect_str), "got %s, expected %s.\n", debugstr_w(str), debugstr_w(expect_str)); + } + + hr = IMFActivate_GetGUID(source, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE, &guid); + ok(hr == S_OK, "got %#lx.\n", hr); + ok(IsEqualGUID(&guid, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_GUID), "got %s.\n", debugstr_guid(&guid)); + + hr = IMFActivate_GetUINT32(source, &MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ROLE, &count2); + /* The attribute is filled if specified in input attributes as a filter. */ + ok(hr == MF_E_ATTRIBUTENOTFOUND, "got %#lx.\n", hr); + + hr = IMMDevice_OpenPropertyStore(device, STGM_READ, &ps); + ok(hr == S_OK, "got %#lx.\n", hr); + hr = IPropertyStore_GetValue(ps, (const PROPERTYKEY*)&DEVPKEY_Device_FriendlyName, &pv); + ok(hr == S_OK, "got %#lx.\n", hr); + IPropertyStore_Release(ps); + + ok(pv.vt == VT_LPWSTR, "got %#x.\n", pv.vt); + hr = IMFActivate_GetString(source, &MF_DEVSOURCE_ATTRIBUTE_FRIENDLY_NAME, str, sizeof(str), NULL); + ok(hr == S_OK, "got %#lx.\n", hr); + ok(!wcscmp(str, pv.pwszVal), "got %s, %s.\n", debugstr_w(str), debugstr_w(pv.pwszVal)); + + PropVariantClear(&pv); + + CoTaskMemFree(device_id); + IMMDevice_Release(device); + IMFActivate_Release(source); + } + + IMMDeviceCollection_Release(devices); + IMMDeviceEnumerator_Release(devenum); + IMFAttributes_Release(attrs); + + CoTaskMemFree(sources); + CoUninitialize(); +} + START_TEST(mf) { init_functions(); @@ -6459,4 +6567,5 @@ START_TEST(mf) test_mpeg4_media_sink(); test_MFCreateSequencerSegmentOffset(); test_media_session_Start(); + test_MFEnumDeviceSources(); }
1
0
0
0
Elizabeth Figura : wined3d: Remove the no longer used buffer conversion code.
by Alexandre Julliard
28 May '24
28 May '24
Module: wine Branch: master Commit: a8ea6ae268bc1aa9255bf906c8dbdc800e336e33 URL:
https://gitlab.winehq.org/wine/wine/-/commit/a8ea6ae268bc1aa9255bf906c8dbdc…
Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Wed Mar 20 17:57:42 2024 -0500 wined3d: Remove the no longer used buffer conversion code. --- dlls/wined3d/buffer.c | 348 ++--------------------------------------- dlls/wined3d/wined3d_private.h | 14 -- 2 files changed, 9 insertions(+), 353 deletions(-)
1
0
0
0
Elizabeth Figura : wined3d: Remove the no longer needed wined3d_vertex_caps.ffp_generic_attributes flag.
by Alexandre Julliard
28 May '24
28 May '24
Module: wine Branch: master Commit: 4f2f51526b75deebae1c8a49ca4cefefd901dd9d URL:
https://gitlab.winehq.org/wine/wine/-/commit/4f2f51526b75deebae1c8a49ca4cef…
Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Wed Mar 20 17:51:07 2024 -0500 wined3d: Remove the no longer needed wined3d_vertex_caps.ffp_generic_attributes flag. --- dlls/wined3d/adapter_gl.c | 1 - dlls/wined3d/adapter_vk.c | 1 - dlls/wined3d/buffer.c | 39 +--- dlls/wined3d/context.c | 25 +-- dlls/wined3d/context_gl.c | 461 +---------------------------------------- dlls/wined3d/cs.c | 9 - dlls/wined3d/glsl_shader.c | 1 - dlls/wined3d/shader_spirv.c | 1 - dlls/wined3d/wined3d_gl.h | 2 - dlls/wined3d/wined3d_private.h | 3 - 10 files changed, 12 insertions(+), 531 deletions(-)
1
0
0
0
Elizabeth Figura : wined3d: Remove the no longer needed wined3d_vertex_caps.xyzrhw flag.
by Alexandre Julliard
28 May '24
28 May '24
Module: wine Branch: master Commit: a080a2a1a8ef959301b61e4e725db236b7a8076f URL:
https://gitlab.winehq.org/wine/wine/-/commit/a080a2a1a8ef959301b61e4e725db2…
Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Wed Mar 20 17:35:55 2024 -0500 wined3d: Remove the no longer needed wined3d_vertex_caps.xyzrhw flag. --- dlls/wined3d/adapter_gl.c | 24 +----------------------- dlls/wined3d/adapter_vk.c | 1 - dlls/wined3d/buffer.c | 37 ------------------------------------- dlls/wined3d/context.c | 3 +-- dlls/wined3d/cs.c | 2 +- dlls/wined3d/glsl_shader.c | 1 - dlls/wined3d/shader_spirv.c | 1 - dlls/wined3d/wined3d_private.h | 3 --- 8 files changed, 3 insertions(+), 69 deletions(-)
1
0
0
0
Elizabeth Figura : wined3d: Remove the no longer needed fragment_caps.color_key flag.
by Alexandre Julliard
28 May '24
28 May '24
Module: wine Branch: master Commit: 1acb951be1091bbce2e90a06eaad7dbc5b384730 URL:
https://gitlab.winehq.org/wine/wine/-/commit/1acb951be1091bbce2e90a06eaad7d…
Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Wed Mar 20 17:33:05 2024 -0500 wined3d: Remove the no longer needed fragment_caps.color_key flag. --- dlls/wined3d/adapter_gl.c | 8 -------- dlls/wined3d/glsl_shader.c | 1 - dlls/wined3d/texture.c | 38 -------------------------------------- dlls/wined3d/wined3d_private.h | 1 - 4 files changed, 48 deletions(-) diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 59c85df5a9a..8e2e8f9a359 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -5225,14 +5225,6 @@ static BOOL wined3d_adapter_gl_init(struct wined3d_adapter_gl *adapter_gl, wined3d_adapter_gl_init_d3d_info(adapter_gl, wined3d_creation_flags); - if (!adapter_gl->a.d3d_info.ffp_fragment_caps.color_key) - { - /* We do not want to deal with re-creating immutable texture storage - * for colour-keying emulation. */ - WARN("Disabling ARB_texture_storage because fragment pipe doesn't support colour-keying.\n"); - gl_info->supported[ARB_TEXTURE_STORAGE] = FALSE; - } - if (!wined3d_driver_info_init(driver_info, caps_gl_ctx.gpu_description, adapter_gl->a.d3d_info.feature_level, caps_gl_ctx.vram_bytes, 0)) { diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index f23a31516c4..a0cc7126b3e 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -12132,7 +12132,6 @@ static void glsl_fragment_pipe_get_caps(const struct wined3d_adapter *adapter, s const struct wined3d_gl_info *gl_info = &wined3d_adapter_gl_const(adapter)->gl_info; memset(caps, 0, sizeof(*caps)); - caps->color_key = true; caps->PrimitiveMiscCaps = WINED3DPMISCCAPS_TSSARGTEMP | WINED3DPMISCCAPS_PERSTAGECONSTANT; caps->TextureOpCaps = WINED3DTEXOPCAPS_DISABLE diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 86e4b603663..688dc35de98 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -1658,18 +1658,11 @@ struct wined3d_resource * CDECL wined3d_texture_get_resource(struct wined3d_text return &texture->resource; } -static BOOL color_key_equal(const struct wined3d_color_key *c1, struct wined3d_color_key *c2) -{ - return c1->color_space_low_value == c2->color_space_low_value - && c1->color_space_high_value == c2->color_space_high_value; -} - /* Context activation is done by the caller */ void wined3d_texture_load(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb) { UINT sub_count = texture->level_count * texture->layer_count; - const struct wined3d_d3d_info *d3d_info = context->d3d_info; DWORD flag; UINT i; @@ -1683,26 +1676,6 @@ void wined3d_texture_load(struct wined3d_texture *texture, else flag = WINED3D_TEXTURE_RGB_VALID; - if (!d3d_info->ffp_fragment_caps.color_key - && (!(texture->async.flags & WINED3D_TEXTURE_ASYNC_COLOR_KEY) - != !(texture->async.color_key_flags & WINED3D_CKEY_SRC_BLT) - || (texture->async.flags & WINED3D_TEXTURE_ASYNC_COLOR_KEY - && !color_key_equal(&texture->async.gl_color_key, &texture->async.src_blt_color_key)))) - { - unsigned int i; - - TRACE("Reloading because of color key value change.\n"); - for (i = 0; i < sub_count; i++) - { - if (!wined3d_texture_load_location(texture, i, context, texture->resource.map_binding)) - ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding)); - else - wined3d_texture_invalidate_location(texture, i, ~texture->resource.map_binding); - } - - texture->async.gl_color_key = texture->async.src_blt_color_key; - } - if (texture->flags & flag) { TRACE("Texture %p not dirty, nothing to do.\n", texture); @@ -2051,7 +2024,6 @@ void wined3d_texture_gl_prepare_texture(struct wined3d_texture_gl *texture_gl, struct wined3d_context_gl *context_gl, BOOL srgb) { DWORD alloc_flag = srgb ? WINED3D_TEXTURE_SRGB_ALLOCATED : WINED3D_TEXTURE_RGB_ALLOCATED; - const struct wined3d_d3d_info *d3d_info = context_gl->c.d3d_info; const struct wined3d_gl_info *gl_info = context_gl->gl_info; struct wined3d_resource *resource = &texture_gl->t.resource; const struct wined3d_device *device = resource->device; @@ -2063,16 +2035,6 @@ void wined3d_texture_gl_prepare_texture(struct wined3d_texture_gl *texture_gl, TRACE("texture_gl %p, context_gl %p, srgb %d, format %s.\n", texture_gl, context_gl, srgb, debug_d3dformat(format->id)); - if (!d3d_info->ffp_fragment_caps.color_key - && !(texture_gl->t.async.flags & WINED3D_TEXTURE_ASYNC_COLOR_KEY) - != !(texture_gl->t.async.color_key_flags & WINED3D_CKEY_SRC_BLT)) - { - wined3d_texture_force_reload(&texture_gl->t); - - if (texture_gl->t.async.color_key_flags & WINED3D_CKEY_SRC_BLT) - texture_gl->t.async.flags |= WINED3D_TEXTURE_ASYNC_COLOR_KEY; - } - if (texture_gl->t.flags & alloc_flag) return; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 2f5318adfc1..cb67dfaf93a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -197,7 +197,6 @@ struct fragment_caps unsigned int TextureOpCaps; unsigned int max_blend_stages; unsigned int max_textures; - bool color_key; }; struct wined3d_d3d_limits
1
0
0
0
Elizabeth Figura : wined3d: Remove the no longer needed fragment_caps.srgb_texture flag.
by Alexandre Julliard
28 May '24
28 May '24
Module: wine Branch: master Commit: fdbb5232d45a893acc06b4d19f5eca1963cdef46 URL:
https://gitlab.winehq.org/wine/wine/-/commit/fdbb5232d45a893acc06b4d19f5eca…
Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Wed Mar 20 17:30:54 2024 -0500 wined3d: Remove the no longer needed fragment_caps.srgb_texture flag. --- dlls/wined3d/glsl_shader.c | 1 - dlls/wined3d/utils.c | 3 +-- dlls/wined3d/wined3d_private.h | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 24bbe1cc6a8..f23a31516c4 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -12132,7 +12132,6 @@ static void glsl_fragment_pipe_get_caps(const struct wined3d_adapter *adapter, s const struct wined3d_gl_info *gl_info = &wined3d_adapter_gl_const(adapter)->gl_info; memset(caps, 0, sizeof(*caps)); - caps->srgb_write = true; caps->color_key = true; caps->PrimitiveMiscCaps = WINED3DPMISCCAPS_TSSARGTEMP | WINED3DPMISCCAPS_PERSTAGECONSTANT; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 91355438378..7e4fe21e727 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -3174,8 +3174,7 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win adapter->fragment_pipe->get_caps(adapter, &fragment_caps); adapter->shader_backend->shader_get_caps(adapter, &shader_caps); - srgb_write = fragment_caps.srgb_write - && (!shader_caps.ps_version || (shader_caps.wined3d_caps & WINED3D_SHADER_CAP_SRGB_WRITE)); + srgb_write = (!shader_caps.ps_version || (shader_caps.wined3d_caps & WINED3D_SHADER_CAP_SRGB_WRITE)); for (i = 0; i < ARRAY_SIZE(format_texture_info); ++i) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 1c70b65dd8c..2f5318adfc1 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -197,7 +197,6 @@ struct fragment_caps unsigned int TextureOpCaps; unsigned int max_blend_stages; unsigned int max_textures; - bool srgb_write; bool color_key; };
1
0
0
0
Alexandre Julliard : msvcrt: Only export stubs of thiscall functions on i386.
by Alexandre Julliard
28 May '24
28 May '24
Module: wine Branch: master Commit: 014cd36a56e090d469d71a737085bb92c6293f15 URL:
https://gitlab.winehq.org/wine/wine/-/commit/014cd36a56e090d469d71a737085bb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue May 28 12:28:27 2024 +0200 msvcrt: Only export stubs of thiscall functions on i386. The mangled names are different on platforms without thiscall. --- dlls/msvcr100/msvcr100.spec | 102 ++++++++++++++++++++++---------------------- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt20/msvcrt20.spec | 4 +- dlls/msvcrt40/msvcrt40.spec | 4 +- 5 files changed, 57 insertions(+), 57 deletions(-)
1
0
0
0
Alexandre Julliard : msvcrt: Only export thiscall functions on i386.
by Alexandre Julliard
28 May '24
28 May '24
Module: wine Branch: master Commit: 4701e2bae0f77dc6d32fc0bd80aed12fbfeac5d5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/4701e2bae0f77dc6d32fc0bd80aed1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue May 28 12:28:17 2024 +0200 msvcrt: Only export thiscall functions on i386. The mangled names are different on platforms without thiscall. --- dlls/msvcirt/msvcirt.spec | 728 +++++++++++++++++++++---------------------- dlls/msvcr100/msvcr100.spec | 150 ++++----- dlls/msvcr110/msvcr110.spec | 24 +- dlls/msvcr70/msvcr70.spec | 20 +- dlls/msvcr71/msvcr71.spec | 4 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/msvcrt.spec | 16 +- dlls/msvcrt20/msvcrt20.spec | 708 +++++++++++++++++++++--------------------- dlls/msvcrt40/msvcrt40.spec | 738 ++++++++++++++++++++++---------------------- dlls/msvcrtd/msvcrtd.spec | 20 +- 11 files changed, 1206 insertions(+), 1206 deletions(-)
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
71
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
Results per page:
10
25
50
100
200