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
April 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
1 participants
803 discussions
Start a n
N
ew thread
Zebediah Figura : ntoskrnl.exe/tests: Add tests for ERESOURCE functions.
by Alexandre Julliard
10 Apr '19
10 Apr '19
Module: wine Branch: master Commit: cc2e8d7cda1ab349dd7c67eb07dc8108def9f0dd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cc2e8d7cda1ab349dd7c67eb…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Apr 9 23:41:11 2019 -0500 ntoskrnl.exe/tests: Add tests for ERESOURCE functions. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/tests/driver.c | 311 ++++++++++++++++++++++++++++++++++++++- include/ddk/wdm.h | 2 + 2 files changed, 312 insertions(+), 1 deletion(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=cc2e8d7cda1ab349dd7c…
1
0
0
0
Zebediah Figura : ntoskrnl.exe: Implement ExIsResourceAcquiredSharedLite() .
by Alexandre Julliard
10 Apr '19
10 Apr '19
Module: wine Branch: master Commit: ab22796ab05bd516186500640f961700cce7f3f7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ab22796ab05bd51618650064…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Apr 9 23:41:10 2019 -0500 ntoskrnl.exe: Implement ExIsResourceAcquiredSharedLite(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- dlls/ntoskrnl.exe/sync.c | 25 +++++++++++++++++++++++++ include/ddk/wdm.h | 1 + 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index d3e6070..ab952e5 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -166,7 +166,7 @@ @ stdcall ExInterlockedRemoveHeadList(ptr ptr) @ stub ExIsProcessorFeaturePresent @ stdcall ExIsResourceAcquiredExclusiveLite(ptr) -@ stub ExIsResourceAcquiredSharedLite +@ stdcall ExIsResourceAcquiredSharedLite(ptr) @ stdcall ExLocalTimeToSystemTime(ptr ptr) RtlLocalTimeToSystemTime @ stub ExNotifyCallback @ stub ExQueryPoolBlockSize diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c index 94b9778..fbe9dbe 100644 --- a/dlls/ntoskrnl.exe/sync.c +++ b/dlls/ntoskrnl.exe/sync.c @@ -1144,3 +1144,28 @@ BOOLEAN WINAPI ExIsResourceAcquiredExclusiveLite( ERESOURCE *resource ) return ret; } + +/*********************************************************************** + * ExIsResourceAcquiredSharedLite (NTOSKRNL.EXE.@) + */ +ULONG WINAPI ExIsResourceAcquiredSharedLite( ERESOURCE *resource ) +{ + ULONG ret; + KIRQL irql; + + TRACE("resource %p.\n", resource); + + KeAcquireSpinLock( &resource->SpinLock, &irql ); + + if (resource->OwnerEntry.OwnerThread == (ERESOURCE_THREAD)KeGetCurrentThread()) + ret = resource->ActiveEntries; + else + { + OWNER_ENTRY *entry = resource_get_shared_entry( resource, (ERESOURCE_THREAD)KeGetCurrentThread() ); + ret = entry->OwnerCount; + } + + KeReleaseSpinLock( &resource->SpinLock, irql ); + + return ret; +} diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 5a84602..dae83af 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1532,6 +1532,7 @@ PSLIST_ENTRY WINAPI ExInterlockedPopEntrySList(PSLIST_HEADER,PKSPIN_LOCK); PSLIST_ENTRY WINAPI ExInterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY,PKSPIN_LOCK); LIST_ENTRY * WINAPI ExInterlockedRemoveHeadList(LIST_ENTRY*,KSPIN_LOCK*); BOOLEAN WINAPI ExIsResourceAcquiredExclusiveLite(ERESOURCE*); +ULONG WINAPI ExIsResourceAcquiredSharedLite(ERESOURCE*); void WINAPI ExReleaseFastMutexUnsafe(PFAST_MUTEX); void WINAPI ExReleaseResourceForThreadLite(ERESOURCE*,ERESOURCE_THREAD); ULONG WINAPI ExSetTimerResolution(ULONG,BOOLEAN);
1
0
0
0
Zebediah Figura : ntoskrnl.exe: Implement ExIsResourceAcquiredExclusiveLite().
by Alexandre Julliard
10 Apr '19
10 Apr '19
Module: wine Branch: master Commit: 37640f326943a24304fc6c52d174c22bee8417a9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=37640f326943a24304fc6c52…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Apr 9 23:41:09 2019 -0500 ntoskrnl.exe: Implement ExIsResourceAcquiredExclusiveLite(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- dlls/ntoskrnl.exe/sync.c | 19 +++++++++++++++++++ include/ddk/wdm.h | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index 3324b3b..d3e6070 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -165,7 +165,7 @@ @ stub ExInterlockedPushEntryList @ stdcall ExInterlockedRemoveHeadList(ptr ptr) @ stub ExIsProcessorFeaturePresent -@ stub ExIsResourceAcquiredExclusiveLite +@ stdcall ExIsResourceAcquiredExclusiveLite(ptr) @ stub ExIsResourceAcquiredSharedLite @ stdcall ExLocalTimeToSystemTime(ptr ptr) RtlLocalTimeToSystemTime @ stub ExNotifyCallback diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c index 7009c4c..94b9778 100644 --- a/dlls/ntoskrnl.exe/sync.c +++ b/dlls/ntoskrnl.exe/sync.c @@ -1125,3 +1125,22 @@ ULONG WINAPI ExGetSharedWaiterCount( ERESOURCE *resource ) return count; } + +/*********************************************************************** + * ExIsResourceAcquiredExclusiveLite (NTOSKRNL.EXE.@) + */ +BOOLEAN WINAPI ExIsResourceAcquiredExclusiveLite( ERESOURCE *resource ) +{ + BOOLEAN ret; + KIRQL irql; + + TRACE("resource %p.\n", resource); + + KeAcquireSpinLock( &resource->SpinLock, &irql ); + + ret = (resource->OwnerEntry.OwnerThread == (ERESOURCE_THREAD)KeGetCurrentThread()); + + KeReleaseSpinLock( &resource->SpinLock, irql ); + + return ret; +} diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index a0219c4..5a84602 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1531,6 +1531,7 @@ NTSTATUS WINAPI ExInitializeResourceLite(ERESOURCE*); PSLIST_ENTRY WINAPI ExInterlockedPopEntrySList(PSLIST_HEADER,PKSPIN_LOCK); PSLIST_ENTRY WINAPI ExInterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY,PKSPIN_LOCK); LIST_ENTRY * WINAPI ExInterlockedRemoveHeadList(LIST_ENTRY*,KSPIN_LOCK*); +BOOLEAN WINAPI ExIsResourceAcquiredExclusiveLite(ERESOURCE*); void WINAPI ExReleaseFastMutexUnsafe(PFAST_MUTEX); void WINAPI ExReleaseResourceForThreadLite(ERESOURCE*,ERESOURCE_THREAD); ULONG WINAPI ExSetTimerResolution(ULONG,BOOLEAN);
1
0
0
0
Zebediah Figura : ntoskrnl.exe: Implement ExGetSharedWaiterCount().
by Alexandre Julliard
10 Apr '19
10 Apr '19
Module: wine Branch: master Commit: 01566351fac63e88452fc7aa3b057b4d92d5f25e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=01566351fac63e88452fc7aa…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Apr 9 23:41:08 2019 -0500 ntoskrnl.exe: Implement ExGetSharedWaiterCount(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- dlls/ntoskrnl.exe/sync.c | 19 +++++++++++++++++++ include/ddk/wdm.h | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index bdf2a44..3324b3b 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -148,7 +148,7 @@ @ stub ExGetCurrentProcessorCpuUsage @ stdcall ExGetExclusiveWaiterCount(ptr) @ stub ExGetPreviousMode -@ stub ExGetSharedWaiterCount +@ stdcall ExGetSharedWaiterCount(ptr) @ stdcall ExInitializeNPagedLookasideList(ptr ptr ptr long long long long) @ stdcall ExInitializePagedLookasideList(ptr ptr ptr long long long long) @ stdcall ExInitializeResourceLite(ptr) diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c index 823ff2b..7009c4c 100644 --- a/dlls/ntoskrnl.exe/sync.c +++ b/dlls/ntoskrnl.exe/sync.c @@ -1106,3 +1106,22 @@ ULONG WINAPI ExGetExclusiveWaiterCount( ERESOURCE *resource ) return count; } + +/*********************************************************************** + * ExGetSharedWaiterCount (NTOSKRNL.EXE.@) + */ +ULONG WINAPI ExGetSharedWaiterCount( ERESOURCE *resource ) +{ + ULONG count; + KIRQL irql; + + TRACE("resource %p.\n", resource); + + KeAcquireSpinLock( &resource->SpinLock, &irql ); + + count = resource->NumberOfSharedWaiters; + + KeReleaseSpinLock( &resource->SpinLock, irql ); + + return count; +} diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 241f6d6..a0219c4 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1525,6 +1525,7 @@ NTSTATUS WINAPI ExDeleteResourceLite(ERESOURCE*); void WINAPI ExFreePool(PVOID); void WINAPI ExFreePoolWithTag(PVOID,ULONG); ULONG WINAPI ExGetExclusiveWaiterCount(ERESOURCE*); +ULONG WINAPI ExGetSharedWaiterCount(ERESOURCE*); void WINAPI ExInitializeNPagedLookasideList(PNPAGED_LOOKASIDE_LIST,PALLOCATE_FUNCTION,PFREE_FUNCTION,ULONG,SIZE_T,ULONG,USHORT); NTSTATUS WINAPI ExInitializeResourceLite(ERESOURCE*); PSLIST_ENTRY WINAPI ExInterlockedPopEntrySList(PSLIST_HEADER,PKSPIN_LOCK);
1
0
0
0
Zebediah Figura : ntoskrnl.exe: Implement ExGetExclusiveWaiterCount().
by Alexandre Julliard
10 Apr '19
10 Apr '19
Module: wine Branch: master Commit: 631473ffd98f6ba978082374a4aa60cf7cd7d6c0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=631473ffd98f6ba978082374…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Apr 9 23:41:07 2019 -0500 ntoskrnl.exe: Implement ExGetExclusiveWaiterCount(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- dlls/ntoskrnl.exe/sync.c | 19 +++++++++++++++++++ include/ddk/wdm.h | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index 2d1c826..bdf2a44 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -146,7 +146,7 @@ @ stub ExFreeToPagedLookasideList @ stub ExGetCurrentProcessorCounts @ stub ExGetCurrentProcessorCpuUsage -@ stub ExGetExclusiveWaiterCount +@ stdcall ExGetExclusiveWaiterCount(ptr) @ stub ExGetPreviousMode @ stub ExGetSharedWaiterCount @ stdcall ExInitializeNPagedLookasideList(ptr ptr ptr long long long long) diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c index c8cae7d..823ff2b 100644 --- a/dlls/ntoskrnl.exe/sync.c +++ b/dlls/ntoskrnl.exe/sync.c @@ -1087,3 +1087,22 @@ void WINAPI ExReleaseResourceLite( ERESOURCE *resource ) { ExReleaseResourceForThreadLite( resource, (ERESOURCE_THREAD)KeGetCurrentThread() ); } + +/*********************************************************************** + * ExGetExclusiveWaiterCount (NTOSKRNL.EXE.@) + */ +ULONG WINAPI ExGetExclusiveWaiterCount( ERESOURCE *resource ) +{ + ULONG count; + KIRQL irql; + + TRACE("resource %p.\n", resource); + + KeAcquireSpinLock( &resource->SpinLock, &irql ); + + count = resource->NumberOfExclusiveWaiters; + + KeReleaseSpinLock( &resource->SpinLock, irql ); + + return count; +} diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 41c462f..241f6d6 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1524,6 +1524,7 @@ void WINAPI ExDeleteNPagedLookasideList(PNPAGED_LOOKASIDE_LIST); NTSTATUS WINAPI ExDeleteResourceLite(ERESOURCE*); void WINAPI ExFreePool(PVOID); void WINAPI ExFreePoolWithTag(PVOID,ULONG); +ULONG WINAPI ExGetExclusiveWaiterCount(ERESOURCE*); void WINAPI ExInitializeNPagedLookasideList(PNPAGED_LOOKASIDE_LIST,PALLOCATE_FUNCTION,PFREE_FUNCTION,ULONG,SIZE_T,ULONG,USHORT); NTSTATUS WINAPI ExInitializeResourceLite(ERESOURCE*); PSLIST_ENTRY WINAPI ExInterlockedPopEntrySList(PSLIST_HEADER,PKSPIN_LOCK);
1
0
0
0
Nikolay Sivov : include: Add more dbgeng interface definitions.
by Alexandre Julliard
10 Apr '19
10 Apr '19
Module: wine Branch: master Commit: 810227f72efbf9ee8c6a67651bc1b5899ff4649d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=810227f72efbf9ee8c6a6765…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Apr 10 13:40:32 2019 +0300 include: Add more dbgeng interface definitions. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/dbgeng.h | 207 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 207 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=810227f72efbf9ee8c6a…
1
0
0
0
Nikolay Sivov : mfreadwrite/tests: Remove broken test.
by Alexandre Julliard
10 Apr '19
10 Apr '19
Module: wine Branch: master Commit: dabb0bc25f6efdda8eaeab15d82b7006f6256865 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dabb0bc25f6efdda8eaeab15…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Apr 10 13:37:21 2019 +0300 mfreadwrite/tests: Remove broken test. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfreadwrite/tests/mfplat.c | 45 +++-------------------------------------- 1 file changed, 3 insertions(+), 42 deletions(-) diff --git a/dlls/mfreadwrite/tests/mfplat.c b/dlls/mfreadwrite/tests/mfplat.c index 16fa822..074c403 100644 --- a/dlls/mfreadwrite/tests/mfplat.c +++ b/dlls/mfreadwrite/tests/mfplat.c @@ -79,47 +79,6 @@ static IMFByteStream *get_resource_stream(const char *name) return bytestream; } -static void test_MFCreateSourceReaderFromByteStream(void) -{ - static const WCHAR audio[] = {'A','u','d','i','o',0}; - IMFSourceReader *reader = NULL; - IMFAttributes *attributes; - IMFByteStream *bytestream = NULL; - IStream *stream = NULL; - HRESULT hr; - - if(!pMFCreateMFByteStreamOnStream) - { - win_skip("MFCreateMFByteStreamOnStream() not found\n"); - return; - } - - hr = MFCreateAttributes( &attributes, 3 ); - ok(hr == S_OK, "got 0x%08x\n", hr); - - hr = IMFAttributes_SetString(attributes, &MF_READWRITE_MMCSS_CLASS_AUDIO, audio); - ok(hr == S_OK, "Failed to set string value, hr %#x.\n", hr); - - hr = IMFAttributes_SetUINT32(attributes, &MF_READWRITE_MMCSS_PRIORITY_AUDIO, 0); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); - - hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hr == S_OK, "got 0x%08x\n", hr); - - hr = pMFCreateMFByteStreamOnStream(stream, &bytestream); - ok(hr == S_OK, "got 0x%08x\n", hr); - - hr = MFCreateSourceReaderFromByteStream(bytestream, attributes, &reader); -todo_wine - ok(hr == S_OK || hr == MF_E_UNSUPPORTED_BYTESTREAM_TYPE, "got 0x%08x\n", hr); - - IStream_Release(stream); - IMFByteStream_Release(bytestream); - IMFAttributes_Release(attributes); - if (reader) - IMFSourceReader_Release(reader); -} - static void test_factory(void) { IMFReadWriteClassFactory *factory, *factory2; @@ -237,7 +196,10 @@ static void test_source_reader(void) HRESULT hr; if (!pMFCreateMFByteStreamOnStream) + { + win_skip("MFCreateMFByteStreamOnStream() not found\n"); return; + } stream = get_resource_stream("test.wav"); @@ -379,7 +341,6 @@ START_TEST(mfplat) init_functions(); - test_MFCreateSourceReaderFromByteStream(); test_factory(); test_source_reader();
1
0
0
0
Zebediah Figura : qcap: Get rid of no longer used YUV to RGB conversion routines.
by Alexandre Julliard
10 Apr '19
10 Apr '19
Module: wine Branch: master Commit: 7ac13067149e76e24bdc4ab402c9e6c7471d16fa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7ac13067149e76e24bdc4ab4…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Apr 10 09:46:28 2019 -0500 qcap: Get rid of no longer used YUV to RGB conversion routines. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qcap/Makefile.in | 3 +- dlls/qcap/qcap_main.h | 19 ----- dlls/qcap/v4l.c | 1 - dlls/qcap/yuv.c | 200 -------------------------------------------------- 4 files changed, 1 insertion(+), 222 deletions(-) diff --git a/dlls/qcap/Makefile.in b/dlls/qcap/Makefile.in index 71a785b..e161e06 100644 --- a/dlls/qcap/Makefile.in +++ b/dlls/qcap/Makefile.in @@ -11,7 +11,6 @@ C_SRCS = \ qcap_main.c \ smartteefilter.c \ v4l.c \ - vfwcapture.c \ - yuv.c + vfwcapture.c RC_SRCS = version.rc diff --git a/dlls/qcap/qcap_main.h b/dlls/qcap/qcap_main.h index 733772e..0e767bd 100644 --- a/dlls/qcap/qcap_main.h +++ b/dlls/qcap/qcap_main.h @@ -41,23 +41,4 @@ extern IUnknown * WINAPI QCAP_createAudioInputMixerPropertyPage(IUnknown *pUnkOu void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE * pmt) DECLSPEC_HIDDEN; -enum YUV_Format { - /* Last 2 numbers give the skip info, the smaller they are the better - * Planar: - * HSKIP : VSKIP */ - YUVP_421, /* 2 : 1 */ - YUVP_422, /* 2 : 2 */ - YUVP_441, /* 4 : 1 */ - YUVP_444, /* 4 : 4 */ - ENDPLANAR, /* No format, just last planar item so we can check on it */ - - /* Non-planar */ - YUYV, /* Order: YUYV (Guess why it's named like that) */ - UYVY, /* Order: UYVY (Looks like someone got bored and swapped the Y's) */ - UYYVYY, /* YUV411 linux style, perhaps YUV420 is YYUYYV? */ -}; - -void YUV_Init(void) DECLSPEC_HIDDEN; -void YUV_To_RGB24(enum YUV_Format format, unsigned char *target, const unsigned char *source, int width, int height) DECLSPEC_HIDDEN; - #endif /* _QCAP_MAIN_H_DEFINED */ diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index ce322d0..809ce7a 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -576,7 +576,6 @@ Capture * qcap_driver_init( IPin *pOut, USHORT card ) char path[20]; int fd; - YUV_Init(); have_libv4l2 = video_init(); if (!(device = CoTaskMemAlloc(sizeof(*device)))) diff --git a/dlls/qcap/yuv.c b/dlls/qcap/yuv.c deleted file mode 100644 index 0ba78d0..0000000 --- a/dlls/qcap/yuv.c +++ /dev/null @@ -1,200 +0,0 @@ -/* DirectShow capture services (QCAP.DLL) - * - * Copyright 2005 Maarten Lankhorst - * - * This file contains the part of the vfw capture interface that - * does the actual Video4Linux(1/2) stuff required for capturing - * and setting/getting media format.. - * - * 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 - */ - -#include "config.h" -#include <stdarg.h> - -#include "windef.h" -#include "wingdi.h" -#include "objbase.h" -#include "strmif.h" -#include "qcap_main.h" -#include "wine/debug.h" - -/* This is not used if V4L support is missing */ -#ifdef HAVE_LINUX_VIDEODEV2_H - -WINE_DEFAULT_DEBUG_CHANNEL(qcap); - -static int yuv_xy[256]; /* Gray value */ -static int yuv_gu[256]; /* Green U */ -static int yuv_bu[256]; /* Blue U */ -static int yuv_rv[256]; /* Red V */ -static int yuv_gv[256]; /* Green V */ -static BOOL initialised = FALSE; - -static inline int ValidRange(int in) { - if (in > 255) in = 255; - if (in < 0) in = 0; - return in; -} - -typedef struct RGB { -#if 0 /* For some reason I have to revert R and B, not sure why */ - unsigned char r, g, b; -#else - unsigned char b, g, r; -#endif -} RGB; - -static inline void YUV2RGB(const unsigned char y_, const unsigned char cb, const unsigned char cr, RGB* retval) { - retval->r = ValidRange(yuv_xy[y_] + yuv_rv[cr]); - retval->g = ValidRange(yuv_xy[y_] + yuv_gu[cb] + yuv_gv[cr]); - retval->b = ValidRange(yuv_xy[y_] + yuv_bu[cb]); -} - -void YUV_Init(void) { - float y, u, v; - int y_, cb, cr; - - if (initialised) return; - initialised = TRUE; - - for (y_ = 0; y_ <= 255; y_++) - { - y = ((float) 255 / 219) * (y_ - 16); - yuv_xy[y_] = y; - } - - for (cb = 0; cb <= 255; cb++) - { - u = ((float) 255 / 224) * (cb - 128); - yuv_gu[cb] = -0.344 * u; - yuv_bu[cb] = 1.772 * u; - } - - for (cr = 0; cr <= 255; cr++) - { - v = ((float) 255 / 224) * (cr - 128); - yuv_rv[cr] = 1.402 * v; - yuv_gv[cr] = -0.714 * v; - } - TRACE("Filled hash table\n"); -} - -static void Parse_YUYV(unsigned char *destbuffer, const unsigned char *input, int width, int height) -{ - const unsigned char *pY, *pCb, *pCr; - int togo = width * height / 2; - pY = input; - pCb = input+1; - pCr = input+3; - while (--togo) { - YUV2RGB(*pY, *pCb, *pCr, (RGB *)destbuffer); - pY += 2; destbuffer += 3; - YUV2RGB(*pY, *pCb, *pCr, (RGB *)destbuffer); - pY += 2; pCb += 4; pCr += 4; destbuffer += 3; - } -} - -static void Parse_UYVY(unsigned char *destbuffer, const unsigned char *input, int width, int height) -{ - const unsigned char *pY, *pCb, *pCr; - int togo = width * height / 2; - pY = input+1; - pCb = input; - pCr = input+2; - while (--togo) { - YUV2RGB(*pY, *pCb, *pCr, (RGB *)destbuffer); - pY += 2; destbuffer += 3; - YUV2RGB(*pY, *pCb, *pCr, (RGB *)destbuffer); - pY += 2; pCb += 4; pCr += 4; destbuffer += 3; - } -} - -static void Parse_UYYVYY(unsigned char *destbuffer, const unsigned char *input, int width, int height) -{ - const unsigned char *pY, *pCb, *pCr; - int togo = width * height / 4; - pY = input+1; - pCb = input; - pCr = input+4; - while (--togo) { - YUV2RGB(*pY, *pCb, *pCr, (RGB *)destbuffer); - destbuffer += 3; pY++; - YUV2RGB(*pY, *pCb, *pCr, (RGB *)destbuffer); - pY += 2; destbuffer += 3; - YUV2RGB(*pY, *pCb, *pCr, (RGB *)destbuffer); - destbuffer += 3; pY++; - YUV2RGB(*pY, *pCb, *pCr, (RGB *)destbuffer); - pY += 2; pCb += 6; pCr += 6; destbuffer += 3; - } -} - -static void Parse_PYUV(unsigned char *destbuffer, const unsigned char *input, int width, int height, int wstep, int hstep) -{ - /* We have 3 pointers, One to Y, one to Cb and 1 to Cr */ - -/* C19 *89* declaration block (Grr julliard for not allowing C99) */ - int ysize, uvsize; - const unsigned char *pY, *pCb, *pCr; - int swstep = 0, shstep = 0; - int ypos = 0, xpos = 0; - int indexUV = 0, cUv; -/* End of Grr */ - - ysize = width * height; - uvsize = (width / wstep) * (height / hstep); - pY = input; - pCb = pY + ysize; - pCr = pCb + uvsize; - /* Bottom down DIB */ - do { - swstep = 0; - cUv = indexUV; - for (xpos = 0; xpos < width; xpos++) { - YUV2RGB(*(pY++), pCb[cUv], pCr[cUv], (RGB *)destbuffer); - destbuffer += 3; - if (++swstep == wstep) { - cUv++; - swstep = 0; - } - } - if (++shstep == hstep) { - shstep = 0; - indexUV = cUv; - } - } while (++ypos < height); -} - -void YUV_To_RGB24(enum YUV_Format format, unsigned char *target, const unsigned char *source, int width, int height) { - int wstep, hstep; - if (format < ENDPLANAR) { - switch (format) { - case YUVP_421: wstep = 2; hstep = 1; break; - case YUVP_422: wstep = 2; hstep = 2; break; - case YUVP_441: wstep = 4; hstep = 1; break; - case YUVP_444: wstep = 4; hstep = 4; break; - default: ERR("Unhandled format \"%d\"\n", format); return; - } - Parse_PYUV(target, source, width, height, wstep, hstep); - } else { - switch (format) { - case YUYV: Parse_YUYV(target, source, width, height); return; - case UYVY: Parse_UYVY(target, source, width, height); return; - case UYYVYY: Parse_UYYVYY(target, source, width, height); return; - default: ERR("Unhandled format \"%d\"\n", format); return; - } - } -} -#endif
1
0
0
0
Zebediah Figura : qcap: Require libv4l2 to perform pixel format translation.
by Alexandre Julliard
10 Apr '19
10 Apr '19
Module: wine Branch: master Commit: 0423d5e65a6c7094d829d2a215fcf6a44bf57714 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0423d5e65a6c7094d829d2a2…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Apr 10 09:46:27 2019 -0500 qcap: Require libv4l2 to perform pixel format translation. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qcap/v4l.c | 165 +++++++------------------------------------------------- 1 file changed, 20 insertions(+), 145 deletions(-) diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index 04f9718..ce322d0 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -94,8 +94,6 @@ static BOOL video_init(void) #endif } -typedef void (* Renderer)(const Capture *, LPBYTE bufferin, const BYTE *stream); - struct _Capture { UINT width, height, bitDepth, fps, outputwidth, outputheight; @@ -107,36 +105,10 @@ struct _Capture int fd, mmap; BOOL iscommitted, stopped; - __u32 pixelformat; - int depth; - int image_size; unsigned char *image_data; HANDLE thread; - Renderer renderer; -}; - -static void renderer_RGB(const Capture *capBox, LPBYTE bufferin, const BYTE *stream); -static void renderer_YUV(const Capture *capBox, LPBYTE bufferin, const BYTE *stream); - -static const struct -{ - int depth; - __u32 pixelformat; - Renderer renderer; -} -renderlist_V4l[] = -{ - {24, V4L2_PIX_FMT_BGR24, renderer_RGB}, - {32, V4L2_PIX_FMT_BGR32, renderer_RGB}, - {16, V4L2_PIX_FMT_YUYV, renderer_YUV}, - {16, V4L2_PIX_FMT_UYVY, renderer_YUV}, - {12, V4L2_PIX_FMT_Y41P, renderer_YUV}, - {16, V4L2_PIX_FMT_YUV422P, renderer_YUV}, - {12, V4L2_PIX_FMT_YUV411P, renderer_YUV}, - {12, V4L2_PIX_FMT_YUV420, renderer_YUV}, - {10, V4L2_PIX_FMT_YUV410, renderer_YUV}, }; static int xioctl(int fd, int request, void * arg) @@ -153,7 +125,7 @@ static int xioctl(int fd, int request, void * arg) /* Prepare the capture buffers */ static HRESULT V4l_Prepare(Capture *device) { - device->image_size = device->depth * device->height * device->width / 8; + device->image_size = device->height * device->width * 3; if (!(device->image_data = heap_alloc(device->image_size))) return E_OUTOFMEMORY; return S_OK; @@ -347,70 +319,6 @@ HRESULT qcap_driver_set_prop(Capture *device, VideoProcAmpProperty property, return S_OK; } -static void renderer_RGB(const Capture *device, BYTE *bufferin, const BYTE *stream) -{ - int size = device->height * device->width * device->depth / 8; - int pointer, offset; - - switch (device->pixelformat) - { - case V4L2_PIX_FMT_BGR24: - memcpy(bufferin, stream, size); - break; - case V4L2_PIX_FMT_BGR32: - pointer = 0; - offset = 1; - while (pointer + offset <= size) - { - bufferin[pointer] = stream[pointer + offset]; - pointer++; - bufferin[pointer] = stream[pointer + offset]; - pointer++; - bufferin[pointer] = stream[pointer + offset]; - pointer++; - offset++; - } - break; - default: - FIXME("Unhandled pixel format %#x.\n", device->pixelformat); - return; - } -} - -static void renderer_YUV(const Capture *device, BYTE *bufferin, const BYTE *stream) -{ - enum YUV_Format format; - - switch (device->pixelformat) - { - case V4L2_PIX_FMT_YUYV: - format = YUYV; - break; - case V4L2_PIX_FMT_UYVY: - format = UYVY; - break; - case V4L2_PIX_FMT_Y41P: - format = UYYVYY; - break; - case V4L2_PIX_FMT_YUV422P: - format = YUVP_421; - break; - case V4L2_PIX_FMT_YUV411P: - format = YUVP_441; - break; - case V4L2_PIX_FMT_YUV420: - format = YUVP_422; - break; - case V4L2_PIX_FMT_YUV410: - format = YUVP_444; - break; - default: - FIXME("Unhandled pixel format %#x.\n", device->pixelformat); - return; - } - YUV_To_RGB24(format, bufferin, stream, device->width, device->height); -} - static void Resize(const Capture * capBox, LPBYTE output, const BYTE *input) { /* the whole image needs to be reversed, @@ -522,7 +430,7 @@ static DWORD WINAPI ReadThread(LPVOID lParam) IMediaSample_GetPointer(pSample, &pTarget); /* FIXME: Check return values.. */ V4l_GetFrame(capBox, &pInput); - capBox->renderer(capBox, pOutput, pInput); + memcpy(pOutput, pInput, len); Resize(capBox, pTarget, pOutput); hr = BaseOutputPinImpl_Deliver((BaseOutputPin *)capBox->pOut, pSample); TRACE("%p -> Frame %u: %x\n", capBox, ++framecount, hr); @@ -659,57 +567,10 @@ HRESULT qcap_driver_stop(Capture *capBox, FILTER_STATE *state) return S_OK; } -static int negotiate_format(Capture *device) -{ - struct v4l2_format format = {0}; - int fd = device->fd; - unsigned int i; - - format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - - if (xioctl(fd, VIDIOC_G_FMT, &format) == -1) - { - ERR("Failed to get device format: %s\n", strerror(errno)); - return -1; - } - - for (i = 0; i < ARRAY_SIZE(renderlist_V4l); ++i) - { - if (renderlist_V4l[i].pixelformat == format.fmt.pix.pixelformat) - { - TRACE("Using device-reported format %#x.\n", format.fmt.pix.pixelformat); - device->depth = renderlist_V4l[i].depth; - device->renderer = renderlist_V4l[i].renderer; - device->pixelformat = format.fmt.pix.pixelformat; - device->width = format.fmt.pix.width; - device->height = format.fmt.pix.height; - return 0; - } - } - - for (i = 0; i < ARRAY_SIZE(renderlist_V4l); ++i) - { - format.fmt.pix.pixelformat = renderlist_V4l[i].pixelformat; - if (!xioctl(fd, VIDIOC_S_FMT, &format) - && format.fmt.pix.pixelformat == renderlist_V4l[i].pixelformat) - { - TRACE("Using format %#x.\n", format.fmt.pix.pixelformat); - device->depth = renderlist_V4l[i].depth; - device->renderer = renderlist_V4l[i].renderer; - device->pixelformat = format.fmt.pix.pixelformat; - device->width = format.fmt.pix.width; - device->height = format.fmt.pix.height; - return 0; - } - } - - FIXME("Could not negotiate an acceptable format.\n"); - return -1; -} - Capture * qcap_driver_init( IPin *pOut, USHORT card ) { struct v4l2_capability caps = {{0}}; + struct v4l2_format format = {0}; Capture *device = NULL; BOOL have_libv4l2; char path[20]; @@ -762,11 +623,25 @@ Capture * qcap_driver_init( IPin *pOut, USHORT card ) goto error; } - if (negotiate_format(device) == -1) + format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + if (xioctl(fd, VIDIOC_G_FMT, &format) == -1) + { + ERR("Failed to get device format: %s\n", strerror(errno)); + goto error; + } + + format.fmt.pix.pixelformat = V4L2_PIX_FMT_BGR24; + if (xioctl(fd, VIDIOC_S_FMT, &format) == -1 + || format.fmt.pix.pixelformat != V4L2_PIX_FMT_BGR24) + { + ERR("Failed to set pixel format: %s\n", strerror(errno)); + if (!have_libv4l2) + ERR_(winediag)("You may need libv4l2 to use this device.\n"); goto error; + } - device->outputwidth = device->width; - device->outputheight = device->height; + device->outputwidth = device->width = format.fmt.pix.width; + device->outputheight = device->height = format.fmt.pix.height; device->swresize = FALSE; device->bitDepth = 24; device->pOut = pOut;
1
0
0
0
Zebediah Figura : qcap: Port to libv4l2.
by Alexandre Julliard
10 Apr '19
10 Apr '19
Module: wine Branch: master Commit: 34ef3c89ad15d4d1f552acbf2e1c131f79f22082 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=34ef3c89ad15d4d1f552acbf…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Apr 10 09:46:25 2019 -0500 qcap: Port to libv4l2. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 61 +++-- configure.ac | 14 +- dlls/qcap/qcap_main.h | 1 + dlls/qcap/v4l.c | 614 ++++++++++++++++++++------------------------------ dlls/qcap/yuv.c | 2 +- include/config.h.in | 10 +- 6 files changed, 284 insertions(+), 418 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=34ef3c89ad15d4d1f552…
1
0
0
0
← Newer
1
...
43
44
45
46
47
48
49
...
81
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
Results per page:
10
25
50
100
200