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
July 2024
----- 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
519 discussions
Start a n
N
ew thread
Paul Gofman : ntdll: Iterate views instead of requested addresses in get_working_set_ex().
by Alexandre Julliard
01 Jul '24
01 Jul '24
Module: wine Branch: master Commit: 2befbce04da8bc198e4bc9e1e6e5e3ac03c39e80 URL:
https://gitlab.winehq.org/wine/wine/-/commit/2befbce04da8bc198e4bc9e1e6e5e3…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed Jun 19 20:38:40 2024 -0600 ntdll: Iterate views instead of requested addresses in get_working_set_ex(). --- dlls/ntdll/unix/virtual.c | 68 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 60 insertions(+), 8 deletions(-) diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index a15c252158e..1e5d9311b62 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -5135,6 +5135,12 @@ static unsigned int get_memory_region_info( HANDLE process, LPCVOID addr, MEMORY return STATUS_SUCCESS; } +struct working_set_info_ref +{ + char *addr; + SIZE_T orig_index; +}; + #if defined(HAVE_LIBPROCSTAT) struct fill_working_set_info_data { @@ -5237,13 +5243,24 @@ static void fill_working_set_info( struct fill_working_set_info_data *d, struct } #endif +static int compare_working_set_info_ref( const void *a, const void *b ) +{ + const struct working_set_info_ref *r1 = a, *r2 = b; + + if (r1->addr < r2->addr) return -1; + return r1->addr > r2->addr; +} + static NTSTATUS get_working_set_ex( HANDLE process, LPCVOID addr, MEMORY_WORKING_SET_EX_INFORMATION *info, SIZE_T len, SIZE_T *res_len ) { + struct working_set_info_ref ref_buffer[256], *ref = ref_buffer, *r; struct fill_working_set_info_data data; - MEMORY_WORKING_SET_EX_INFORMATION *p; - struct file_view *view; + char *start, *end; + SIZE_T i, count; + size_t size; + struct file_view *view, *prev_view; sigset_t sigset; BYTE vprot; @@ -5255,17 +5272,52 @@ static NTSTATUS get_working_set_ex( HANDLE process, LPCVOID addr, if (len < sizeof(*info)) return STATUS_INFO_LENGTH_MISMATCH; + count = len / sizeof(*info); + + if (count > ARRAY_SIZE(ref_buffer)) ref = malloc( count * sizeof(*ref) ); + for (i = 0; i < count; ++i) + { + ref[i].orig_index = i; + ref[i].addr = ROUND_ADDR( info[i].VirtualAddress, page_mask ); + info[i].VirtualAttributes.Flags = 0; + } + qsort( ref, count, sizeof(*ref), compare_working_set_info_ref ); + start = ref[0].addr; + end = ref[count - 1].addr + page_size; + server_enter_uninterrupted_section( &virtual_mutex, &sigset ); init_fill_working_set_info_data( &data ); - for (p = info; (UINT_PTR)(p + 1) <= (UINT_PTR)info + len; p++) + + view = find_view_range( start, end - start ); + while (view && (char *)view->base > start) { - memset( &p->VirtualAttributes, 0, sizeof(p->VirtualAttributes) ); - if ((view = find_view( p->VirtualAddress, 0 )) - && get_committed_size( view, p->VirtualAddress, &vprot, VPROT_COMMITTED ) - && (vprot & VPROT_COMMITTED)) - fill_working_set_info( &data, view, vprot, p ); + prev_view = RB_ENTRY_VALUE( rb_prev( &view->entry ), struct file_view, entry ); + if (!prev_view || (char *)prev_view->base + prev_view->size <= start) break; + view = prev_view; } + + r = ref; + while (view && (char *)view->base < end) + { + if (start < (char *)view->base) start = view->base; + while (r != ref + count && r->addr < start) ++r; + while (start != (char *)view->base + view->size && r != ref + count + && r->addr < (char *)view->base + view->size) + { + size = get_committed_size( view, start, &vprot, ~VPROT_WRITEWATCH ); + while (r != ref + count && r->addr < start + size) + { + if (vprot & VPROT_COMMITTED) fill_working_set_info( &data, view, vprot, &info[r->orig_index] ); + ++r; + } + start += size; + } + if (r == ref + count) break; + view = RB_ENTRY_VALUE( rb_next( &view->entry ), struct file_view, entry ); + } + free_fill_working_set_info_data( &data ); + if (ref != ref_buffer) free( ref ); server_leave_uninterrupted_section( &virtual_mutex, &sigset ); if (res_len)
1
0
0
0
Paul Gofman : ntdll: Factor OS-specific parts out of get_working_set_ex().
by Alexandre Julliard
01 Jul '24
01 Jul '24
Module: wine Branch: master Commit: f56944502d34afe87ff0caef15f05a5fbc5a3613 URL:
https://gitlab.winehq.org/wine/wine/-/commit/f56944502d34afe87ff0caef15f05a…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed Jun 19 18:49:12 2024 -0600 ntdll: Factor OS-specific parts out of get_working_set_ex(). --- dlls/ntdll/unix/virtual.c | 202 +++++++++++++++++++++++++--------------------- 1 file changed, 111 insertions(+), 91 deletions(-) diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index 254d4b4a351..a15c252158e 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -5135,15 +5135,117 @@ static unsigned int get_memory_region_info( HANDLE process, LPCVOID addr, MEMORY return STATUS_SUCCESS; } +#if defined(HAVE_LIBPROCSTAT) +struct fill_working_set_info_data +{ + struct procstat *pstat; + struct kinfo_proc *kip; + unsigned int vmentry_count; + struct kinfo_vmentry *vmentries; +}; + +static void init_fill_working_set_info_data( struct fill_working_set_info_data *d ) +{ + unsigned int proc_count; + + d->kip = NULL; + d->vmentry_count = 0; + d->vmentries = NULL; + + if ((d->pstat = procstat_open_sysctl())) + d->kip = procstat_getprocs( d->pstat, KERN_PROC_PID, getpid(), &proc_count ); + if (d->kip) + d->vmentries = procstat_getvmmap( d->pstat, d->kip, &d->vmentry_count ); + if (!d->vmentries) + WARN( "couldn't get process vmmap, errno %d\n", errno ); +} + +static void free_fill_working_set_info_data( struct fill_working_set_info_data *d ) +{ + if (d->vmentries) + procstat_freevmmap( d->pstat, d->vmentries ); + if (d->kip) + procstat_freeprocs( d->pstat, d->kip ); + if (d->pstat) + procstat_close( d->pstat ); +} + +static void fill_working_set_info( struct fill_working_set_info_data *d, struct file_view *view, BYTE vprot, + MEMORY_WORKING_SET_EX_INFORMATION *p ) +{ + struct kinfo_vmentry *entry = NULL; + int i; + + for (i = 0; i < d->vmentry_count; i++) + { + if (d->vmentries[i].kve_start <= (ULONG_PTR)p->VirtualAddress && (ULONG_PTR)p->VirtualAddress <= d->vmentries[i].kve_end) + { + entry = &d->vmentries[i]; + break; + } + } + + p->VirtualAttributes.Valid = !(vprot & VPROT_GUARD) && (vprot & 0x0f) && entry && entry->kve_type != KVME_TYPE_SWAP; + p->VirtualAttributes.Shared = !is_view_valloc( view ); + if (p->VirtualAttributes.Shared && p->VirtualAttributes.Valid) + p->VirtualAttributes.ShareCount = 1; /* FIXME */ + if (p->VirtualAttributes.Valid) + p->VirtualAttributes.Win32Protection = get_win32_prot( vprot, view->protect ); +} +#else +static int pagemap_fd = -2; + +struct fill_working_set_info_data +{ +}; + +static void init_fill_working_set_info_data( struct fill_working_set_info_data *d ) +{ + if (pagemap_fd != -2) return; + +#ifdef O_CLOEXEC + if ((pagemap_fd = open( "/proc/self/pagemap", O_RDONLY | O_CLOEXEC, 0 )) == -1 && errno == EINVAL) +#endif + pagemap_fd = open( "/proc/self/pagemap", O_RDONLY, 0 ); + + if (pagemap_fd == -1) WARN( "unable to open /proc/self/pagemap\n" ); + else fcntl(pagemap_fd, F_SETFD, FD_CLOEXEC); /* in case O_CLOEXEC isn't supported */ +} + +static void free_fill_working_set_info_data( struct fill_working_set_info_data *d ) +{ +} + +static void fill_working_set_info( struct fill_working_set_info_data *d, struct file_view *view, BYTE vprot, + MEMORY_WORKING_SET_EX_INFORMATION *p ) +{ + UINT64 pagemap; + + if (pagemap_fd == -1 || + pread( pagemap_fd, &pagemap, sizeof(pagemap), ((UINT_PTR)p->VirtualAddress >> page_shift) * sizeof(pagemap) ) != sizeof(pagemap)) + { + /* If we don't have pagemap information, default to invalid. */ + pagemap = 0; + } + + p->VirtualAttributes.Valid = !(vprot & VPROT_GUARD) && (vprot & 0x0f) && (pagemap >> 63); + p->VirtualAttributes.Shared = !is_view_valloc( view ) && ((pagemap >> 61) & 1); + if (p->VirtualAttributes.Shared && p->VirtualAttributes.Valid) + p->VirtualAttributes.ShareCount = 1; /* FIXME */ + if (p->VirtualAttributes.Valid) + p->VirtualAttributes.Win32Protection = get_win32_prot( vprot, view->protect ); +} +#endif + static NTSTATUS get_working_set_ex( HANDLE process, LPCVOID addr, MEMORY_WORKING_SET_EX_INFORMATION *info, SIZE_T len, SIZE_T *res_len ) { -#if !defined(HAVE_LIBPROCSTAT) - static int pagemap_fd = -2; -#endif + struct fill_working_set_info_data data; MEMORY_WORKING_SET_EX_INFORMATION *p; + struct file_view *view; sigset_t sigset; + BYTE vprot; if (process != NtCurrentProcess()) { @@ -5153,100 +5255,18 @@ static NTSTATUS get_working_set_ex( HANDLE process, LPCVOID addr, if (len < sizeof(*info)) return STATUS_INFO_LENGTH_MISMATCH; -#if defined(HAVE_LIBPROCSTAT) - { - struct procstat *pstat; - unsigned int proc_count; - struct kinfo_proc *kip = NULL; - unsigned int vmentry_count = 0; - struct kinfo_vmentry *vmentries = NULL; - - pstat = procstat_open_sysctl(); - if (pstat) - kip = procstat_getprocs( pstat, KERN_PROC_PID, getpid(), &proc_count ); - if (kip) - vmentries = procstat_getvmmap( pstat, kip, &vmentry_count ); - if (vmentries == NULL) - WARN( "couldn't get process vmmap, errno %d\n", errno ); - - server_enter_uninterrupted_section( &virtual_mutex, &sigset ); - for (p = info; (UINT_PTR)(p + 1) <= (UINT_PTR)info + len; p++) - { - int i; - struct kinfo_vmentry *entry = NULL; - BYTE vprot; - struct file_view *view; - - memset( &p->VirtualAttributes, 0, sizeof(p->VirtualAttributes) ); - if ((view = find_view( p->VirtualAddress, 0 )) && - get_committed_size( view, p->VirtualAddress, &vprot, VPROT_COMMITTED ) && - (vprot & VPROT_COMMITTED)) - { - for (i = 0; i < vmentry_count && entry == NULL; i++) - { - if (vmentries[i].kve_start <= (ULONG_PTR)p->VirtualAddress && (ULONG_PTR)p->VirtualAddress <= vmentries[i].kve_end) - entry = &vmentries[i]; - } - - p->VirtualAttributes.Valid = !(vprot & VPROT_GUARD) && (vprot & 0x0f) && entry && entry->kve_type != KVME_TYPE_SWAP; - p->VirtualAttributes.Shared = !is_view_valloc( view ); - if (p->VirtualAttributes.Shared && p->VirtualAttributes.Valid) - p->VirtualAttributes.ShareCount = 1; /* FIXME */ - if (p->VirtualAttributes.Valid) - p->VirtualAttributes.Win32Protection = get_win32_prot( vprot, view->protect ); - } - } - server_leave_uninterrupted_section( &virtual_mutex, &sigset ); - - if (vmentries) - procstat_freevmmap( pstat, vmentries ); - if (kip) - procstat_freeprocs( pstat, kip ); - if (pstat) - procstat_close( pstat ); - } -#else server_enter_uninterrupted_section( &virtual_mutex, &sigset ); - if (pagemap_fd == -2) - { -#ifdef O_CLOEXEC - if ((pagemap_fd = open( "/proc/self/pagemap", O_RDONLY | O_CLOEXEC, 0 )) == -1 && errno == EINVAL) -#endif - pagemap_fd = open( "/proc/self/pagemap", O_RDONLY, 0 ); - - if (pagemap_fd == -1) WARN( "unable to open /proc/self/pagemap\n" ); - else fcntl(pagemap_fd, F_SETFD, FD_CLOEXEC); /* in case O_CLOEXEC isn't supported */ - } - + init_fill_working_set_info_data( &data ); for (p = info; (UINT_PTR)(p + 1) <= (UINT_PTR)info + len; p++) { - BYTE vprot; - UINT64 pagemap; - struct file_view *view; - memset( &p->VirtualAttributes, 0, sizeof(p->VirtualAttributes) ); - - if ((view = find_view( p->VirtualAddress, 0 )) && - get_committed_size( view, p->VirtualAddress, &vprot, VPROT_COMMITTED ) && - (vprot & VPROT_COMMITTED)) - { - if (pagemap_fd == -1 || - pread( pagemap_fd, &pagemap, sizeof(pagemap), ((UINT_PTR)p->VirtualAddress >> page_shift) * sizeof(pagemap) ) != sizeof(pagemap)) - { - /* If we don't have pagemap information, default to invalid. */ - pagemap = 0; - } - - p->VirtualAttributes.Valid = !(vprot & VPROT_GUARD) && (vprot & 0x0f) && (pagemap >> 63); - p->VirtualAttributes.Shared = !is_view_valloc( view ) && ((pagemap >> 61) & 1); - if (p->VirtualAttributes.Shared && p->VirtualAttributes.Valid) - p->VirtualAttributes.ShareCount = 1; /* FIXME */ - if (p->VirtualAttributes.Valid) - p->VirtualAttributes.Win32Protection = get_win32_prot( vprot, view->protect ); - } + if ((view = find_view( p->VirtualAddress, 0 )) + && get_committed_size( view, p->VirtualAddress, &vprot, VPROT_COMMITTED ) + && (vprot & VPROT_COMMITTED)) + fill_working_set_info( &data, view, vprot, p ); } + free_fill_working_set_info_data( &data ); server_leave_uninterrupted_section( &virtual_mutex, &sigset ); -#endif if (res_len) *res_len = len;
1
0
0
0
Paul Gofman : ntdll: Validate length in get_working_set_ex().
by Alexandre Julliard
01 Jul '24
01 Jul '24
Module: wine Branch: master Commit: 81caa1d72b8cd93219a9303ad04237672f57d988 URL:
https://gitlab.winehq.org/wine/wine/-/commit/81caa1d72b8cd93219a9303ad04237…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri Jun 21 16:42:44 2024 -0600 ntdll: Validate length in get_working_set_ex(). --- dlls/ntdll/unix/virtual.c | 4 +++- dlls/psapi/tests/psapi_main.c | 21 +++++++++++++++++++++ dlls/wow64/virtual.c | 4 +++- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index 0c38c57f653..254d4b4a351 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -5151,6 +5151,8 @@ static NTSTATUS get_working_set_ex( HANDLE process, LPCVOID addr, return STATUS_INVALID_INFO_CLASS; } + if (len < sizeof(*info)) return STATUS_INFO_LENGTH_MISMATCH; + #if defined(HAVE_LIBPROCSTAT) { struct procstat *pstat; @@ -5247,7 +5249,7 @@ static NTSTATUS get_working_set_ex( HANDLE process, LPCVOID addr, #endif if (res_len) - *res_len = (UINT_PTR)p - (UINT_PTR)info; + *res_len = len; return STATUS_SUCCESS; } diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c index 515364f156d..92529447afa 100644 --- a/dlls/psapi/tests/psapi_main.c +++ b/dlls/psapi/tests/psapi_main.c @@ -1194,6 +1194,8 @@ static void test_QueryWorkingSetEx(void) { PSAPI_WORKING_SET_EX_INFORMATION info[4]; char *addr, *addr2; + NTSTATUS status; + SIZE_T size; DWORD prot; BOOL ret; @@ -1203,6 +1205,25 @@ static void test_QueryWorkingSetEx(void) return; } + size = 0xdeadbeef; + memset(info, 0, sizeof(info)); + status = pNtQueryVirtualMemory(GetCurrentProcess(), NULL, MemoryWorkingSetExInformation, info, 0, &size); + ok(status == STATUS_INFO_LENGTH_MISMATCH, "got %#lx.\n", status); + ok(size == 0xdeadbeef, "got %Iu.\n", size); + + memset(&info, 0, sizeof(info)); + ret = pQueryWorkingSetEx(GetCurrentProcess(), info, 0); + ok(!ret && GetLastError() == ERROR_BAD_LENGTH, "got ret %d, err %lu.\n", ret, GetLastError()); + + size = 0xdeadbeef; + memset(info, 0, sizeof(info)); + status = pNtQueryVirtualMemory(GetCurrentProcess(), NULL, MemoryWorkingSetExInformation, info, + sizeof(*info) + sizeof(*info) / 2, &size); + ok(!status, "got %#lx.\n", status); + ok(!info->VirtualAttributes.Valid, "got %d.\n", info->VirtualAttributes.Valid); + ok(size == sizeof(*info) /* wow64 */ || size == sizeof(*info) + sizeof(*info) / 2 /* win64 */, + "got %Iu, sizeof(info) %Iu.\n", size, sizeof(info)); + addr = (void *)GetModuleHandleA(NULL); check_QueryWorkingSetEx(addr, "exe", 1, PAGE_READONLY, 1, FALSE); diff --git a/dlls/wow64/virtual.c b/dlls/wow64/virtual.c index 412c79abb14..7ccdd0dc65c 100644 --- a/dlls/wow64/virtual.c +++ b/dlls/wow64/virtual.c @@ -622,6 +622,8 @@ NTSTATUS WINAPI wow64_NtQueryVirtualMemory( UINT *args ) MEMORY_WORKING_SET_EX_INFORMATION *info; ULONG i, count = len / sizeof(*info32); + if (len < sizeof(*info32)) return STATUS_INFO_LENGTH_MISMATCH; + info = Wow64AllocateTemp( count * sizeof(*info) ); for (i = 0; i < count; i++) info[i].VirtualAddress = ULongToPtr( info32[i].VirtualAddress ); if (!(status = NtQueryVirtualMemory( handle, addr, class, info, count * sizeof(*info), &res_len ))) @@ -633,7 +635,7 @@ NTSTATUS WINAPI wow64_NtQueryVirtualMemory( UINT *args ) break; } - case MemoryImageInformation: /* MEMORY_IMAEG_INFORMATION */ + case MemoryImageInformation: /* MEMORY_IMAGE_INFORMATION */ { if (len < sizeof(MEMORY_IMAGE_INFORMATION32)) return STATUS_INFO_LENGTH_MISMATCH;
1
0
0
0
Paul Gofman : psapi/tests: Add tests for QueryWorkingSetEx() with multiple addresses.
by Alexandre Julliard
01 Jul '24
01 Jul '24
Module: wine Branch: master Commit: 820768df0ce9a02dda907ccc055cd909b5fa0269 URL:
https://gitlab.winehq.org/wine/wine/-/commit/820768df0ce9a02dda907ccc055cd9…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri Jun 21 17:14:21 2024 -0600 psapi/tests: Add tests for QueryWorkingSetEx() with multiple addresses. --- dlls/psapi/tests/psapi_main.c | 85 +++++++++++++++++++++++++++++++------------ 1 file changed, 61 insertions(+), 24 deletions(-) diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c index e7e5e5f04e6..515364f156d 100644 --- a/dlls/psapi/tests/psapi_main.c +++ b/dlls/psapi/tests/psapi_main.c @@ -1150,6 +1150,32 @@ free_page: VirtualFree(addr, 0, MEM_RELEASE); } +static void check_working_set_info(PSAPI_WORKING_SET_EX_INFORMATION *info, const char *desc, DWORD expected_valid, + DWORD expected_protection, DWORD expected_shared, BOOL todo) +{ + todo_wine_if(todo) + ok(info->VirtualAttributes.Valid == expected_valid, "%s expected Valid=%lu but got %u\n", + desc, expected_valid, info->VirtualAttributes.Valid); + + todo_wine_if(todo) + ok(info->VirtualAttributes.Win32Protection == expected_protection, "%s expected Win32Protection=%lu but got %u\n", + desc, expected_protection, info->VirtualAttributes.Win32Protection); + + ok(info->VirtualAttributes.Node == 0, "%s expected Node=0 but got %u\n", + desc, info->VirtualAttributes.Node); + ok(info->VirtualAttributes.LargePage == 0, "%s expected LargePage=0 but got %u\n", + desc, info->VirtualAttributes.LargePage); + + ok(info->VirtualAttributes.Shared == expected_shared || broken(!info->VirtualAttributes.Valid) /* w2003 */, + "%s expected Shared=%lu but got %u\n", desc, expected_shared, info->VirtualAttributes.Shared); + if (info->VirtualAttributes.Valid && info->VirtualAttributes.Shared) + ok(info->VirtualAttributes.ShareCount > 0, "%s expected ShareCount > 0 but got %u\n", + desc, info->VirtualAttributes.ShareCount); + else + ok(info->VirtualAttributes.ShareCount == 0, "%s expected ShareCount == 0 but got %u\n", + desc, info->VirtualAttributes.ShareCount); +} + static void check_QueryWorkingSetEx(PVOID addr, const char *desc, DWORD expected_valid, DWORD expected_protection, DWORD expected_shared, BOOL todo) { @@ -1161,32 +1187,13 @@ static void check_QueryWorkingSetEx(PVOID addr, const char *desc, DWORD expected ret = pQueryWorkingSetEx(GetCurrentProcess(), &info, sizeof(info)); ok(ret, "QueryWorkingSetEx failed with %ld\n", GetLastError()); - todo_wine_if(todo) - ok(info.VirtualAttributes.Valid == expected_valid, "%s expected Valid=%lu but got %u\n", - desc, expected_valid, info.VirtualAttributes.Valid); - - todo_wine_if(todo) - ok(info.VirtualAttributes.Win32Protection == expected_protection, "%s expected Win32Protection=%lu but got %u\n", - desc, expected_protection, info.VirtualAttributes.Win32Protection); - - ok(info.VirtualAttributes.Node == 0, "%s expected Node=0 but got %u\n", - desc, info.VirtualAttributes.Node); - ok(info.VirtualAttributes.LargePage == 0, "%s expected LargePage=0 but got %u\n", - desc, info.VirtualAttributes.LargePage); - - ok(info.VirtualAttributes.Shared == expected_shared || broken(!info.VirtualAttributes.Valid) /* w2003 */, - "%s expected Shared=%lu but got %u\n", desc, expected_shared, info.VirtualAttributes.Shared); - if (info.VirtualAttributes.Valid && info.VirtualAttributes.Shared) - ok(info.VirtualAttributes.ShareCount > 0, "%s expected ShareCount > 0 but got %u\n", - desc, info.VirtualAttributes.ShareCount); - else - ok(info.VirtualAttributes.ShareCount == 0, "%s expected ShareCount == 0 but got %u\n", - desc, info.VirtualAttributes.ShareCount); + check_working_set_info(&info, desc, expected_valid, expected_protection, expected_shared, todo); } static void test_QueryWorkingSetEx(void) { - PVOID addr; + PSAPI_WORKING_SET_EX_INFORMATION info[4]; + char *addr, *addr2; DWORD prot; BOOL ret; @@ -1196,7 +1203,7 @@ static void test_QueryWorkingSetEx(void) return; } - addr = GetModuleHandleA(NULL); + addr = (void *)GetModuleHandleA(NULL); check_QueryWorkingSetEx(addr, "exe", 1, PAGE_READONLY, 1, FALSE); ret = VirtualProtect(addr, 0x1000, PAGE_NOACCESS, &prot); @@ -1211,7 +1218,7 @@ static void test_QueryWorkingSetEx(void) ok(ret, "VirtualProtect failed with %ld\n", GetLastError()); check_QueryWorkingSetEx(addr, "exe,readonly2", 1, PAGE_READONLY, 1, FALSE); - addr = VirtualAlloc(NULL, 0x1000, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); + addr = VirtualAlloc(NULL, 0x2000, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); ok(addr != NULL, "VirtualAlloc failed with %ld\n", GetLastError()); check_QueryWorkingSetEx(addr, "valloc", 0, 0, 0, FALSE); @@ -1232,9 +1239,39 @@ static void test_QueryWorkingSetEx(void) *(volatile char *)addr; check_QueryWorkingSetEx(addr, "valloc,readwrite2", 1, PAGE_READWRITE, 0, FALSE); + addr2 = VirtualAlloc(NULL, 0x2000, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); + ok(!!addr2, "VirtualAlloc failed with %ld\n", GetLastError()); + *(addr2 + 0x1000) = 1; + + info[1].VirtualAddress = addr; + info[0].VirtualAddress = addr + 0x1000; + info[3].VirtualAddress = addr2; + info[2].VirtualAddress = addr2 + 0x1000; + ret = pQueryWorkingSetEx(GetCurrentProcess(), info, sizeof(info)); + ok(ret, "got error %lu\n", GetLastError()); + check_working_set_info(&info[1], "[1] range[1] valid", 1, PAGE_READWRITE, 0, FALSE); + check_working_set_info(&info[0], "[1] range[0] invalid", 0, 0, 0, FALSE); + check_working_set_info(&info[3], "[1] range[3] invalid", 0, 0, 0, FALSE); + check_working_set_info(&info[2], "[1] range[2] valid", 1, PAGE_READWRITE, 0, FALSE); + ret = VirtualFree(addr, 0, MEM_RELEASE); ok(ret, "VirtualFree failed with %ld\n", GetLastError()); check_QueryWorkingSetEx(addr, "valloc,free", FALSE, 0, 0, FALSE); + + ret = pQueryWorkingSetEx(GetCurrentProcess(), info, sizeof(info)); + ok(ret, "got error %lu\n", GetLastError()); + check_working_set_info(&info[1], "[2] range[1] invalid", 0, 0, 0, FALSE); + check_working_set_info(&info[0], "[2] range[0] invalid", 0, 0, 0, FALSE); + check_working_set_info(&info[3], "[2] range[3] invalid", 0, 0, 0, FALSE); + check_working_set_info(&info[2], "[2] range[2] valid", 1, PAGE_READWRITE, 0, FALSE); + + VirtualFree(addr2, 0, MEM_RELEASE); + ret = pQueryWorkingSetEx(GetCurrentProcess(), info, sizeof(info)); + ok(ret, "got error %lu\n", GetLastError()); + check_working_set_info(&info[1], "[3] range[1] invalid", 0, 0, 0, FALSE); + check_working_set_info(&info[0], "[3] range[0] invalid", 0, 0, 0, FALSE); + check_working_set_info(&info[3], "[3] range[3] invalid", 0, 0, 0, FALSE); + check_working_set_info(&info[2], "[3] range[2] invalid", 0, 0, 0, FALSE); } START_TEST(psapi_main)
1
0
0
0
Paul Gofman : ntdll: Report the space completely outside of reserved areas as allocated on i386.
by Alexandre Julliard
01 Jul '24
01 Jul '24
Module: wine Branch: master Commit: 233f6f288c8a6aa5aae127660ab00f392fe2cf67 URL:
https://gitlab.winehq.org/wine/wine/-/commit/233f6f288c8a6aa5aae127660ab00f…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri Jun 28 11:16:59 2024 -0600 ntdll: Report the space completely outside of reserved areas as allocated on i386. --- dlls/ntdll/unix/virtual.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index 3981905bcd3..0c38c57f653 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -4998,6 +4998,7 @@ static unsigned int fill_basic_memory_info( const void *addr, MEMORY_BASIC_INFOR * so that the app doesn't believe it's fully available */ { struct reserved_area *area; + BOOL in_reserved = FALSE; LIST_FOR_EACH_ENTRY( area, &reserved_areas, struct reserved_area, entry ) { @@ -5012,6 +5013,7 @@ static unsigned int fill_basic_memory_info( const void *addr, MEMORY_BASIC_INFOR if (area_start <= base || area_start <= (char *)address_space_start) { if (area_end < alloc_end) info->RegionSize = area_end - base; + in_reserved = TRUE; break; } /* report the remaining part of the 64K after the view as free */ @@ -5022,18 +5024,22 @@ static unsigned int fill_basic_memory_info( const void *addr, MEMORY_BASIC_INFOR if (base < next) { info->RegionSize = min( next, alloc_end ) - base; + in_reserved = TRUE; break; } else alloc_base = base; } /* pretend it's allocated */ if (area_start < alloc_end) info->RegionSize = area_start - base; + break; + } + if (!in_reserved) + { info->State = MEM_RESERVE; info->Protect = PAGE_NOACCESS; info->AllocationBase = alloc_base; info->AllocationProtect = PAGE_NOACCESS; info->Type = MEM_PRIVATE; - break; } } #endif
1
0
0
0
Fabian Maurer : cmd: Close file opened with popen with correct function (coverity).
by Alexandre Julliard
01 Jul '24
01 Jul '24
Module: wine Branch: master Commit: 9db570c6c398216647f4375be1f1ecc6c52777f1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/9db570c6c398216647f4375be1f1ec…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Sun Jun 30 21:22:08 2024 +0200 cmd: Close file opened with popen with correct function (coverity). --- programs/cmd/wcmdmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 17702f4f277..46ec53587e7 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -3470,7 +3470,7 @@ static RETURN_CODE for_control_execute_fileset(CMD_FOR_CONTROL *for_ctrl, CMD_NO return errorlevel = ERROR_INVALID_FUNCTION; /* FOR loop aborts at first failure here */ } return_code = for_control_execute_from_FILE(for_ctrl, input, node); - fclose(input); + pclose(input); } else {
1
0
0
0
Ziqing Hui : winegstreamer/video_encoder: Implement GetInputCurrentType.
by Alexandre Julliard
01 Jul '24
01 Jul '24
Module: wine Branch: master Commit: adce0d34f5c27b4778622718f0f6e71c9e04fabe URL:
https://gitlab.winehq.org/wine/wine/-/commit/adce0d34f5c27b4778622718f0f6e7…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Fri Jun 28 14:19:20 2024 +0800 winegstreamer/video_encoder: Implement GetInputCurrentType. --- dlls/winegstreamer/video_encoder.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/winegstreamer/video_encoder.c b/dlls/winegstreamer/video_encoder.c index a78cbfffdc5..cfdd5be9d50 100644 --- a/dlls/winegstreamer/video_encoder.c +++ b/dlls/winegstreamer/video_encoder.c @@ -349,8 +349,19 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF static HRESULT WINAPI transform_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type) { - FIXME("iface %p, id %#lx, type %p\n", iface, id, type); - return E_NOTIMPL; + struct video_encoder *encoder = impl_from_IMFTransform(iface); + HRESULT hr; + + TRACE("iface %p, id %#lx, type %p\n", iface, id, type); + + if (!encoder->input_type) + return MF_E_TRANSFORM_TYPE_NOT_SET; + + if (FAILED(hr = MFCreateMediaType(type))) + return hr; + + return IMFMediaType_CopyAllItems(encoder->input_type, (IMFAttributes *)*type); + } static HRESULT WINAPI transform_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
1
0
0
0
Ziqing Hui : winegstreamer/video_encoder: Implement SetInputType.
by Alexandre Julliard
01 Jul '24
01 Jul '24
Module: wine Branch: master Commit: 6f22111a9f630dd823cbb1bc9700f63f87b24419 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6f22111a9f630dd823cbb1bc9700f6…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Fri Jun 28 14:14:30 2024 +0800 winegstreamer/video_encoder: Implement SetInputType. --- dlls/winegstreamer/video_encoder.c | 56 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/dlls/winegstreamer/video_encoder.c b/dlls/winegstreamer/video_encoder.c index b374b919f92..a78cbfffdc5 100644 --- a/dlls/winegstreamer/video_encoder.c +++ b/dlls/winegstreamer/video_encoder.c @@ -43,6 +43,7 @@ struct video_encoder const GUID *const *output_types; UINT output_type_count; + IMFMediaType *input_type; IMFMediaType *output_type; IMFAttributes *attributes; @@ -91,6 +92,8 @@ static ULONG WINAPI transform_Release(IMFTransform *iface) if (!refcount) { + if (encoder->input_type) + IMFMediaType_Release(encoder->input_type); if (encoder->output_type) IMFMediaType_Release(encoder->output_type); IMFAttributes_Release(encoder->attributes); @@ -238,8 +241,52 @@ static HRESULT WINAPI transform_GetOutputAvailableType(IMFTransform *iface, DWOR static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) { - FIXME("iface %p, id %#lx, type %p, flags %#lx.\n", iface, id, type, flags); - return E_NOTIMPL; + struct video_encoder *encoder = impl_from_IMFTransform(iface); + GUID major, subtype; + UINT64 ratio; + ULONG i; + + TRACE("iface %p, id %#lx, type %p, flags %#lx.\n", iface, id, type, flags); + + if (!type) + { + if (encoder->input_type) + { + IMFMediaType_Release(encoder->input_type); + encoder->input_type = NULL; + } + + return S_OK; + } + + if (!encoder->output_type) + return MF_E_TRANSFORM_TYPE_NOT_SET; + + if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major)) || + FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype))) + return E_INVALIDARG; + + if (!IsEqualGUID(&major, &MFMediaType_Video)) + return MF_E_INVALIDMEDIATYPE; + + for (i = 0; i < encoder->input_type_count; ++i) + if (IsEqualGUID(&subtype, encoder->input_types[i])) + break; + if (i == encoder->input_type_count) + return MF_E_INVALIDMEDIATYPE; + + if (FAILED(IMFMediaType_GetUINT64(type, &MF_MT_FRAME_SIZE, &ratio)) + || FAILED(IMFMediaType_GetUINT64(type, &MF_MT_FRAME_RATE, &ratio))) + return MF_E_INVALIDMEDIATYPE; + + if (flags & MFT_SET_TYPE_TEST_ONLY) + return S_OK; + + if (encoder->input_type) + IMFMediaType_Release(encoder->input_type); + IMFMediaType_AddRef((encoder->input_type = type)); + + return S_OK; } static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) @@ -254,6 +301,11 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF if (!type) { + if (encoder->input_type) + { + IMFMediaType_Release(encoder->input_type); + encoder->input_type = NULL; + } if (encoder->output_type) { IMFMediaType_Release(encoder->output_type);
1
0
0
0
Ziqing Hui : winegstreamer/video_encoder: Implement GetInputAvailableType.
by Alexandre Julliard
01 Jul '24
01 Jul '24
Module: wine Branch: master Commit: 758af39175c06b864f22d96c49259053a456c010 URL:
https://gitlab.winehq.org/wine/wine/-/commit/758af39175c06b864f22d96c492590…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Fri Jun 28 14:05:04 2024 +0800 winegstreamer/video_encoder: Implement GetInputAvailableType. --- dlls/winegstreamer/video_encoder.c | 67 ++++++++++++++++++++++++++++++++++---- 1 file changed, 61 insertions(+), 6 deletions(-) diff --git a/dlls/winegstreamer/video_encoder.c b/dlls/winegstreamer/video_encoder.c index 0c54bc543a2..b374b919f92 100644 --- a/dlls/winegstreamer/video_encoder.c +++ b/dlls/winegstreamer/video_encoder.c @@ -38,6 +38,8 @@ struct video_encoder IMFTransform IMFTransform_iface; LONG refcount; + const GUID *const *input_types; + UINT input_type_count; const GUID *const *output_types; UINT output_type_count; @@ -174,8 +176,51 @@ static HRESULT WINAPI transform_AddInputStreams(IMFTransform *iface, DWORD strea static HRESULT WINAPI transform_GetInputAvailableType(IMFTransform *iface, DWORD id, DWORD index, IMFMediaType **type) { - FIXME("iface %p, id %#lx, index %#lx, type %p.\n", iface, id, index, type); - return E_NOTIMPL; + struct video_encoder *encoder = impl_from_IMFTransform(iface); + IMFVideoMediaType *input_type; + UINT64 ratio; + UINT32 value; + HRESULT hr; + + TRACE("iface %p, id %#lx, index %#lx, type %p.\n", iface, id, index, type); + + *type = NULL; + + if (!encoder->output_type) + return MF_E_TRANSFORM_TYPE_NOT_SET; + if (index >= encoder->input_type_count) + return MF_E_NO_MORE_TYPES; + + if (!(hr = MFCreateVideoMediaTypeFromSubtype(encoder->input_types[index], &input_type))) + return hr; + + if (FAILED(hr = IMFMediaType_GetUINT64(encoder->output_type, &MF_MT_FRAME_SIZE, &ratio)) + || FAILED(hr = IMFVideoMediaType_SetUINT64(input_type, &MF_MT_FRAME_SIZE, ratio))) + goto done; + + if (FAILED(hr = IMFMediaType_GetUINT64(encoder->output_type, &MF_MT_FRAME_RATE, &ratio)) + || FAILED(hr = IMFVideoMediaType_SetUINT64(input_type, &MF_MT_FRAME_RATE, ratio))) + goto done; + + if (FAILED(hr = IMFMediaType_GetUINT32(encoder->output_type, &MF_MT_INTERLACE_MODE, &value)) + || FAILED(hr = IMFVideoMediaType_SetUINT32(input_type, &MF_MT_INTERLACE_MODE, value))) + goto done; + + if (FAILED(IMFMediaType_GetUINT32(encoder->output_type, &MF_MT_VIDEO_NOMINAL_RANGE, &value))) + value = MFNominalRange_Wide; + if (FAILED(hr = IMFVideoMediaType_SetUINT32(input_type, &MF_MT_VIDEO_NOMINAL_RANGE, value))) + goto done; + + if (FAILED(IMFMediaType_GetUINT64(encoder->output_type, &MF_MT_PIXEL_ASPECT_RATIO, &ratio))) + ratio = (UINT64)1 << 32 | 1; + if (FAILED(hr = IMFVideoMediaType_SetUINT64(input_type, &MF_MT_PIXEL_ASPECT_RATIO, ratio))) + goto done; + + IMFMediaType_AddRef((*type = (IMFMediaType *)input_type)); + +done: + IMFVideoMediaType_Release(input_type); + return hr; } static HRESULT WINAPI transform_GetOutputAvailableType(IMFTransform *iface, DWORD id, @@ -345,8 +390,8 @@ static const IMFTransformVtbl transform_vtbl = transform_ProcessOutput, }; -static HRESULT video_encoder_create(const GUID *const *output_types, UINT output_type_count, - struct video_encoder **out) +static HRESULT video_encoder_create(const GUID *const *input_types, UINT input_type_count, + const GUID *const *output_types, UINT output_type_count, struct video_encoder **out) { struct video_encoder *encoder; HRESULT hr; @@ -357,6 +402,8 @@ static HRESULT video_encoder_create(const GUID *const *output_types, UINT output encoder->IMFTransform_iface.lpVtbl = &transform_vtbl; encoder->refcount = 1; + encoder->input_types = input_types; + encoder->input_type_count = input_type_count; encoder->output_types = output_types; encoder->output_type_count = output_type_count; @@ -376,6 +423,14 @@ failed: return hr; } +static const GUID *const h264_encoder_input_types[] = +{ + &MFVideoFormat_IYUV, + &MFVideoFormat_YV12, + &MFVideoFormat_NV12, + &MFVideoFormat_YUY2, +}; + static const GUID *const h264_encoder_output_types[] = { &MFVideoFormat_H264, @@ -406,8 +461,8 @@ HRESULT h264_encoder_create(REFIID riid, void **out) return hr; } - if (FAILED(hr = video_encoder_create(h264_encoder_output_types, ARRAY_SIZE(h264_encoder_output_types), - &encoder))) + if (FAILED(hr = video_encoder_create(h264_encoder_input_types, ARRAY_SIZE(h264_encoder_input_types), + h264_encoder_output_types, ARRAY_SIZE(h264_encoder_output_types), &encoder))) return hr; TRACE("Created h264 encoder transform %p.\n", &encoder->IMFTransform_iface);
1
0
0
0
Rémi Bernon : winegstreamer: Create transforms from MFVIDEOFORMAT / WAVEFORMATEX.
by Alexandre Julliard
01 Jul '24
01 Jul '24
Module: wine Branch: master Commit: 9192b3b724d90788f7a1682b3f9eedb7bf363e22 URL:
https://gitlab.winehq.org/wine/wine/-/commit/9192b3b724d90788f7a1682b3f9eed…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon May 6 11:28:42 2024 +0200 winegstreamer: Create transforms from MFVIDEOFORMAT / WAVEFORMATEX. Instead of going through a custom intermediate format. --- dlls/winegstreamer/gst_private.h | 2 - dlls/winegstreamer/main.c | 133 ++++++++++++++------------ dlls/winegstreamer/quartz_transform.c | 25 ++--- dlls/winegstreamer/unixlib.h | 6 +- dlls/winegstreamer/wg_parser.c | 22 +++-- dlls/winegstreamer/wg_transform.c | 171 +++++++++++++--------------------- 6 files changed, 168 insertions(+), 191 deletions(-)
1
0
0
0
← Newer
1
...
47
48
49
50
51
52
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
Results per page:
10
25
50
100
200