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 2019
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1019 discussions
Start a n
N
ew thread
Alexandre Julliard : urlmon: Use strncmpiW instead of memicmpW for strings without embedded nulls.
by Alexandre Julliard
08 May '19
08 May '19
Module: wine Branch: master Commit: 1dd25f2deaafd7834ce981603316734ab2843ecb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1dd25f2deaafd7834ce98160…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 8 08:35:05 2019 -0500 urlmon: Use strncmpiW instead of memicmpW for strings without embedded nulls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/urlmon/uri.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c index 92978dc..07026ea 100644 --- a/dlls/urlmon/uri.c +++ b/dlls/urlmon/uri.c @@ -3889,7 +3889,7 @@ static HRESULT compare_file_paths(const Uri *a, const Uri *b, BOOL *ret) } /* Fast path */ - if(a->path_len == b->path_len && !memicmpW(a->canon_uri+a->path_start, b->canon_uri+b->path_start, a->path_len)) { + if(a->path_len == b->path_len && !strncmpiW(a->canon_uri+a->path_start, b->canon_uri+b->path_start, a->path_len)) { *ret = TRUE; return S_OK; } @@ -3909,7 +3909,7 @@ static HRESULT compare_file_paths(const Uri *a, const Uri *b, BOOL *ret) len_a = canonicalize_path_hierarchical(a->canon_uri+a->path_start, a->path_len, a->scheme_type, FALSE, 0, FALSE, canon_path_a); len_b = canonicalize_path_hierarchical(b->canon_uri+b->path_start, b->path_len, b->scheme_type, FALSE, 0, FALSE, canon_path_b); - *ret = len_a == len_b && !memicmpW(canon_path_a, canon_path_b, len_a); + *ret = len_a == len_b && !strncmpiW(canon_path_a, canon_path_b, len_a); heap_free(canon_path_a); heap_free(canon_path_b);
1
0
0
0
Alexandre Julliard : shlwapi: Use strncmpiW instead of memicmpW for strings without embedded nulls.
by Alexandre Julliard
08 May '19
08 May '19
Module: wine Branch: master Commit: 388a3ef908140b3e9c5c4a103f588268675b14d5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=388a3ef908140b3e9c5c4a10…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 8 08:34:56 2019 -0500 shlwapi: Use strncmpiW instead of memicmpW for strings without embedded nulls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shlwapi/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c index fb38920..72cc461 100644 --- a/dlls/shlwapi/url.c +++ b/dlls/shlwapi/url.c @@ -138,7 +138,7 @@ static DWORD get_scheme_code(LPCWSTR scheme, DWORD scheme_len) for(i = 0; i < ARRAY_SIZE(shlwapi_schemes); i++) { if(scheme_len == strlenW(shlwapi_schemes[i].scheme_name) - && !memicmpW(scheme, shlwapi_schemes[i].scheme_name, scheme_len)) + && !strncmpiW(scheme, shlwapi_schemes[i].scheme_name, scheme_len)) return shlwapi_schemes[i].scheme_number; }
1
0
0
0
Alexandre Julliard : qmgr: Use strncmpiW instead of memicmpW for strings without embedded nulls.
by Alexandre Julliard
08 May '19
08 May '19
Module: wine Branch: master Commit: 0ab48967bd110114a50cae5fb9d024bfa8d92ee7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0ab48967bd110114a50cae5f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 8 08:34:48 2019 -0500 qmgr: Use strncmpiW instead of memicmpW for strings without embedded nulls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qmgr/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/qmgr/file.c b/dlls/qmgr/file.c index dbdfc97..e717dc8 100644 --- a/dlls/qmgr/file.c +++ b/dlls/qmgr/file.c @@ -459,7 +459,7 @@ static BOOL transfer_file_local(BackgroundCopyFileImpl *file, const WCHAR *tmpna transitionJobState(job, BG_JOB_STATE_QUEUED, BG_JOB_STATE_TRANSFERRING); - if (strlenW(file->info.RemoteName) > 7 && !memicmpW(file->info.RemoteName, fileW, 7)) + if (strlenW(file->info.RemoteName) > 7 && !strncmpiW(file->info.RemoteName, fileW, 7)) ptr = file->info.RemoteName + 7; else ptr = file->info.RemoteName;
1
0
0
0
Alexandre Julliard : pdh: Use strncmpiW instead of memicmpW for strings without embedded nulls.
by Alexandre Julliard
08 May '19
08 May '19
Module: wine Branch: master Commit: f1fe6d54154f58f261917c853a0e526547212b38 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f1fe6d54154f58f261917c85…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 8 08:34:41 2019 -0500 pdh: Use strncmpiW instead of memicmpW for strings without embedded nulls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/pdh/pdh_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/pdh/pdh_main.c b/dlls/pdh/pdh_main.c index 7ef91f1..11c917a 100644 --- a/dlls/pdh/pdh_main.c +++ b/dlls/pdh/pdh_main.c @@ -213,7 +213,7 @@ static BOOL is_local_machine( const WCHAR *name, DWORD len ) DWORD buflen = ARRAY_SIZE(buf); if (!GetComputerNameW( buf, &buflen )) return FALSE; - return len == buflen && !memicmpW( name, buf, buflen ); + return len == buflen && !strncmpiW( name, buf, buflen ); } static BOOL pdh_match_path( LPCWSTR fullpath, LPCWSTR path )
1
0
0
0
Alexandre Julliard : ntdll: Use strncmpiW instead of memicmpW for strings without embedded nulls.
by Alexandre Julliard
08 May '19
08 May '19
Module: wine Branch: master Commit: 6fc259a57dafab9e72af13980c021e2a59257935 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6fc259a57dafab9e72af1398…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 8 08:34:32 2019 -0500 ntdll: Use strncmpiW instead of memicmpW for strings without embedded nulls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/actctx.c | 2 +- dlls/ntdll/directory.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index ee1f764..106fea8 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -3144,7 +3144,7 @@ static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai ) tmp = strchrW(tmp, '_') + 1; tmp = strchrW(tmp, '_') + 1; if (dir_info->FileNameLength - (tmp - dir_info->FileName) * sizeof(WCHAR) == sizeof(wine_trailerW) && - !memicmpW( tmp, wine_trailerW, ARRAY_SIZE( wine_trailerW ))) + !strncmpiW( tmp, wine_trailerW, ARRAY_SIZE( wine_trailerW ))) { /* prefer a non-Wine manifest if we already have one */ /* we'll still load the builtin dll if specified through DllOverrides */ diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index c853470..bbdbbe9 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -2101,7 +2101,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i { ret = ntdll_umbstowcs( 0, kde[1].d_name, strlen(kde[1].d_name), buffer, MAX_DIR_ENTRY_LEN ); - if (ret == length && !memicmpW( buffer, name, length)) + if (ret == length && !strncmpiW( buffer, name, length)) { strcpy( unix_name + pos, kde[1].d_name ); RtlLeaveCriticalSection( &dir_section ); @@ -2111,7 +2111,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i } ret = ntdll_umbstowcs( 0, kde[0].d_name, strlen(kde[0].d_name), buffer, MAX_DIR_ENTRY_LEN ); - if (ret == length && !memicmpW( buffer, name, length)) + if (ret == length && !strncmpiW( buffer, name, length)) { strcpy( unix_name + pos, kde[1].d_name[0] ? kde[1].d_name : kde[0].d_name ); @@ -2145,7 +2145,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i while ((de = readdir( dir ))) { ret = ntdll_umbstowcs( 0, de->d_name, strlen(de->d_name), buffer, MAX_DIR_ENTRY_LEN ); - if (ret == length && !memicmpW( buffer, name, length )) + if (ret == length && !strncmpiW( buffer, name, length )) { strcpy( unix_name + pos, de->d_name ); closedir( dir ); @@ -2159,7 +2159,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i { WCHAR short_nameW[12]; ret = hash_short_file_name( &str, short_nameW ); - if (ret == length && !memicmpW( short_nameW, name, length )) + if (ret == length && !strncmpiW( short_nameW, name, length )) { strcpy( unix_name + pos, de->d_name ); closedir( dir ); @@ -2468,7 +2468,7 @@ static inline int get_dos_prefix_len( const UNICODE_STRING *name ) return ARRAY_SIZE( nt_prefixW ); if (name->Length >= sizeof(dosdev_prefixW) && - !memicmpW( name->Buffer, dosdev_prefixW, ARRAY_SIZE( dosdev_prefixW ))) + !strncmpiW( name->Buffer, dosdev_prefixW, ARRAY_SIZE( dosdev_prefixW ))) return ARRAY_SIZE( dosdev_prefixW ); return 0;
1
0
0
0
Alexandre Julliard : netapi32: Use strncmpiW instead of memicmpW for strings without embedded nulls.
by Alexandre Julliard
08 May '19
08 May '19
Module: wine Branch: master Commit: ddac3dccc8930800e614f1507e77a876cee54abf URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ddac3dccc8930800e614f150…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 8 08:34:19 2019 -0500 netapi32: Use strncmpiW instead of memicmpW for strings without embedded nulls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/netapi32/netapi32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/netapi32/netapi32.c b/dlls/netapi32/netapi32.c index c765f36..d6554aa 100644 --- a/dlls/netapi32/netapi32.c +++ b/dlls/netapi32/netapi32.c @@ -3394,7 +3394,7 @@ DWORD WINAPI DavGetHTTPFromUNCPath(const WCHAR *unc_path, WCHAR *buf, DWORD *buf { p = ++q; while (*p && (*p != '\\' && *p != '/' && *p != '@')) p++; - if (p - q == 3 && !memicmpW( q, sslW, 3 )) + if (p - q == 3 && !strncmpiW( q, sslW, 3 )) { scheme = httpsW; q = p; @@ -3477,8 +3477,8 @@ DWORD WINAPI DavGetUNCFromHTTPPath(const WCHAR *http_path, WCHAR *buf, DWORD *bu TRACE("(%s %p %p)\n", debugstr_w(http_path), buf, buflen); while (*p && *p != ':') { p++; len++; }; - if (len == ARRAY_SIZE(httpW) && !memicmpW( http_path, httpW, len )) ssl = FALSE; - else if (len == ARRAY_SIZE(httpsW) && !memicmpW( http_path, httpsW, len )) ssl = TRUE; + if (len == ARRAY_SIZE(httpW) && !strncmpiW( http_path, httpW, len )) ssl = FALSE; + else if (len == ARRAY_SIZE(httpsW) && !strncmpiW( http_path, httpsW, len )) ssl = TRUE; else return ERROR_INVALID_PARAMETER; if (p[0] != ':' || p[1] != '/' || p[2] != '/') return ERROR_INVALID_PARAMETER;
1
0
0
0
Zebediah Figura : setupapi: Avoid passing a NULL source filename to SetupQueueDefaultCopy().
by Alexandre Julliard
08 May '19
08 May '19
Module: wine Branch: master Commit: 9ccf1dd88b89530977923058a7334816e6b368d4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9ccf1dd88b89530977923058…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue May 7 18:04:10 2019 -0500 setupapi: Avoid passing a NULL source filename to SetupQueueDefaultCopy(). Fixes a regression introduced by 705d3eed86f3ff96ee1190dbc694148c21c4939c. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47138
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/setupapi/install.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/setupapi/install.c b/dlls/setupapi/install.c index 265fbd0..6a3213c 100644 --- a/dlls/setupapi/install.c +++ b/dlls/setupapi/install.c @@ -165,7 +165,7 @@ static BOOL copy_files_callback( HINF hinf, PCWSTR field, void *arg ) if (field[0] == '@') /* special case: copy single file */ SetupQueueDefaultCopyW( info->queue, info->layout ? info->layout : hinf, - info->src_root ? info->src_root : src_root, NULL, field+1, info->copy_flags ); + info->src_root ? info->src_root : src_root, field+1, field+1, info->copy_flags ); else SetupQueueCopySectionW( info->queue, info->src_root ? info->src_root : src_root, info->layout ? info->layout : hinf, hinf, field, info->copy_flags );
1
0
0
0
Nikolay Sivov : mf: Add IMFGetService stub for media session.
by Alexandre Julliard
08 May '19
08 May '19
Module: wine Branch: master Commit: 83f59518100c6cb0fdf2132b842cc2f5449e9844 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=83f59518100c6cb0fdf2132b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed May 8 14:46:43 2019 +0300 mf: Add IMFGetService stub for media session. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/session.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/mf/tests/mf.c | 5 +++++ 2 files changed, 51 insertions(+) diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 7f8a283..a433a30 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -36,6 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mfplat); struct media_session { IMFMediaSession IMFMediaSession_iface; + IMFGetService IMFGetService_iface; LONG refcount; IMFMediaEventQueue *event_queue; }; @@ -92,6 +93,11 @@ static inline struct media_session *impl_from_IMFMediaSession(IMFMediaSession *i return CONTAINING_RECORD(iface, struct media_session, IMFMediaSession_iface); } +static struct media_session *impl_from_IMFGetService(IMFGetService *iface) +{ + return CONTAINING_RECORD(iface, struct media_session, IMFGetService_iface); +} + static struct presentation_clock *impl_from_IMFPresentationClock(IMFPresentationClock *iface) { return CONTAINING_RECORD(iface, struct presentation_clock, IMFPresentationClock_iface); @@ -136,6 +142,12 @@ static HRESULT WINAPI mfsession_QueryInterface(IMFMediaSession *iface, REFIID ri IMFMediaSession_AddRef(iface); return S_OK; } + else if (IsEqualIID(riid, &IID_IMFGetService)) + { + *out = &session->IMFGetService_iface; + IMFMediaSession_AddRef(iface); + return S_OK; + } WARN("Unsupported %s.\n", debugstr_guid(riid)); *out = NULL; @@ -301,6 +313,39 @@ static const IMFMediaSessionVtbl mfmediasessionvtbl = mfsession_GetFullTopology, }; +static HRESULT WINAPI session_get_service_QueryInterface(IMFGetService *iface, REFIID riid, void **obj) +{ + struct media_session *session = impl_from_IMFGetService(iface); + return IMFMediaSession_QueryInterface(&session->IMFMediaSession_iface, riid, obj); +} + +static ULONG WINAPI session_get_service_AddRef(IMFGetService *iface) +{ + struct media_session *session = impl_from_IMFGetService(iface); + return IMFMediaSession_AddRef(&session->IMFMediaSession_iface); +} + +static ULONG WINAPI session_get_service_Release(IMFGetService *iface) +{ + struct media_session *session = impl_from_IMFGetService(iface); + return IMFMediaSession_Release(&session->IMFMediaSession_iface); +} + +static HRESULT WINAPI session_get_service_GetService(IMFGetService *iface, REFGUID service, REFIID riid, void **obj) +{ + FIXME("%p, %s, %s, %p.\n", iface, debugstr_guid(service), debugstr_guid(riid), obj); + + return E_NOTIMPL; +} + +static const IMFGetServiceVtbl session_get_service_vtbl = +{ + session_get_service_QueryInterface, + session_get_service_AddRef, + session_get_service_Release, + session_get_service_GetService, +}; + /*********************************************************************** * MFCreateMediaSession (mf.@) */ @@ -319,6 +364,7 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **ses return E_OUTOFMEMORY; object->IMFMediaSession_iface.lpVtbl = &mfmediasessionvtbl; + object->IMFGetService_iface.lpVtbl = &session_get_service_vtbl; object->refcount = 1; if (FAILED(hr = MFCreateEventQueue(&object->event_queue))) { diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index ff3290a..fc068a9 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -944,6 +944,7 @@ todo_wine static void test_media_session(void) { IMFMediaSession *session; + IMFGetService *gs; IUnknown *unk; HRESULT hr; @@ -956,6 +957,10 @@ static void test_media_session(void) hr = IMFMediaSession_QueryInterface(session, &IID_IMFAttributes, (void **)&unk); ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + hr = IMFMediaSession_QueryInterface(session, &IID_IMFGetService, (void **)&gs); + ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + IMFGetService_Release(gs); + test_session_events(session); IMFMediaSession_Release(session);
1
0
0
0
Nikolay Sivov : mf: Disconnect removed nodes.
by Alexandre Julliard
08 May '19
08 May '19
Module: wine Branch: master Commit: 37a7b65140c928de8e029d5bea3d27ba1c346573 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=37a7b65140c928de8e029d5b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed May 8 14:46:42 2019 +0300 mf: Disconnect removed nodes. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/tests/mf.c | 10 ++--- dlls/mf/topology.c | 123 +++++++++++++++++++++++++++++++---------------------- 2 files changed, 74 insertions(+), 59 deletions(-) diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 8b3b8b4..ff3290a 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -589,10 +589,9 @@ static void test_topology(void) hr = IMFTopology_Clear(topology); ok(hr == S_OK, "Failed to clear topology, hr %#x.\n", hr); -todo_wine { EXPECT_REF(node, 1); EXPECT_REF(node2, 1); -} + /* Removing connected node breaks connection. */ hr = IMFTopology_AddNode(topology, node); ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); @@ -606,12 +605,10 @@ todo_wine { hr = IMFTopology_RemoveNode(topology, node); ok(hr == S_OK, "Failed to remove a node, hr %#x.\n", hr); -todo_wine { EXPECT_REF(node, 1); EXPECT_REF(node2, 2); -} + hr = IMFTopologyNode_GetOutput(node, 0, &node3, &index); -todo_wine ok(hr == MF_E_NOT_FOUND, "Unexpected hr %#x.\n", hr); hr = IMFTopology_AddNode(topology, node); @@ -623,10 +620,9 @@ todo_wine hr = IMFTopology_RemoveNode(topology, node2); ok(hr == S_OK, "Failed to remove a node, hr %#x.\n", hr); -todo_wine { EXPECT_REF(node, 2); EXPECT_REF(node2, 1); -} + IMFTopologyNode_Release(node); IMFTopologyNode_Release(node2); diff --git a/dlls/mf/topology.c b/dlls/mf/topology.c index c10bc6a..e10bc8b 100644 --- a/dlls/mf/topology.c +++ b/dlls/mf/topology.c @@ -174,12 +174,81 @@ static ULONG WINAPI topology_AddRef(IMFTopology *iface) return refcount; } +static HRESULT topology_node_disconnect_output(struct topology_node *node, DWORD output_index) +{ + struct topology_node *connection = NULL; + struct node_stream *stream; + DWORD connection_stream; + HRESULT hr = S_OK; + + EnterCriticalSection(&node->cs); + + if (output_index < node->outputs.count) + { + stream = &node->outputs.streams[output_index]; + + if (stream->connection) + { + connection = stream->connection; + connection_stream = stream->connection_stream; + stream->connection = NULL; + stream->connection_stream = 0; + } + else + hr = MF_E_NOT_FOUND; + } + else + hr = E_INVALIDARG; + + LeaveCriticalSection(&node->cs); + + if (connection) + { + EnterCriticalSection(&connection->cs); + + if (connection_stream < connection->inputs.count) + { + stream = &connection->inputs.streams[connection_stream]; + + if (stream->connection) + { + stream->connection = NULL; + stream->connection_stream = 0; + } + } + + LeaveCriticalSection(&connection->cs); + + IMFTopologyNode_Release(&connection->IMFTopologyNode_iface); + IMFTopologyNode_Release(&node->IMFTopologyNode_iface); + } + + return hr; +} + +static void topology_node_disconnect(struct topology_node *node) +{ + struct node_stream *stream; + size_t i; + + for (i = 0; i < node->outputs.count; ++i) + topology_node_disconnect_output(node, i); + + for (i = 0; i < node->inputs.count; ++i) + { + stream = &node->inputs.streams[i]; + if (stream->connection) + topology_node_disconnect_output(stream->connection, stream->connection_stream); + } +} + static void topology_clear(struct topology *topology) { size_t i; for (i = 0; i < topology->nodes.count; ++i) { + topology_node_disconnect(topology->nodes.nodes[i]); IMFTopologyNode_Release(&topology->nodes.nodes[i]->IMFTopologyNode_iface); } heap_free(topology->nodes.nodes); @@ -551,6 +620,8 @@ static HRESULT WINAPI topology_RemoveNode(IMFTopology *iface, IMFTopologyNode *n { if (&topology->nodes.nodes[i]->IMFTopologyNode_iface == node) { + topology_node_disconnect(topology->nodes.nodes[i]); + IMFTopologyNode_Release(&topology->nodes.nodes[i]->IMFTopologyNode_iface); count = topology->nodes.count - i - 1; if (count) { @@ -1248,58 +1319,6 @@ static HRESULT WINAPI topology_node_GetOutputCount(IMFTopologyNode *iface, DWORD return S_OK; } -static HRESULT topology_node_disconnect_output(struct topology_node *node, DWORD output_index) -{ - struct topology_node *connection = NULL; - struct node_stream *stream; - DWORD connection_stream; - HRESULT hr = S_OK; - - EnterCriticalSection(&node->cs); - - if (output_index < node->outputs.count) - { - stream = &node->outputs.streams[output_index]; - - if (stream->connection) - { - connection = stream->connection; - connection_stream = stream->connection_stream; - stream->connection = NULL; - stream->connection_stream = 0; - } - else - hr = MF_E_NOT_FOUND; - } - else - hr = E_INVALIDARG; - - LeaveCriticalSection(&node->cs); - - if (connection) - { - EnterCriticalSection(&connection->cs); - - if (connection_stream < connection->inputs.count) - { - stream = &connection->inputs.streams[connection_stream]; - - if (stream->connection) - { - stream->connection = NULL; - stream->connection_stream = 0; - } - } - - LeaveCriticalSection(&connection->cs); - - IMFTopologyNode_Release(&connection->IMFTopologyNode_iface); - IMFTopologyNode_Release(&node->IMFTopologyNode_iface); - } - - return hr; -} - static HRESULT WINAPI topology_node_ConnectOutput(IMFTopologyNode *iface, DWORD output_index, IMFTopologyNode *peer, DWORD input_index) {
1
0
0
0
Nikolay Sivov : mf: Rework node collection implementation.
by Alexandre Julliard
08 May '19
08 May '19
Module: wine Branch: master Commit: 184f99945975728d0ac4a3c544b13f1b40bf1c9c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=184f99945975728d0ac4a3c5…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed May 8 14:46:41 2019 +0300 mf: Rework node collection implementation. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/topology.c | 193 +++++++++++++++++++++++++++-------------------------- 1 file changed, 99 insertions(+), 94 deletions(-) diff --git a/dlls/mf/topology.c b/dlls/mf/topology.c index eaae7c9..c10bc6a 100644 --- a/dlls/mf/topology.c +++ b/dlls/mf/topology.c @@ -45,15 +45,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mfplat); static LONG next_node_id; static TOPOID next_topology_id; -struct topology -{ - IMFTopology IMFTopology_iface; - LONG refcount; - IMFAttributes *attributes; - IMFCollection *nodes; - TOPOID id; -}; - struct node_stream { IMFMediaType *preferred_type; @@ -81,6 +72,20 @@ struct topology_node CRITICAL_SECTION cs; }; +struct topology +{ + IMFTopology IMFTopology_iface; + LONG refcount; + IMFAttributes *attributes; + struct + { + struct topology_node **nodes; + size_t size; + size_t count; + } nodes; + TOPOID id; +}; + struct topology_loader { IMFTopoLoader IMFTopoLoader_iface; @@ -169,19 +174,32 @@ static ULONG WINAPI topology_AddRef(IMFTopology *iface) return refcount; } +static void topology_clear(struct topology *topology) +{ + size_t i; + + for (i = 0; i < topology->nodes.count; ++i) + { + IMFTopologyNode_Release(&topology->nodes.nodes[i]->IMFTopologyNode_iface); + } + heap_free(topology->nodes.nodes); + topology->nodes.nodes = NULL; + topology->nodes.count = 0; + topology->nodes.size = 0; +} + static ULONG WINAPI topology_Release(IMFTopology *iface) { struct topology *topology = impl_from_IMFTopology(iface); ULONG refcount = InterlockedDecrement(&topology->refcount); - TRACE("(%p) refcount=%u\n", iface, refcount); + TRACE("%p, refcount %u.\n", iface, refcount); if (!refcount) { if (topology->attributes) IMFAttributes_Release(topology->attributes); - if (topology->nodes) - IMFCollection_Release(topology->nodes); + topology_clear(topology); heap_free(topology); } @@ -476,80 +494,72 @@ static HRESULT WINAPI topology_GetTopologyID(IMFTopology *iface, TOPOID *id) return S_OK; } -static HRESULT topology_get_node_by_id(const struct topology *topology, TOPOID id, IMFTopologyNode **node) +static HRESULT topology_get_node_by_id(const struct topology *topology, TOPOID id, struct topology_node **node) { - IMFTopologyNode *iter; - unsigned int i = 0; + size_t i = 0; - while (IMFCollection_GetElement(topology->nodes, i++, (IUnknown **)&iter) == S_OK) + for (i = 0; i < topology->nodes.count; ++i) { - TOPOID node_id; - HRESULT hr; - - hr = IMFTopologyNode_GetTopoNodeID(iter, &node_id); - if (FAILED(hr)) - { - IMFTopologyNode_Release(iter); - return hr; - } - - if (node_id == id) + if (topology->nodes.nodes[i]->id == id) { - *node = iter; + *node = topology->nodes.nodes[i]; + IMFTopologyNode_AddRef(&(*node)->IMFTopologyNode_iface); return S_OK; } - - IMFTopologyNode_Release(iter); } return MF_E_NOT_FOUND; } -static HRESULT WINAPI topology_AddNode(IMFTopology *iface, IMFTopologyNode *node) +static HRESULT WINAPI topology_AddNode(IMFTopology *iface, IMFTopologyNode *node_iface) { struct topology *topology = impl_from_IMFTopology(iface); - IMFTopologyNode *match; - HRESULT hr; - TOPOID id; + struct topology_node *node = unsafe_impl_from_IMFTopologyNode(node_iface); + struct topology_node *match; - TRACE("(%p)->(%p)\n", iface, node); + TRACE("%p, %p.\n", iface, node_iface); if (!node) return E_POINTER; - if (FAILED(hr = IMFTopologyNode_GetTopoNodeID(node, &id))) - return hr; + if (SUCCEEDED(topology_get_node_by_id(topology, node->id, &match))) + { + IMFTopologyNode_Release(&match->IMFTopologyNode_iface); + return E_INVALIDARG; + } - if (FAILED(topology_get_node_by_id(topology, id, &match))) - return IMFCollection_AddElement(topology->nodes, (IUnknown *)node); + if (!mf_array_reserve((void **)&topology->nodes.nodes, &topology->nodes.size, topology->nodes.count + 1, + sizeof(*topology->nodes.nodes))) + { + return E_OUTOFMEMORY; + } - IMFTopologyNode_Release(match); + topology->nodes.nodes[topology->nodes.count++] = node; + IMFTopologyNode_AddRef(&node->IMFTopologyNode_iface); - return E_INVALIDARG; + return S_OK; } static HRESULT WINAPI topology_RemoveNode(IMFTopology *iface, IMFTopologyNode *node) { struct topology *topology = impl_from_IMFTopology(iface); - unsigned int i = 0; - IUnknown *element; + size_t i, count; - TRACE("(%p)->(%p)\n", iface, node); + TRACE("%p, %p.\n", iface, node); - while (IMFCollection_GetElement(topology->nodes, i, &element) == S_OK) + for (i = 0; i < topology->nodes.count; ++i) { - BOOL match = element == (IUnknown *)node; - - IUnknown_Release(element); - - if (match) + if (&topology->nodes.nodes[i]->IMFTopologyNode_iface == node) { - IMFCollection_RemoveElement(topology->nodes, i, &element); - IUnknown_Release(element); + count = topology->nodes.count - i - 1; + if (count) + { + memmove(&topology->nodes.nodes[i], &topology->nodes.nodes[i + 1], + count * sizeof(*topology->nodes.nodes)); + } + topology->nodes.count--; return S_OK; } - - ++i; } return E_INVALIDARG; @@ -558,38 +568,43 @@ static HRESULT WINAPI topology_RemoveNode(IMFTopology *iface, IMFTopologyNode *n static HRESULT WINAPI topology_GetNodeCount(IMFTopology *iface, WORD *count) { struct topology *topology = impl_from_IMFTopology(iface); - DWORD nodecount; - HRESULT hr; - TRACE("(%p)->(%p)\n", iface, count); + TRACE("%p, %p.\n", iface, count); - hr = IMFCollection_GetElementCount(topology->nodes, count ? &nodecount : NULL); - if (count) - *count = nodecount; + if (!count) + return E_POINTER; - return hr; + *count = topology->nodes.count; + + return S_OK; } static HRESULT WINAPI topology_GetNode(IMFTopology *iface, WORD index, IMFTopologyNode **node) { struct topology *topology = impl_from_IMFTopology(iface); - TRACE("(%p)->(%u, %p)\n", iface, index, node); + TRACE("%p, %u, %p.\n", iface, index, node); if (!node) return E_POINTER; - return SUCCEEDED(IMFCollection_GetElement(topology->nodes, index, (IUnknown **)node)) ? - S_OK : MF_E_INVALIDINDEX; + if (index >= topology->nodes.count) + return MF_E_INVALIDINDEX; + + *node = &topology->nodes.nodes[index]->IMFTopologyNode_iface; + IMFTopologyNode_AddRef(*node); + + return S_OK; } static HRESULT WINAPI topology_Clear(IMFTopology *iface) { struct topology *topology = impl_from_IMFTopology(iface); - TRACE("(%p)\n", iface); + TRACE("%p.\n", iface); - return IMFCollection_RemoveAllElements(topology->nodes); + topology_clear(topology); + return S_OK; } static HRESULT WINAPI topology_CloneFrom(IMFTopology *iface, IMFTopology *src_topology) @@ -599,36 +614,27 @@ static HRESULT WINAPI topology_CloneFrom(IMFTopology *iface, IMFTopology *src_to return E_NOTIMPL; } -static HRESULT WINAPI topology_GetNodeByID(IMFTopology *iface, TOPOID id, IMFTopologyNode **node) +static HRESULT WINAPI topology_GetNodeByID(IMFTopology *iface, TOPOID id, IMFTopologyNode **ret) { struct topology *topology = impl_from_IMFTopology(iface); - - TRACE("(%p)->(%p)\n", iface, node); - - return topology_get_node_by_id(topology, id, node); -} - -static HRESULT topology_add_node_of_type(const struct topology *topology, IMFTopologyNode *node, - MF_TOPOLOGY_TYPE filter, IMFCollection *collection) -{ - MF_TOPOLOGY_TYPE node_type; + struct topology_node *node; HRESULT hr; - if (FAILED(hr = IMFTopologyNode_GetNodeType(node, &node_type))) - return hr; + TRACE("%p, %p.\n", iface, ret); - if (node_type != filter) - return S_OK; + if (SUCCEEDED(hr = topology_get_node_by_id(topology, id, &node))) + *ret = &node->IMFTopologyNode_iface; + else + *ret = NULL; - return IMFCollection_AddElement(collection, (IUnknown *)node); + return hr; } static HRESULT topology_get_node_collection(const struct topology *topology, MF_TOPOLOGY_TYPE node_type, IMFCollection **collection) { - IMFTopologyNode *node; - unsigned int i = 0; HRESULT hr; + size_t i; if (!collection) return E_POINTER; @@ -636,15 +642,17 @@ static HRESULT topology_get_node_collection(const struct topology *topology, MF_ if (FAILED(hr = MFCreateCollection(collection))) return hr; - while (IMFCollection_GetElement(topology->nodes, i++, (IUnknown **)&node) == S_OK) + for (i = 0; i < topology->nodes.count; ++i) { - hr = topology_add_node_of_type(topology, node, node_type, *collection); - IMFTopologyNode_Release(node); - if (FAILED(hr)) + if (topology->nodes.nodes[i]->node_type == node_type) { - IMFCollection_Release(*collection); - *collection = NULL; - break; + if (FAILED(hr = IMFCollection_AddElement(*collection, + (IUnknown *)&topology->nodes.nodes[i]->IMFTopologyNode_iface))) + { + IMFCollection_Release(*collection); + *collection = NULL; + break; + } } } @@ -750,9 +758,6 @@ HRESULT WINAPI MFCreateTopology(IMFTopology **topology) object->refcount = 1; hr = MFCreateAttributes(&object->attributes, 0); - if (SUCCEEDED(hr)) - hr = MFCreateCollection(&object->nodes); - if (FAILED(hr)) { IMFTopology_Release(&object->IMFTopology_iface);
1
0
0
0
← Newer
1
...
76
77
78
79
80
81
82
...
102
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
93
94
95
96
97
98
99
100
101
102
Results per page:
10
25
50
100
200