ReactOS.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
2024
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
List overview
Download
Ros-diffs
March 2018
----- 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
ros-diffs@reactos.org
25 participants
436 discussions
Start a n
N
ew thread
01/01: [ATL100_WINETEST] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0aba4966fff49c4e32932…
commit 0aba4966fff49c4e329329d7dad91e5ab72a373c Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Fri Mar 9 12:45:08 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Fri Mar 9 12:45:08 2018 +0100 [ATL100_WINETEST] Sync with Wine Staging 3.3. CORE-14434 --- modules/rostests/winetests/atl100/atl.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/modules/rostests/winetests/atl100/atl.c b/modules/rostests/winetests/atl100/atl.c index 2790a3128a..a287e38e27 100644 --- a/modules/rostests/winetests/atl100/atl.c +++ b/modules/rostests/winetests/atl100/atl.c @@ -19,20 +19,12 @@ #include <stdarg.h> #include <stdio.h> -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - #define COBJMACROS #define CONST_VTABLE #include <windef.h> #include <winbase.h> #include <winuser.h> -#include <winreg.h> -#include <wingdi.h> -#include <objbase.h> -#include <oleauto.h> #include <exdisp.h> #include <wine/atlbase.h>
6 years, 8 months
1
0
0
0
01/01: [ATL_WINETEST] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1215b3f1da4f34ebe9553…
commit 1215b3f1da4f34ebe9553fb8d5f077af20a10b63 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Fri Mar 9 12:44:38 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Fri Mar 9 12:44:38 2018 +0100 [ATL_WINETEST] Sync with Wine Staging 3.3. CORE-14434 --- modules/rostests/winetests/atl/atl_ax.c | 29 ++++++++++++----------------- modules/rostests/winetests/atl/module.c | 14 ++++---------- modules/rostests/winetests/atl/registrar.c | 30 ++++++++++++------------------ 3 files changed, 28 insertions(+), 45 deletions(-) diff --git a/modules/rostests/winetests/atl/atl_ax.c b/modules/rostests/winetests/atl/atl_ax.c index 93f16a75c5..00c7914320 100644 --- a/modules/rostests/winetests/atl/atl_ax.c +++ b/modules/rostests/winetests/atl/atl_ax.c @@ -18,27 +18,22 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include <stdarg.h> -//#include <stdio.h> +#include <stdarg.h> +#include <stdio.h> #define COBJMACROS #include <wine/test.h> -//#include <windef.h> -//#include <winbase.h> -//#include <winuser.h> -//#include <wingdi.h> -//#include <winnls.h> -//#include <winerror.h> -//#include <winnt.h> -//#include <wtypes.h> -#include <objbase.h> -//#include <olectl.h> -//#include <ocidl.h> +#include <windef.h> +#include <winbase.h> +#include <winuser.h> +#include <wingdi.h> +#include <winnls.h> +#include <winerror.h> +#include <winnt.h> +#include <wtypes.h> +#include <olectl.h> +#include <ocidl.h> #include <exdisp.h> #include <wine/atlbase.h> diff --git a/modules/rostests/winetests/atl/module.c b/modules/rostests/winetests/atl/module.c index 37a982dd04..44aecf0457 100644 --- a/modules/rostests/winetests/atl/module.c +++ b/modules/rostests/winetests/atl/module.c @@ -19,21 +19,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include <stdarg.h> -//#include <stdio.h> +#include <stdarg.h> +#include <stdio.h> #define COBJMACROS -#include <wine/test.h> - -#include <objbase.h> - #include <wine/atlbase.h> +#include <wine/test.h> + #define MAXSIZE 512 static void test_StructSize(void) { diff --git a/modules/rostests/winetests/atl/registrar.c b/modules/rostests/winetests/atl/registrar.c index 9a2a28532a..4ecb092fd6 100644 --- a/modules/rostests/winetests/atl/registrar.c +++ b/modules/rostests/winetests/atl/registrar.c @@ -18,29 +18,23 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include <stdarg.h> -//#include <stdio.h> +#include <stdarg.h> +#include <stdio.h> #define COBJMACROS #include <wine/test.h> -//#include <windef.h> -//#include <winbase.h> -//#include <winuser.h> -//#include <wingdi.h> +#include <windef.h> +#include <winbase.h> +#include <winuser.h> +#include <wingdi.h> #include <winnls.h> -#include <winreg.h> -//#include <winerror.h> -//#include <winnt.h> -//#include <wtypes.h> -#include <objbase.h> -//#include <olectl.h> -//#include <ocidl.h> -//#include <initguid.h> +#include <winerror.h> +#include <winnt.h> +#include <wtypes.h> +#include <olectl.h> +#include <ocidl.h> +#include <initguid.h> #include <atliface.h> static const char textA[] =
6 years, 8 months
1
0
0
0
01/01: [ATL][ATL80][ATL100] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ecb7521101494eaf05de0…
commit ecb7521101494eaf05de0fffc2c135815f0f3651 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Fri Mar 9 12:43:41 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Fri Mar 9 12:43:41 2018 +0100 [ATL][ATL80][ATL100] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/atl/atl.c | 24 ++++++++++++------------ dll/win32/atl/atl30.c | 15 ++++++++++++--- dll/win32/atl/atl_ax.c | 28 ++++++++++++++++++++++------ dll/win32/atl/precomp.h | 5 ++--- dll/win32/atl/registrar.c | 8 +++++++- dll/win32/atl100/precomp.h | 3 +-- dll/win32/atl80/atl80.c | 18 ++++++++++++++---- dll/win32/atl80/precomp.h | 5 ++--- media/doc/README.WINE | 6 +++--- 9 files changed, 75 insertions(+), 37 deletions(-) diff --git a/dll/win32/atl/atl.c b/dll/win32/atl/atl.c index ce0d616c9a..4acee5de3c 100644 --- a/dll/win32/atl/atl.c +++ b/dll/win32/atl/atl.c @@ -17,10 +17,20 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <precomp.h> +#define COBJMACROS -#include <wine/atlcom.h> +#include "wine/atlbase.h" +#include "wine/atlcom.h" + +#include "wine/debug.h" +#include "wine/heap.h" +#include "wine/unicode.h" + +#ifdef __REACTOS__ #include <wingdi.h> +#endif + +WINE_DEFAULT_DEBUG_CHANNEL(atl); #define ATLVer1Size FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer) @@ -28,16 +38,6 @@ HINSTANCE atl_instance; typedef unsigned char cpp_bool; -static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size) -{ - return HeapAlloc(GetProcessHeap(), 0, size); -} - -static inline BOOL heap_free(void *mem) -{ - return HeapFree(GetProcessHeap(), 0, mem); -} - static ICatRegister *catreg; /*********************************************************************** diff --git a/dll/win32/atl/atl30.c b/dll/win32/atl/atl30.c index 99ed6711d8..674c1aac8d 100644 --- a/dll/win32/atl/atl30.c +++ b/dll/win32/atl/atl30.c @@ -19,10 +19,19 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <precomp.h> - #include <stdio.h> -#include <rpcproxy.h> + +#define COBJMACROS + +#include "objidl.h" +#include "rpcproxy.h" +#include "wine/atlbase.h" +#include "wine/atlwin.h" + +#include "wine/debug.h" +#include "wine/unicode.h" + +WINE_DEFAULT_DEBUG_CHANNEL(atl); extern HINSTANCE atl_instance; diff --git a/dll/win32/atl/atl_ax.c b/dll/win32/atl/atl_ax.c index 6897669ab0..1765dcc689 100644 --- a/dll/win32/atl/atl_ax.c +++ b/dll/win32/atl/atl_ax.c @@ -18,12 +18,28 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <precomp.h> - -#include <ole2.h> -#include <exdisp.h> -#include <shlwapi.h> -#include <wine/atlwin.h> +#include <stdarg.h> +#include <stdio.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winuser.h" +#include "wine/debug.h" +#include "objbase.h" +#include "objidl.h" +#include "ole2.h" +#include "exdisp.h" +#include "wine/atlbase.h" +#include "atliface.h" +#include "wine/atlwin.h" +#include "shlwapi.h" + +#include "wine/unicode.h" + +WINE_DEFAULT_DEBUG_CHANNEL(atl); typedef struct IOCS { IOleClientSite IOleClientSite_iface; diff --git a/dll/win32/atl/precomp.h b/dll/win32/atl/precomp.h index def51b04e8..e38da863bb 100644 --- a/dll/win32/atl/precomp.h +++ b/dll/win32/atl/precomp.h @@ -1,3 +1,4 @@ + #ifndef _ATL_PCH_ #define _ATL_PCH_ @@ -20,6 +21,4 @@ #include <wine/debug.h> #include <wine/unicode.h> -WINE_DEFAULT_DEBUG_CHANNEL(atl); - -#endif /* _ATL_PCH_ */ +#endif /* !_ATL_PCH_ */ diff --git a/dll/win32/atl/registrar.c b/dll/win32/atl/registrar.c index 704a21c005..3d597ba217 100644 --- a/dll/win32/atl/registrar.c +++ b/dll/win32/atl/registrar.c @@ -16,8 +16,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <precomp.h> +#define COBJMACROS +#include "wine/atlbase.h" + +#include "wine/debug.h" +#include "wine/unicode.h" + +WINE_DEFAULT_DEBUG_CHANNEL(atl); /************************************************************** * ATLRegistrar implementation diff --git a/dll/win32/atl100/precomp.h b/dll/win32/atl100/precomp.h index 324229015e..f4ec9214d7 100644 --- a/dll/win32/atl100/precomp.h +++ b/dll/win32/atl100/precomp.h @@ -1,3 +1,4 @@ + #ifndef _ATL100_PCH_ #define _ATL100_PCH_ @@ -19,6 +20,4 @@ #include <wine/debug.h> #include <wine/unicode.h> -WINE_DEFAULT_DEBUG_CHANNEL(atl); - #endif /* _ATL100_PCH_ */ diff --git a/dll/win32/atl80/atl80.c b/dll/win32/atl80/atl80.c index 1a9019b150..b524daf8d9 100644 --- a/dll/win32/atl80/atl80.c +++ b/dll/win32/atl80/atl80.c @@ -16,11 +16,21 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <precomp.h> - +#include <stdarg.h> #include <stdio.h> -#include <winerror.h> -#include <winuser.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winuser.h" +#include "wine/atlbase.h" + +#include "wine/debug.h" +#include "wine/unicode.h" + +WINE_DEFAULT_DEBUG_CHANNEL(atl); /*********************************************************************** * AtlRegisterTypeLib [atl80.18] diff --git a/dll/win32/atl80/precomp.h b/dll/win32/atl80/precomp.h index 75f1e4159e..4e6c501d94 100644 --- a/dll/win32/atl80/precomp.h +++ b/dll/win32/atl80/precomp.h @@ -1,3 +1,4 @@ + #ifndef _ATL80_PCH_ #define _ATL80_PCH_ @@ -19,6 +20,4 @@ #include <wine/debug.h> #include <wine/unicode.h> -WINE_DEFAULT_DEBUG_CHANNEL(atl); - -#endif /* _ATL80_PCH_ */ +#endif /* !_ATL80_PCH_ */ diff --git a/media/doc/README.WINE b/media/doc/README.WINE index e37d01ddab..6fe3e1d210 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -45,9 +45,9 @@ reactos/dll/directx/wine/wined3d # Synced to WineStaging-3.3 reactos/dll/win32/activeds # Synced to WineStaging-3.3 reactos/dll/win32/actxprxy # Synced to WineStaging-3.3 reactos/dll/win32/advpack # Synced to WineStaging-3.3 -reactos/dll/win32/atl # Synced to Wine-3.0 -reactos/dll/win32/atl80 # Synced to Wine-3.0 -reactos/dll/win32/atl100 # Synced to Wine-3.0 +reactos/dll/win32/atl # Synced to WineStaging-3.3 +reactos/dll/win32/atl80 # Synced to WineStaging-3.3 +reactos/dll/win32/atl100 # Synced to WineStaging-3.3 reactos/dll/win32/avifil32 # Synced to Wine-3.0 reactos/dll/win32/bcrypt # Synced to WineStaging-1.9.23 reactos/dll/win32/browseui # Out of sync
6 years, 8 months
1
0
0
0
01/01: [ADVPACK_WINETEST] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=59eab41aba3ebe4fcbd66…
commit 59eab41aba3ebe4fcbd6689da0bfaf7f7902e8fa Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Fri Mar 9 12:42:18 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Fri Mar 9 12:42:18 2018 +0100 [ADVPACK_WINETEST] Sync with Wine Staging 3.3. CORE-14434 --- modules/rostests/winetests/advpack/advpack.c | 12 +++--------- modules/rostests/winetests/advpack/files.c | 11 ++--------- modules/rostests/winetests/advpack/install.c | 11 ++--------- 3 files changed, 7 insertions(+), 27 deletions(-) diff --git a/modules/rostests/winetests/advpack/advpack.c b/modules/rostests/winetests/advpack/advpack.c index 9f4e4fc3e6..d5958769ab 100644 --- a/modules/rostests/winetests/advpack/advpack.c +++ b/modules/rostests/winetests/advpack/advpack.c @@ -19,18 +19,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - #include <stdio.h> -#include <windef.h> -#include <winbase.h> -#include <winreg.h> -#include <objbase.h> +#include <stdarg.h> +#include <windows.h> #include <advpub.h> #include <assert.h> -#include <wine/test.h> +#include "wine/test.h" /* defines for the TranslateInfString/Ex tests */ #define TEST_STRING1 "\\Application Name" diff --git a/modules/rostests/winetests/advpack/files.c b/modules/rostests/winetests/advpack/files.c index 101e907321..1851dc16f0 100644 --- a/modules/rostests/winetests/advpack/files.c +++ b/modules/rostests/winetests/advpack/files.c @@ -18,18 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - #include <stdio.h> -#include <windef.h> -#include <winbase.h> -#include <winreg.h> -#include <objbase.h> +#include <windows.h> #include <advpub.h> #include <fci.h> -#include <wine/test.h> +#include "wine/test.h" /* make the max size large so there is only one cab file */ #define MEDIA_SIZE 999999999 diff --git a/modules/rostests/winetests/advpack/install.c b/modules/rostests/winetests/advpack/install.c index ad7eb8dbf4..16593d1c5e 100644 --- a/modules/rostests/winetests/advpack/install.c +++ b/modules/rostests/winetests/advpack/install.c @@ -18,17 +18,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - #include <stdio.h> -#include <windef.h> -#include <winbase.h> -#include <winreg.h> -#include <objbase.h> +#include <windows.h> #include <advpub.h> -#include <wine/test.h> +#include "wine/test.h" static HMODULE hAdvPack; /* function pointers */
6 years, 8 months
1
0
0
0
01/01: [ADVPACK] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=89236be2cc6db95fae298…
commit 89236be2cc6db95fae2986f4b2f07cb286aec1aa Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Fri Mar 9 12:41:26 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Fri Mar 9 12:41:26 2018 +0100 [ADVPACK] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/advpack/CMakeLists.txt | 4 ++-- dll/win32/advpack/advpack.c | 14 ++++++++++++++ dll/win32/advpack/advpack_private.h | 28 +--------------------------- dll/win32/advpack/files.c | 17 +++++++++++++++-- dll/win32/advpack/install.c | 16 +++++++++++++++- dll/win32/advpack/precomp.h | 23 +++++++++++++++++++++++ dll/win32/advpack/reg.c | 13 ++++++++++++- media/doc/README.WINE | 2 +- 8 files changed, 83 insertions(+), 34 deletions(-) diff --git a/dll/win32/advpack/CMakeLists.txt b/dll/win32/advpack/CMakeLists.txt index 71abc63857..585927435c 100644 --- a/dll/win32/advpack/CMakeLists.txt +++ b/dll/win32/advpack/CMakeLists.txt @@ -8,7 +8,7 @@ list(APPEND SOURCE files.c install.c reg.c - advpack_private.h) + precomp.h) add_library(advpack SHARED ${SOURCE} @@ -18,5 +18,5 @@ add_library(advpack SHARED set_module_type(advpack win32dll) target_link_libraries(advpack wine) add_importlibs(advpack ole32 setupapi version advapi32 msvcrt kernel32 ntdll) -add_pch(advpack advpack_private.h SOURCE) +add_pch(advpack precomp.h SOURCE) add_cd_file(TARGET advpack DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/advpack/advpack.c b/dll/win32/advpack/advpack.c index 4f1b41c0b7..d2ce60e3e2 100644 --- a/dll/win32/advpack/advpack.c +++ b/dll/win32/advpack/advpack.c @@ -19,8 +19,22 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winreg.h" +#include "winternl.h" +#include "winnls.h" +#include "setupapi.h" +#include "advpub.h" +#include "wine/unicode.h" +#include "wine/debug.h" #include "advpack_private.h" +WINE_DEFAULT_DEBUG_CHANNEL(advpack); + typedef HRESULT (WINAPI *DLLREGISTER) (void); #define MAX_FIELD_LENGTH 512 diff --git a/dll/win32/advpack/advpack_private.h b/dll/win32/advpack/advpack_private.h index 5ebfe6332d..fc3b26f393 100644 --- a/dll/win32/advpack/advpack_private.h +++ b/dll/win32/advpack/advpack_private.h @@ -21,23 +21,7 @@ #ifndef __ADVPACK_PRIVATE_H #define __ADVPACK_PRIVATE_H -#include <stdarg.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#include <windef.h> -#include <winbase.h> -#include <winuser.h> -#include <winreg.h> -#include <winternl.h> -#include <advpub.h> - -#include <wine/debug.h> -#include <wine/unicode.h> - -WINE_DEFAULT_DEBUG_CHANNEL(advpack); +#include "wine/heap.h" HRESULT do_ocx_reg(HMODULE hocx, BOOL do_reg, const WCHAR *flags, const WCHAR *param) DECLSPEC_HIDDEN; LPWSTR get_parameter(LPWSTR *params, WCHAR separator, BOOL quoted) DECLSPEC_HIDDEN; @@ -45,16 +29,6 @@ void set_ldids(HINF hInf, LPCWSTR pszInstallSection, LPCWSTR pszWorkingDir) DECL HRESULT launch_exe(LPCWSTR cmd, LPCWSTR dir, HANDLE *phEXE) DECLSPEC_HIDDEN; -static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size) -{ - return HeapAlloc(GetProcessHeap(), 0, size); -} - -static inline BOOL heap_free(void *mem) -{ - return HeapFree(GetProcessHeap(), 0, mem); -} - static inline char *heap_strdupWtoA(const WCHAR *str) { char *ret = NULL; diff --git a/dll/win32/advpack/files.c b/dll/win32/advpack/files.c index 0a5c680c16..c5efbb2564 100644 --- a/dll/win32/advpack/files.c +++ b/dll/win32/advpack/files.c @@ -18,10 +18,23 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <stdarg.h> +#include <stdlib.h> + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winreg.h" +#include "winver.h" +#include "winternl.h" +#include "setupapi.h" +#include "advpub.h" +#include "fdi.h" +#include "wine/debug.h" +#include "wine/unicode.h" #include "advpack_private.h" -#include <winver.h> -#include <fdi.h> +WINE_DEFAULT_DEBUG_CHANNEL(advpack); /* converts an ansi double null-terminated list to a unicode list */ static LPWSTR ansi_to_unicode_list(LPCSTR ansi_list) diff --git a/dll/win32/advpack/install.c b/dll/win32/advpack/install.c index a1e750a2f5..dcd1dd7b97 100644 --- a/dll/win32/advpack/install.c +++ b/dll/win32/advpack/install.c @@ -18,9 +18,23 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <stdarg.h> +#include <stdlib.h> + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winreg.h" +#include "winternl.h" +#include "winnls.h" +#include "setupapi.h" +#include "advpub.h" +#include "ole2.h" +#include "wine/debug.h" +#include "wine/unicode.h" #include "advpack_private.h" -#include <ole2.h> +WINE_DEFAULT_DEBUG_CHANNEL(advpack); #define SPAPI_ERROR 0xE0000000L #define SPAPI_PREFIX 0x800F0000L diff --git a/dll/win32/advpack/precomp.h b/dll/win32/advpack/precomp.h new file mode 100644 index 0000000000..a1c236fe33 --- /dev/null +++ b/dll/win32/advpack/precomp.h @@ -0,0 +1,23 @@ + +#ifndef _ADVPACK_PRECOMP_H +#define _ADVPACK_PRECOMP_H + +#include <stdarg.h> + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#include <windef.h> +#include <winbase.h> +#include <winuser.h> +#include <winreg.h> +#include <winternl.h> +#include <advpub.h> + +#include <wine/debug.h> +#include <wine/unicode.h> + +#include "advpack_private.h" + +#endif /* !_ADVPACK_PRECOMP_H */ diff --git a/dll/win32/advpack/reg.c b/dll/win32/advpack/reg.c index 2e467999e1..9a430159ec 100644 --- a/dll/win32/advpack/reg.c +++ b/dll/win32/advpack/reg.c @@ -18,7 +18,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "advpack_private.h" +#include <stdarg.h> +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "winerror.h" +#include "winuser.h" +#include "winternl.h" +#include "advpub.h" +#include "wine/unicode.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(advpack); static const WCHAR REGINST[] = {'R','E','G','I','N','S','T',0}; static const WCHAR Strings[] = {'S','t','r','i','n','g','s',0}; diff --git a/media/doc/README.WINE b/media/doc/README.WINE index ff96bab112..e37d01ddab 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -44,7 +44,7 @@ reactos/dll/directx/wine/wined3d # Synced to WineStaging-3.3 reactos/dll/win32/activeds # Synced to WineStaging-3.3 reactos/dll/win32/actxprxy # Synced to WineStaging-3.3 -reactos/dll/win32/advpack # Synced to WineStaging-2.9 +reactos/dll/win32/advpack # Synced to WineStaging-3.3 reactos/dll/win32/atl # Synced to Wine-3.0 reactos/dll/win32/atl80 # Synced to Wine-3.0 reactos/dll/win32/atl100 # Synced to Wine-3.0
6 years, 8 months
1
0
0
0
01/01: [ACTXPRXY] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=feea1bc5be337f08bce5f…
commit feea1bc5be337f08bce5f12a90f6623916cdc40e Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Fri Mar 9 12:40:09 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Fri Mar 9 12:40:09 2018 +0100 [ACTXPRXY] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/actxprxy/CMakeLists.txt | 8 ++++++-- dll/win32/actxprxy/precomp.h | 17 +++++++++++++++++ dll/win32/actxprxy/usrmarshal.c | 30 ++++++++++++------------------ media/doc/README.WINE | 2 +- 4 files changed, 36 insertions(+), 21 deletions(-) diff --git a/dll/win32/actxprxy/CMakeLists.txt b/dll/win32/actxprxy/CMakeLists.txt index 995f05237d..44672c94bb 100644 --- a/dll/win32/actxprxy/CMakeLists.txt +++ b/dll/win32/actxprxy/CMakeLists.txt @@ -20,7 +20,6 @@ add_rpcproxy_files( list(APPEND SOURCE usrmarshal.c - actxprxy.rc ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_activscp_p.c ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_comcat_p.c ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_docobj_p.c @@ -34,10 +33,15 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_shobjidl_p.c ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_urlhist_p.c ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c + precomp.h) + +add_library(actxprxy SHARED + ${SOURCE} + actxprxy.rc ${CMAKE_CURRENT_BINARY_DIR}/actxprxy.def) -add_library(actxprxy SHARED ${SOURCE}) set_module_type(actxprxy win32dll) target_link_libraries(actxprxy uuid wine ${PSEH_LIB}) add_importlibs(actxprxy rpcrt4 ole32 oleaut32 msvcrt kernel32 ntdll) +add_pch(actxprxy precomp.h SOURCE) add_cd_file(TARGET actxprxy DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/actxprxy/precomp.h b/dll/win32/actxprxy/precomp.h new file mode 100644 index 0000000000..81d80f00f3 --- /dev/null +++ b/dll/win32/actxprxy/precomp.h @@ -0,0 +1,17 @@ + +#ifndef _ACTXPRXY_PRECOMP_H_ +#define _ACTXPRXY_PRECOMP_H_ + +#define __midl_proxy +#define WIN32_NO_STATUS +#define WIN32_LEAN_AND_MEAN +#define DECLSPEC_HIDDEN + +#include <objbase.h> +#include <rpcproxy.h> +#include <rpc.h> +#include <rpcndr.h> +#include <windows.h> +#include <ole2.h> + +#endif /* !_ACTXPRXY_PRECOMP_H_ */ diff --git a/dll/win32/actxprxy/usrmarshal.c b/dll/win32/actxprxy/usrmarshal.c index d61a37ec9c..2a276f98e5 100644 --- a/dll/win32/actxprxy/usrmarshal.c +++ b/dll/win32/actxprxy/usrmarshal.c @@ -18,29 +18,23 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - #include <stdarg.h> -//#include <string.h> +#include <string.h> #define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include <windef.h> -#include <winbase.h> -//#include "wingdi.h" -//#include "winuser.h" -//#include "winerror.h" -#include <objbase.h> -//#include "servprov.h" -//#include "comcat.h" -//#include "docobj.h" -#include <shobjidl.h> +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" +#include "winerror.h" +#include "objbase.h" +#include "servprov.h" +#include "comcat.h" +#include "docobj.h" +#include "shobjidl.h" -#include <wine/debug.h> +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(actxprxy); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 50de61d5f4..ff96bab112 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -43,7 +43,7 @@ reactos/dll/directx/wine/quartz # Synced to WineStaging-3.3 reactos/dll/directx/wine/wined3d # Synced to WineStaging-3.3 reactos/dll/win32/activeds # Synced to WineStaging-3.3 -reactos/dll/win32/actxprxy # Synced to WineStaging-2.9 +reactos/dll/win32/actxprxy # Synced to WineStaging-3.3 reactos/dll/win32/advpack # Synced to WineStaging-2.9 reactos/dll/win32/atl # Synced to Wine-3.0 reactos/dll/win32/atl80 # Synced to Wine-3.0
6 years, 8 months
1
0
0
0
01/01: [ACTIVEDS] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7bfbe4f57a92b1eff8894…
commit 7bfbe4f57a92b1eff88942984b10e62b0592c6f0 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Fri Mar 9 12:38:15 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Fri Mar 9 12:38:37 2018 +0100 [ACTIVEDS] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/activeds/activeds_main.c | 16 +++++++++++++--- dll/win32/activeds/precomp.h | 3 ++- media/doc/README.WINE | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/dll/win32/activeds/activeds_main.c b/dll/win32/activeds/activeds_main.c index bb05cad564..15a329e99c 100644 --- a/dll/win32/activeds/activeds_main.c +++ b/dll/win32/activeds/activeds_main.c @@ -21,11 +21,21 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdarg.h> -#include <iads.h> +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" + +#include "objbase.h" +#include "iads.h" +#include "adshlp.h" + +#include "wine/unicode.h" +#include "wine/debug.h" -#include <wine/debug.h> WINE_DEFAULT_DEBUG_CHANNEL(activeds); /***************************************************** diff --git a/dll/win32/activeds/precomp.h b/dll/win32/activeds/precomp.h index 9edfce3faf..e91f4cf153 100644 --- a/dll/win32/activeds/precomp.h +++ b/dll/win32/activeds/precomp.h @@ -1,3 +1,4 @@ + #ifndef _ACTIVEDS_PCH_ #define _ACTIVEDS_PCH_ @@ -14,4 +15,4 @@ #include <winbase.h> #include <objbase.h> -#endif /* _ACTIVEDS_PCH_ */ +#endif /* !_ACTIVEDS_PCH_ */ diff --git a/media/doc/README.WINE b/media/doc/README.WINE index cd4452c42d..50de61d5f4 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -42,7 +42,7 @@ reactos/dll/directx/wine/qedit # Synced to WineStaging-3.3 reactos/dll/directx/wine/quartz # Synced to WineStaging-3.3 reactos/dll/directx/wine/wined3d # Synced to WineStaging-3.3 -reactos/dll/win32/activeds # Synced to WineStaging-2.9 +reactos/dll/win32/activeds # Synced to WineStaging-3.3 reactos/dll/win32/actxprxy # Synced to WineStaging-2.9 reactos/dll/win32/advpack # Synced to WineStaging-2.9 reactos/dll/win32/atl # Synced to Wine-3.0
6 years, 8 months
1
0
0
0
01/01: [USER32] ForceResetUserApiHook is WINAPI, not FASTCALL. CORE-14450
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c7c36702d2a49a6242e6e…
commit c7c36702d2a49a6242e6ec2ffe308f5956af55fc Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Fri Mar 9 09:06:08 2018 +0100 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Fri Mar 9 09:06:12 2018 +0100 [USER32] ForceResetUserApiHook is WINAPI, not FASTCALL. CORE-14450 Fixes stack pointer corruption when using Windows's uxtheme.dll. --- sdk/include/reactos/undocuser.h | 2 +- win32ss/user/user32/misc/usrapihk.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/include/reactos/undocuser.h b/sdk/include/reactos/undocuser.h index dbe93b2ac9..f130e6b1a9 100644 --- a/sdk/include/reactos/undocuser.h +++ b/sdk/include/reactos/undocuser.h @@ -229,7 +229,7 @@ typedef BOOL (WINAPI *ADJUSTWINDOWRECTEX)(LPRECT,DWORD,BOOL,DWORD); typedef int (WINAPI *GETSYSTEMMETRICS)(int); typedef BOOL (WINAPI *SYSTEMPARAMETERSINFOA)(UINT,UINT,PVOID,UINT); typedef BOOL (WINAPI *SYSTEMPARAMETERSINFOW)(UINT,UINT,PVOID,UINT); -typedef BOOL (__fastcall *FORCERESETUSERAPIHOOK)(HINSTANCE); +typedef BOOL (WINAPI *FORCERESETUSERAPIHOOK)(HINSTANCE); typedef BOOL (WINAPI *DRAWFRAMECONTROL)(HDC,LPRECT,UINT,UINT); typedef BOOL (WINAPI *DRAWCAPTION)(HWND,HDC,LPCRECT,UINT); typedef BOOL (WINAPI *MDIREDRAWFRAME)(HWND,DWORD); diff --git a/win32ss/user/user32/misc/usrapihk.c b/win32ss/user/user32/misc/usrapihk.c index 8b5d264ee8..c2e91d5f3d 100644 --- a/win32ss/user/user32/misc/usrapihk.c +++ b/win32ss/user/user32/misc/usrapihk.c @@ -113,7 +113,7 @@ BeginIfHookedUserApiHook(VOID) } BOOL -FASTCALL +WINAPI ForceResetUserApiHook(HINSTANCE hInstance) { if ( ghmodUserApiHook == hInstance &&
6 years, 8 months
1
0
0
0
01/01: [QUARTZ_WINETEST] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=af9960ca99f04f1af9d28…
commit af9960ca99f04f1af9d28e114af3cab796010594 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Mar 8 13:47:02 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Thu Mar 8 13:47:02 2018 +0100 [QUARTZ_WINETEST] Sync with Wine Staging 3.3. CORE-14434 --- modules/rostests/winetests/quartz/filtergraph.c | 615 +++++++++++------------- 1 file changed, 281 insertions(+), 334 deletions(-) diff --git a/modules/rostests/winetests/quartz/filtergraph.c b/modules/rostests/winetests/quartz/filtergraph.c index 5fd3107208..a1ece9489f 100644 --- a/modules/rostests/winetests/quartz/filtergraph.c +++ b/modules/rostests/winetests/quartz/filtergraph.c @@ -67,22 +67,23 @@ static WCHAR *load_resource(const WCHAR *name) return pathW; } -static IGraphBuilder *pgraph; - -static int createfiltergraph(void) +static IFilterGraph2 *create_graph(void) { - return S_OK == CoCreateInstance( - &CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IGraphBuilder, (LPVOID*)&pgraph); + IFilterGraph2 *ret; + HRESULT hr; + hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (void **)&ret); + ok(hr == S_OK, "Failed to create FilterGraph: %#x\n", hr); + return ret; } -static void test_basic_video(void) +static void test_basic_video(IFilterGraph2 *graph) { IBasicVideo* pbv; LONG video_width, video_height, window_width; LONG left, top, width, height; HRESULT hr; - hr = IGraphBuilder_QueryInterface(pgraph, &IID_IBasicVideo, (LPVOID*)&pbv); + hr = IFilterGraph2_QueryInterface(graph, &IID_IBasicVideo, (void **)&pbv); ok(hr==S_OK, "Cannot get IBasicVideo interface returned: %x\n", hr); /* test get video size */ @@ -283,103 +284,268 @@ static void test_basic_video(void) IBasicVideo_Release(pbv); } -static void rungraph(void) +static void test_media_seeking(IFilterGraph2 *graph) { + IMediaSeeking *seeking; + IMediaFilter *filter; + LONGLONG pos, stop, duration; + GUID format; HRESULT hr; - IMediaControl* pmc; - IMediaEvent* pme; - IMediaFilter* pmf; - HANDLE hEvent; - hr = IGraphBuilder_QueryInterface(pgraph, &IID_IMediaControl, (LPVOID*)&pmc); - ok(hr==S_OK, "Cannot get IMediaControl interface returned: %x\n", hr); + IFilterGraph2_SetDefaultSyncSource(graph); + hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaSeeking, (void **)&seeking); + ok(hr == S_OK, "QueryInterface(IMediaControl) failed: %08x\n", hr); - hr = IGraphBuilder_QueryInterface(pgraph, &IID_IMediaFilter, (LPVOID*)&pmf); - ok(hr==S_OK, "Cannot get IMediaFilter interface returned: %x\n", hr); + hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaFilter, (void **)&filter); + ok(hr == S_OK, "QueryInterface(IMediaFilter) failed: %08x\n", hr); - IMediaControl_Stop(pmc); + format = GUID_NULL; + hr = IMediaSeeking_GetTimeFormat(seeking, &format); + ok(hr == S_OK, "GetTimeFormat failed: %#x\n", hr); + ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "got %s\n", wine_dbgstr_guid(&format)); - IMediaFilter_SetSyncSource(pmf, NULL); + pos = 0xdeadbeef; + hr = IMediaSeeking_ConvertTimeFormat(seeking, &pos, NULL, 0x123456789a, NULL); + ok(hr == S_OK, "ConvertTimeFormat failed: %#x\n", hr); + ok(pos == 0x123456789a, "got %s\n", wine_dbgstr_longlong(pos)); - IMediaFilter_Release(pmf); + pos = 0xdeadbeef; + hr = IMediaSeeking_ConvertTimeFormat(seeking, &pos, &TIME_FORMAT_MEDIA_TIME, 0x123456789a, NULL); + ok(hr == S_OK, "ConvertTimeFormat failed: %#x\n", hr); + ok(pos == 0x123456789a, "got %s\n", wine_dbgstr_longlong(pos)); - test_basic_video(); + pos = 0xdeadbeef; + hr = IMediaSeeking_ConvertTimeFormat(seeking, &pos, NULL, 0x123456789a, &TIME_FORMAT_MEDIA_TIME); + ok(hr == S_OK, "ConvertTimeFormat failed: %#x\n", hr); + ok(pos == 0x123456789a, "got %s\n", wine_dbgstr_longlong(pos)); - hr = IMediaControl_Run(pmc); - ok(hr==S_FALSE, "Cannot run the graph returned: %x\n", hr); + hr = IMediaSeeking_GetCurrentPosition(seeking, &pos); + ok(hr == S_OK, "GetCurrentPosition failed: %#x\n", hr); + ok(pos == 0, "got %s\n", wine_dbgstr_longlong(pos)); - Sleep(10); - /* Crash fun */ - trace("run -> stop\n"); - hr = IMediaControl_Stop(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot stop the graph returned: %x\n", hr); + hr = IMediaSeeking_GetDuration(seeking, &duration); + ok(hr == S_OK, "GetDuration failed: %#x\n", hr); + ok(duration > 0, "got %s\n", wine_dbgstr_longlong(duration)); - IGraphBuilder_SetDefaultSyncSource(pgraph); + hr = IMediaSeeking_GetStopPosition(seeking, &stop); + ok(hr == S_OK, "GetCurrentPosition failed: %08x\n", hr); + ok(stop == duration || stop == duration + 1, "expected %s, got %s\n", + wine_dbgstr_longlong(duration), wine_dbgstr_longlong(stop)); - Sleep(10); - trace("stop -> pause\n"); - hr = IMediaControl_Pause(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot pause the graph returned: %x\n", hr); + hr = IMediaSeeking_SetPositions(seeking, NULL, AM_SEEKING_ReturnTime, NULL, AM_SEEKING_NoPositioning); + ok(hr == S_OK, "SetPositions failed: %#x\n", hr); + hr = IMediaSeeking_SetPositions(seeking, NULL, AM_SEEKING_NoPositioning, NULL, AM_SEEKING_ReturnTime); + ok(hr == S_OK, "SetPositions failed: %#x\n", hr); - Sleep(10); - trace("pause -> run\n"); - hr = IMediaControl_Run(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot start the graph returned: %x\n", hr); + pos = 0; + hr = IMediaSeeking_SetPositions(seeking, &pos, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning); + ok(hr == S_OK, "SetPositions failed: %08x\n", hr); - Sleep(10); - trace("run -> pause\n"); - hr = IMediaControl_Pause(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot pause the graph returned: %x\n", hr); + IMediaFilter_SetSyncSource(filter, NULL); + pos = 0xdeadbeef; + hr = IMediaSeeking_GetCurrentPosition(seeking, &pos); + ok(hr == S_OK, "GetCurrentPosition failed: %08x\n", hr); + ok(pos == 0, "Position != 0 (%s)\n", wine_dbgstr_longlong(pos)); + IFilterGraph2_SetDefaultSyncSource(graph); - Sleep(10); - trace("pause -> stop\n"); - hr = IMediaControl_Stop(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot stop the graph returned: %x\n", hr); + IMediaSeeking_Release(seeking); + IMediaFilter_Release(filter); +} - Sleep(10); - trace("pause -> run\n"); - hr = IMediaControl_Run(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot start the graph returned: %x\n", hr); +static void test_state_change(IFilterGraph2 *graph) +{ + IMediaControl *control; + OAFilterState state; + HRESULT hr; + + hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); + ok(hr == S_OK, "QueryInterface(IMediaControl) failed: %x\n", hr); + + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "GetState() failed: %x\n", hr); + ok(state == State_Stopped, "wrong state %d\n", state); + + hr = IMediaControl_Run(control); + ok(SUCCEEDED(hr), "Run() failed: %x\n", hr); + hr = IMediaControl_GetState(control, INFINITE, &state); + ok(SUCCEEDED(hr), "GetState() failed: %x\n", hr); + ok(state == State_Running, "wrong state %d\n", state); + + hr = IMediaControl_Stop(control); + ok(SUCCEEDED(hr), "Stop() failed: %x\n", hr); + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "GetState() failed: %x\n", hr); + ok(state == State_Stopped, "wrong state %d\n", state); + + hr = IMediaControl_Pause(control); + ok(SUCCEEDED(hr), "Pause() failed: %x\n", hr); + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "GetState() failed: %x\n", hr); + ok(state == State_Paused, "wrong state %d\n", state); + + hr = IMediaControl_Run(control); + ok(SUCCEEDED(hr), "Run() failed: %x\n", hr); + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "GetState() failed: %x\n", hr); + ok(state == State_Running, "wrong state %d\n", state); + + hr = IMediaControl_Pause(control); + ok(SUCCEEDED(hr), "Pause() failed: %x\n", hr); + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "GetState() failed: %x\n", hr); + ok(state == State_Paused, "wrong state %d\n", state); + + hr = IMediaControl_Stop(control); + ok(SUCCEEDED(hr), "Stop() failed: %x\n", hr); + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "GetState() failed: %x\n", hr); + ok(state == State_Stopped, "wrong state %d\n", state); + + IMediaControl_Release(control); +} + +static void test_media_event(IFilterGraph2 *graph) +{ + IMediaEvent *media_event; + IMediaSeeking *seeking; + IMediaControl *control; + IMediaFilter *filter; + LONG_PTR lparam1, lparam2; + LONGLONG current, stop; + OAFilterState state; + int got_eos = 0; + HANDLE event; + HRESULT hr; + LONG code; + + hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaFilter, (void **)&filter); + ok(hr == S_OK, "QueryInterface(IMediaFilter) failed: %#x\n", hr); + + hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); + ok(hr == S_OK, "QueryInterface(IMediaControl) failed: %#x\n", hr); + + hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (void **)&media_event); + ok(hr == S_OK, "QueryInterface(IMediaEvent) failed: %#x\n", hr); + + hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaSeeking, (void **)&seeking); + ok(hr == S_OK, "QueryInterface(IMediaEvent) failed: %#x\n", hr); - trace("run -> stop\n"); - hr = IMediaControl_Stop(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot stop the graph returned: %x\n", hr); + hr = IMediaControl_Stop(control); + ok(SUCCEEDED(hr), "Stop() failed: %#x\n", hr); + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "GetState() timed out\n"); - trace("stop -> run\n"); - hr = IMediaControl_Run(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot start the graph returned: %x\n", hr); + hr = IMediaSeeking_GetDuration(seeking, &stop); + ok(hr == S_OK, "GetDuration() failed: %#x\n", hr); + current = 0; + hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, &stop, AM_SEEKING_AbsolutePositioning); + ok(hr == S_OK, "SetPositions() failed: %#x\n", hr); + + hr = IMediaFilter_SetSyncSource(filter, NULL); + ok(hr == S_OK, "SetSyncSource() failed: %#x\n", hr); + + hr = IMediaEvent_GetEventHandle(media_event, (OAEVENT *)&event); + ok(hr == S_OK, "GetEventHandle() failed: %#x\n", hr); + + /* flush existing events */ + while ((hr = IMediaEvent_GetEvent(media_event, &code, &lparam1, &lparam2, 0)) == S_OK); + + ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "event should not be signaled\n"); + + hr = IMediaControl_Run(control); + ok(SUCCEEDED(hr), "Run() failed: %#x\n", hr); + + while (!got_eos) + { + if (WaitForSingleObject(event, 1000) == WAIT_TIMEOUT) + break; + + while ((hr = IMediaEvent_GetEvent(media_event, &code, &lparam1, &lparam2, 0)) == S_OK) + { + if (code == EC_COMPLETE) + { + got_eos = 1; + break; + } + } + } + ok(got_eos, "didn't get EOS\n"); - hr = IGraphBuilder_QueryInterface(pgraph, &IID_IMediaEvent, (LPVOID*)&pme); - ok(hr==S_OK, "Cannot get IMediaEvent interface returned: %x\n", hr); + hr = IMediaSeeking_GetCurrentPosition(seeking, ¤t); + ok(hr == S_OK, "GetCurrentPosition() failed: %#x\n", hr); +todo_wine + ok(current == stop, "expected %s, got %s\n", wine_dbgstr_longlong(stop), wine_dbgstr_longlong(current)); - hr = IMediaEvent_GetEventHandle(pme, (OAEVENT*)&hEvent); - ok(hr==S_OK, "Cannot get event handle returned: %x\n", hr); + hr = IMediaControl_Stop(control); + ok(SUCCEEDED(hr), "Run() failed: %#x\n", hr); + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "GetState() timed out\n"); - ok(WaitForSingleObject(hEvent, 2000) == WAIT_OBJECT_0, "Wait failed\n"); + hr = IFilterGraph2_SetDefaultSyncSource(graph); + ok(hr == S_OK, "SetDefaultSinkSource() failed: %#x\n", hr); - hr = IMediaEvent_Release(pme); - ok(hr==2, "Releasing mediaevent returned: %x\n", hr); + IMediaSeeking_Release(seeking); + IMediaEvent_Release(media_event); + IMediaControl_Release(control); + IMediaFilter_Release(filter); +} - hr = IMediaControl_Stop(pmc); - ok(hr==S_OK, "Cannot stop the graph returned: %x\n", hr); - - hr = IMediaControl_Release(pmc); - ok(hr==1, "Releasing mediacontrol returned: %x\n", hr); +static void rungraph(IFilterGraph2 *graph) +{ + test_basic_video(graph); + test_media_seeking(graph); + test_state_change(graph); + test_media_event(graph); } -static void releasefiltergraph(void) +static HRESULT test_graph_builder_connect(WCHAR *filename) { + static const WCHAR outputW[] = {'O','u','t','p','u','t',0}; + static const WCHAR inW[] = {'I','n',0}; + IBaseFilter *source_filter, *video_filter; + IPin *pin_in, *pin_out; + IFilterGraph2 *graph; + IVideoWindow *window; HRESULT hr; - hr = IGraphBuilder_Release(pgraph); - ok(hr==0, "Releasing filtergraph returned: %x\n", hr); + graph = create_graph(); + + hr = CoCreateInstance(&CLSID_VideoRenderer, NULL, CLSCTX_INPROC_SERVER, &IID_IVideoWindow, (void **)&window); + ok(hr == S_OK, "Failed to create VideoRenderer: %#x\n", hr); + + hr = IFilterGraph2_AddSourceFilter(graph, filename, NULL, &source_filter); + ok(hr == S_OK, "AddSourceFilter failed: %#x\n", hr); + + hr = IVideoWindow_QueryInterface(window, &IID_IBaseFilter, (void **)&video_filter); + ok(hr == S_OK, "QueryInterface(IBaseFilter) failed: %#x\n", hr); + hr = IFilterGraph2_AddFilter(graph, video_filter, NULL); + ok(hr == S_OK, "AddFilter failed: %#x\n", hr); + + hr = IBaseFilter_FindPin(source_filter, outputW, &pin_out); + ok(hr == S_OK, "FindPin failed: %#x\n", hr); + hr = IBaseFilter_FindPin(video_filter, inW, &pin_in); + ok(hr == S_OK, "FindPin failed: %#x\n", hr); + hr = IFilterGraph2_Connect(graph, pin_out, pin_in); + + if (SUCCEEDED(hr)) + rungraph(graph); + + IPin_Release(pin_in); + IPin_Release(pin_out); + IBaseFilter_Release(source_filter); + IBaseFilter_Release(video_filter); + IVideoWindow_Release(window); + IFilterGraph2_Release(graph); + + return hr; } static void test_render_run(const WCHAR *file) { + IFilterGraph2 *graph; HANDLE h; HRESULT hr; - + LONG refs; WCHAR *filename = load_resource(file); h = CreateFileW(filename, 0, 0, NULL, OPEN_EXISTING, 0, NULL); @@ -390,22 +556,33 @@ static void test_render_run(const WCHAR *file) } CloseHandle(h); - if (!createfiltergraph()) - { - DeleteFileW(filename); - return; - } + trace("running %s\n", wine_dbgstr_w(file)); - hr = IGraphBuilder_RenderFile(pgraph, filename, NULL); - if (hr == VFW_E_CANNOT_RENDER) + graph = create_graph(); + + hr = IFilterGraph2_RenderFile(graph, filename, NULL); + if (FAILED(hr)) + { skip("%s: codec not supported; skipping test\n", wine_dbgstr_w(file)); + + refs = IFilterGraph2_Release(graph); + ok(!refs, "Graph has %u references\n", refs); + + hr = test_graph_builder_connect(filename); +todo_wine + ok(hr == VFW_E_CANNOT_CONNECT, "got %#x\n", hr); + } else { ok(hr == S_OK || hr == VFW_S_AUDIO_NOT_RENDERED, "RenderFile failed: %x\n", hr); - rungraph(); - } + rungraph(graph); + + refs = IFilterGraph2_Release(graph); + ok(!refs, "Graph has %u references\n", refs); - releasefiltergraph(); + hr = test_graph_builder_connect(filename); + ok(hr == S_OK || hr == VFW_S_PARTIAL_RENDER, "got %#x\n", hr); + } /* check reference leaks */ h = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); @@ -417,83 +594,41 @@ static void test_render_run(const WCHAR *file) static DWORD WINAPI call_RenderFile_multithread(LPVOID lParam) { - IFilterGraph2 *filter_graph = lParam; + WCHAR *filename = load_resource(avifile); + IFilterGraph2 *graph = lParam; HRESULT hr; - WCHAR mp3file[] = {'t','e','s','t','.','m','p','3',0}; - HANDLE handle; - handle = CreateFileW(mp3file, 0, 0, NULL, CREATE_ALWAYS, 0, NULL); - if (handle == INVALID_HANDLE_VALUE) - { - skip("Could not read test file %s, skipping test\n", wine_dbgstr_w(mp3file)); - return 1; - } - CloseHandle(handle); + hr = IFilterGraph2_RenderFile(graph, filename, NULL); +todo_wine + ok(SUCCEEDED(hr), "RenderFile failed: %x\n", hr); - hr = IFilterGraph2_RenderFile(filter_graph, mp3file, NULL); - todo_wine ok(hr == VFW_E_CANNOT_RENDER || /* xp or older + DirectX 9 */ - hr == VFW_E_NO_TRANSPORT || /* win7 or newer */ - broken(hr == CLASS_E_CLASSNOTAVAILABLE), /* xp or older + DirectX 8 or older */ - "Expected 0x%08x or 0x%08x, returned 0x%08x\n", VFW_E_CANNOT_RENDER, VFW_E_NO_TRANSPORT, hr); + if (SUCCEEDED(hr)) + rungraph(graph); - DeleteFileW(mp3file); return 0; } static void test_render_with_multithread(void) { - HRESULT hr; - HMODULE hmod; - static HRESULT (WINAPI *pDllGetClassObject)(REFCLSID rclsid, REFIID riid, void **out); - IClassFactory *classfactory = NULL; - static IGraphBuilder *graph_builder; - static IFilterGraph2 *filter_graph; + IFilterGraph2 *graph; HANDLE thread; CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - hmod = LoadLibraryA("quartz.dll"); - if (!hmod) - { - skip("Fail to load quartz.dll.\n"); - return; - } + graph = create_graph(); - pDllGetClassObject = (void*)GetProcAddress(hmod, "DllGetClassObject"); - if (!pDllGetClassObject) - { - skip("Fail to get DllGetClassObject.\n"); - return; - } - - hr = pDllGetClassObject(&CLSID_FilterGraph, &IID_IClassFactory, (void **)&classfactory); - ok(hr == S_OK, "DllGetClassObject failed 0x%08x\n", hr); - if (FAILED(hr)) - { - skip("Can't create IClassFactory 0x%08x.\n", hr); - return; - } + thread = CreateThread(NULL, 0, call_RenderFile_multithread, graph, 0, NULL); - hr = IClassFactory_CreateInstance(classfactory, NULL, &IID_IUnknown, (LPVOID*)&graph_builder); - ok(hr == S_OK, "IClassFactory_CreateInstance failed 0x%08x\n", hr); - - hr = IGraphBuilder_QueryInterface(graph_builder, &IID_IFilterGraph2, (void**)&filter_graph); - ok(hr == S_OK, "IGraphBuilder_QueryInterface failed 0x%08x\n", hr); - - thread = CreateThread(NULL, 0, call_RenderFile_multithread, filter_graph, 0, NULL); - - WaitForSingleObject(thread, 1000); - IFilterGraph2_Release(filter_graph); - IGraphBuilder_Release(graph_builder); - IClassFactory_Release(classfactory); + ok(WaitForSingleObject(thread, 1000) == WAIT_OBJECT_0, "wait failed\n"); + IFilterGraph2_Release(graph); CloseHandle(thread); CoUninitialize(); - return; } static void test_graph_builder(void) { HRESULT hr; + IGraphBuilder *pgraph; IBaseFilter *pF = NULL; IBaseFilter *pF2 = NULL; IPin *pIn = NULL; @@ -502,8 +637,7 @@ static void test_graph_builder(void) static const WCHAR testFilterW[] = {'t','e','s','t','F','i','l','t','e','r',0}; static const WCHAR fooBarW[] = {'f','o','o','B','a','r',0}; - if (!createfiltergraph()) - return; + pgraph = (IGraphBuilder *)create_graph(); /* create video filter */ hr = CoCreateInstance(&CLSID_VideoRenderer, NULL, CLSCTX_INPROC_SERVER, @@ -551,125 +685,7 @@ static void test_graph_builder(void) if (pEnum) IEnumPins_Release(pEnum); if (pF) IBaseFilter_Release(pF); if (pF2) IBaseFilter_Release(pF2); - - releasefiltergraph(); -} - -static void test_graph_builder_addfilter(void) -{ - HRESULT hr; - IBaseFilter *pF = NULL; - static const WCHAR testFilterW[] = {'t','e','s','t','F','i','l','t','e','r',0}; - - if (!createfiltergraph()) - return; - - hr = IGraphBuilder_AddFilter(pgraph, NULL, testFilterW); - ok(hr == E_POINTER, "IGraphBuilder_AddFilter returned: %x\n", hr); - - /* create video filter */ - hr = CoCreateInstance(&CLSID_VideoRenderer, NULL, CLSCTX_INPROC_SERVER, - &IID_IBaseFilter, (LPVOID*)&pF); - ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); - ok(pF != NULL, "pF is NULL\n"); - if (!pF) { - skip("failed to created filter, skipping\n"); - return; - } - - hr = IGraphBuilder_AddFilter(pgraph, pF, NULL); - ok(hr == S_OK, "IGraphBuilder_AddFilter returned: %x\n", hr); - IBaseFilter_Release(pF); -} - -static void test_mediacontrol(void) -{ - HRESULT hr; - LONGLONG pos = 0xdeadbeef; - GUID format = GUID_NULL; - IMediaSeeking *seeking = NULL; - IMediaFilter *filter = NULL; - IMediaControl *control = NULL; - - IGraphBuilder_SetDefaultSyncSource(pgraph); - hr = IGraphBuilder_QueryInterface(pgraph, &IID_IMediaSeeking, (void**) &seeking); - ok(hr == S_OK, "QueryInterface IMediaControl failed: %08x\n", hr); - if (FAILED(hr)) - return; - - hr = IGraphBuilder_QueryInterface(pgraph, &IID_IMediaFilter, (void**) &filter); - ok(hr == S_OK, "QueryInterface IMediaFilter failed: %08x\n", hr); - if (FAILED(hr)) - { - IMediaSeeking_Release(seeking); - return; - } - - hr = IGraphBuilder_QueryInterface(pgraph, &IID_IMediaControl, (void**) &control); - ok(hr == S_OK, "QueryInterface IMediaControl failed: %08x\n", hr); - if (FAILED(hr)) - { - IMediaSeeking_Release(seeking); - IMediaFilter_Release(filter); - return; - } - - format = GUID_NULL; - hr = IMediaSeeking_GetTimeFormat(seeking, &format); - ok(hr == S_OK, "GetTimeFormat failed: %08x\n", hr); - ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "GetTimeFormat: unexpected format %s\n", wine_dbgstr_guid(&format)); - - pos = 0xdeadbeef; - hr = IMediaSeeking_ConvertTimeFormat(seeking, &pos, NULL, 0x123456789a, NULL); - ok(hr == S_OK, "ConvertTimeFormat failed: %08x\n", hr); - ok(pos == 0x123456789a, "ConvertTimeFormat: expected 123456789a, got (%s)\n", wine_dbgstr_longlong(pos)); - - pos = 0xdeadbeef; - hr = IMediaSeeking_ConvertTimeFormat(seeking, &pos, &TIME_FORMAT_MEDIA_TIME, 0x123456789a, NULL); - ok(hr == S_OK, "ConvertTimeFormat failed: %08x\n", hr); - ok(pos == 0x123456789a, "ConvertTimeFormat: expected 123456789a, got (%s)\n", wine_dbgstr_longlong(pos)); - - pos = 0xdeadbeef; - hr = IMediaSeeking_ConvertTimeFormat(seeking, &pos, NULL, 0x123456789a, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "ConvertTimeFormat failed: %08x\n", hr); - ok(pos == 0x123456789a, "ConvertTimeFormat: expected 123456789a, got (%s)\n", wine_dbgstr_longlong(pos)); - - hr = IMediaSeeking_GetCurrentPosition(seeking, &pos); - ok(hr == S_OK, "GetCurrentPosition failed: %08x\n", hr); - ok(pos == 0, "Position != 0 (%s)\n", wine_dbgstr_longlong(pos)); - - hr = IMediaSeeking_SetPositions(seeking, NULL, AM_SEEKING_ReturnTime, NULL, AM_SEEKING_NoPositioning); - ok(hr == S_OK, "SetPositions failed: %08x\n", hr); - hr = IMediaSeeking_SetPositions(seeking, NULL, AM_SEEKING_NoPositioning, NULL, AM_SEEKING_ReturnTime); - ok(hr == S_OK, "SetPositions failed: %08x\n", hr); - - IMediaFilter_SetSyncSource(filter, NULL); - pos = 0xdeadbeef; - hr = IMediaSeeking_GetCurrentPosition(seeking, &pos); - ok(hr == S_OK, "GetCurrentPosition failed: %08x\n", hr); - ok(pos == 0, "Position != 0 (%s)\n", wine_dbgstr_longlong(pos)); - - hr = IMediaControl_GetState(control, 1000, NULL); - ok(hr == E_POINTER, "GetState expected %08x, got %08x\n", E_POINTER, hr); - - IMediaControl_Release(control); - IMediaSeeking_Release(seeking); - IMediaFilter_Release(filter); - releasefiltergraph(); -} - -static void test_filter_graph2(void) -{ - HRESULT hr; - IFilterGraph2 *pF = NULL; - - hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, - &IID_IFilterGraph2, (LPVOID*)&pF); - ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); - ok(pF != NULL, "pF is NULL\n"); - - hr = IFilterGraph2_Release(pF); - ok(hr == 0, "IFilterGraph2_Release returned: %x\n", hr); + IGraphBuilder_Release(pgraph); } /* IEnumMediaTypes implementation (supporting code for Render() test.) */ @@ -1809,12 +1825,10 @@ static HRESULT get_connected_filter_name(TestFilterImpl *pFilter, char *FilterNa hr = IPin_ConnectedTo(pFilter->ppPins[0], &pin); ok(hr == S_OK, "IPin_ConnectedTo failed with %x\n", hr); - if (FAILED(hr)) return hr; hr = IPin_QueryPinInfo(pin, &pinInfo); ok(hr == S_OK, "IPin_QueryPinInfo failed with %x\n", hr); IPin_Release(pin); - if (FAILED(hr)) return hr; SetLastError(0xdeadbeef); hr = IBaseFilter_QueryFilterInfo(pinInfo.pFilter, &filterInfo); @@ -1825,7 +1839,6 @@ static HRESULT get_connected_filter_name(TestFilterImpl *pFilter, char *FilterNa } ok(hr == S_OK, "IBaseFilter_QueryFilterInfo failed with %x\n", hr); IBaseFilter_Release(pinInfo.pFilter); - if (FAILED(hr)) return hr; IFilterGraph_Release(filterInfo.pGraph); @@ -1924,30 +1937,24 @@ static void test_render_filter_priority(void) * (one is "exact" match, other is "wildcard" match. Seems to depend * on the order in which filters are added to the graph, thus indicating * no preference given to exact match. */ - hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (LPVOID*)&pgraph2); - ok(hr == S_OK, "CoCreateInstance failed with %08x\n", hr); - if (!pgraph2) return; + pgraph2 = create_graph(); hr = createtestfilter(&GUID_NULL, PinData1, &ptestfilter); ok(hr == S_OK, "createtestfilter failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter->IBaseFilter_iface, wszFilterInstanceName1); ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); hr = createtestfilter(&GUID_NULL, PinData2, &ptestfilter2); ok(hr == S_OK, "createtestfilter failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName2); ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface); - ptestfilter2 = NULL; hr = createtestfilter(&GUID_NULL, PinData3, &ptestfilter2); ok(hr == S_OK, "createtestfilter failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName3); ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); @@ -1958,42 +1965,27 @@ static void test_render_filter_priority(void) hr = get_connected_filter_name(ptestfilter, ConnectedFilterName1); IFilterGraph2_Release(pgraph2); - pgraph2 = NULL; IBaseFilter_Release(&ptestfilter->IBaseFilter_iface); - ptestfilter = NULL; IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface); - ptestfilter2 = NULL; - - if (hr == E_NOTIMPL) - { - win_skip("Needed functions are not implemented\n"); - return; - } - hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (LPVOID*)&pgraph2); - ok(hr == S_OK, "CoCreateInstance failed with %08x\n", hr); - if (!pgraph2) goto out; + pgraph2 = create_graph(); hr = createtestfilter(&GUID_NULL, PinData1, &ptestfilter); ok(hr == S_OK, "createtestfilter failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter->IBaseFilter_iface, wszFilterInstanceName1); ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); hr = createtestfilter(&GUID_NULL, PinData3, &ptestfilter2); ok(hr == S_OK, "createtestfilter failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName3); ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface); - ptestfilter2 = NULL; hr = createtestfilter(&GUID_NULL, PinData2, &ptestfilter2); ok(hr == S_OK, "createtestfilter failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName2); ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); @@ -2009,50 +2001,39 @@ static void test_render_filter_priority(void) "expected connected filters to be different but got %s both times\n", ConnectedFilterName1); IFilterGraph2_Release(pgraph2); - pgraph2 = NULL; IBaseFilter_Release(&ptestfilter->IBaseFilter_iface); - ptestfilter = NULL; IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface); - ptestfilter2 = NULL; /* Test if any preference is given to existing renderer which renders the pin directly vs an existing renderer which renders the pin indirectly, through an additional middle filter, again trying different orders of creation. Native appears not to give a preference. */ - hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (LPVOID*)&pgraph2); - ok(hr == S_OK, "CoCreateInstance failed with %08x\n", hr); - if (!pgraph2) goto out; + pgraph2 = create_graph(); hr = createtestfilter(&GUID_NULL, PinData1, &ptestfilter); ok(hr == S_OK, "createtestfilter failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter->IBaseFilter_iface, wszFilterInstanceName1); ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); hr = createtestfilter(&GUID_NULL, PinData2, &ptestfilter2); ok(hr == S_OK, "createtestfilter failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName2); ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface); - ptestfilter2 = NULL; hr = createtestfilter(&GUID_NULL, PinData4, &ptestfilter2); ok(hr == S_OK, "createtestfilter failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName3); ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface); - ptestfilter2 = NULL; hr = createtestfilter(&GUID_NULL, PinData5, &ptestfilter2); ok(hr == S_OK, "createtestfilter failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName4); ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); @@ -2065,46 +2046,35 @@ static void test_render_filter_priority(void) "unexpected connected filter: %s\n", ConnectedFilterName1); IFilterGraph2_Release(pgraph2); - pgraph2 = NULL; IBaseFilter_Release(&ptestfilter->IBaseFilter_iface); - ptestfilter = NULL; IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface); - ptestfilter2 = NULL; - hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (LPVOID*)&pgraph2); - ok(hr == S_OK, "CoCreateInstance failed with %08x\n", hr); - if (!pgraph2) goto out; + pgraph2 = create_graph(); hr = createtestfilter(&GUID_NULL, PinData1, &ptestfilter); ok(hr == S_OK, "createtestfilter failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter->IBaseFilter_iface, wszFilterInstanceName1); ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); hr = createtestfilter(&GUID_NULL, PinData4, &ptestfilter2); ok(hr == S_OK, "createtestfilter failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName3); ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface); - ptestfilter2 = NULL; hr = createtestfilter(&GUID_NULL, PinData5, &ptestfilter2); ok(hr == S_OK, "createtestfilter failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName4); ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface); - ptestfilter2 = NULL; hr = createtestfilter(&GUID_NULL, PinData2, &ptestfilter2); ok(hr == S_OK, "createtestfilter failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName2); ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); @@ -2119,24 +2089,17 @@ static void test_render_filter_priority(void) "expected connected filters to be different but got %s both times\n", ConnectedFilterName1); IFilterGraph2_Release(pgraph2); - pgraph2 = NULL; IBaseFilter_Release(&ptestfilter->IBaseFilter_iface); - ptestfilter = NULL; IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface); - ptestfilter2 = NULL; /* Test if renderers are tried before non-renderers (intermediary filters). */ - hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (LPVOID*)&pgraph2); - ok(hr == S_OK, "CoCreateInstance failed with %08x\n", hr); - if (!pgraph2) goto out; + pgraph2 = create_graph(); hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterMapper2, (LPVOID*)&pMapper2); ok(hr == S_OK, "CoCreateInstance failed with %08x\n", hr); - if (!pMapper2) goto out; hr = createtestfilter(&GUID_NULL, PinData1, &ptestfilter); ok(hr == S_OK, "createtestfilter failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter->IBaseFilter_iface, wszFilterInstanceName1); ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); @@ -2146,17 +2109,14 @@ static void test_render_filter_priority(void) (IUnknown *)&Filter1ClassFactory.IClassFactory_iface, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie1); ok(hr == S_OK, "CoRegisterClassObject failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = CoRegisterClassObject(Filter2ClassFactory.clsid, (IUnknown *)&Filter2ClassFactory.IClassFactory_iface, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie2); ok(hr == S_OK, "CoRegisterClassObject failed with %08x\n", hr); - if (FAILED(hr)) goto out; hr = CoRegisterClassObject(Filter3ClassFactory.clsid, (IUnknown *)&Filter3ClassFactory.IClassFactory_iface, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie3); ok(hr == S_OK, "CoRegisterClassObject failed with %08x\n", hr); - if (FAILED(hr)) goto out; rgf2.dwVersion = 2; rgf2.dwMerit = MERIT_UNLIKELY; @@ -2223,12 +2183,9 @@ static void test_render_filter_priority(void) ok(hr == S_OK, "IFilterMapper2_UnregisterFilter failed with %x\n", hr); } - out: - - if (ptestfilter) IBaseFilter_Release(&ptestfilter->IBaseFilter_iface); - if (ptestfilter2) IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface); - if (pgraph2) IFilterGraph2_Release(pgraph2); - if (pMapper2) IFilterMapper2_Release(pMapper2); + IBaseFilter_Release(&ptestfilter->IBaseFilter_iface); + IFilterGraph2_Release(pgraph2); + IFilterMapper2_Release(pMapper2); hr = CoRevokeClassObject(cookie1); ok(hr == S_OK, "CoRevokeClassObject failed with %08x\n", hr); @@ -2332,21 +2289,11 @@ static void test_aggregate_filter_graph(void) START_TEST(filtergraph) { - HRESULT hr; CoInitializeEx(NULL, COINIT_MULTITHREADED); - hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, - &IID_IGraphBuilder, (LPVOID*)&pgraph); - if (FAILED(hr)) { - skip("Creating filtergraph returned %08x, skipping tests\n", hr); - return; - } - IGraphBuilder_Release(pgraph); + test_render_run(avifile); test_render_run(mpegfile); test_graph_builder(); - test_graph_builder_addfilter(); - test_mediacontrol(); - test_filter_graph2(); test_render_filter_priority(); test_aggregate_filter_graph(); CoUninitialize();
6 years, 8 months
1
0
0
0
01/01: [QUARTZ] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=83d28845a1232edb1009c…
commit 83d28845a1232edb1009cb48f60a9d942284d3d1 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Mar 8 13:46:24 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Thu Mar 8 13:46:24 2018 +0100 [QUARTZ] Sync with Wine Staging 3.3. CORE-14434 --- dll/directx/wine/quartz/CMakeLists.txt | 4 +- dll/directx/wine/quartz/acmwrapper.c | 19 +++++ dll/directx/wine/quartz/avidec.c | 20 +++++ dll/directx/wine/quartz/avisplit.c | 17 ++++ dll/directx/wine/quartz/dsoundrender.c | 18 +++++ dll/directx/wine/quartz/enumfilters.c | 4 + dll/directx/wine/quartz/enummedia.c | 4 + dll/directx/wine/quartz/enummoniker.c | 6 ++ dll/directx/wine/quartz/enumregfilters.c | 6 ++ dll/directx/wine/quartz/filesource.c | 15 ++++ dll/directx/wine/quartz/filtergraph.c | 133 ++++++++++++++++++------------- dll/directx/wine/quartz/filtermapper.c | 23 +++++- dll/directx/wine/quartz/main.c | 6 ++ dll/directx/wine/quartz/memallocator.c | 11 ++- dll/directx/wine/quartz/mpegsplit.c | 16 +++- dll/directx/wine/quartz/nullrenderer.c | 18 +++++ dll/directx/wine/quartz/parser.c | 20 ++++- dll/directx/wine/quartz/pin.c | 19 +++-- dll/directx/wine/quartz/precomp.h | 29 +++++++ dll/directx/wine/quartz/quartz_private.h | 35 ++------ dll/directx/wine/quartz/regsvr.c | 24 +++++- dll/directx/wine/quartz/systemclock.c | 8 +- dll/directx/wine/quartz/videorenderer.c | 20 +++++ dll/directx/wine/quartz/vmr9.c | 22 ++++- dll/directx/wine/quartz/waveparser.c | 16 ++++ media/doc/README.WINE | 2 +- 26 files changed, 413 insertions(+), 102 deletions(-) diff --git a/dll/directx/wine/quartz/CMakeLists.txt b/dll/directx/wine/quartz/CMakeLists.txt index d750daef6d..8c12e38b85 100644 --- a/dll/directx/wine/quartz/CMakeLists.txt +++ b/dll/directx/wine/quartz/CMakeLists.txt @@ -35,7 +35,7 @@ list(APPEND SOURCE videorenderer.c vmr9.c waveparser.c - quartz_private.h) + precomp.h) add_library(quartz SHARED ${SOURCE} @@ -57,5 +57,5 @@ set_module_type(quartz win32dll) target_link_libraries(quartz strmbase strmiids uuid dxguid wine ${PSEH_LIB}) add_importlibs(quartz dsound msacm32 msvfw32 ole32 oleaut32 rpcrt4 user32 gdi32 advapi32 advapi32_vista shlwapi msvcrt kernel32 ntdll) add_dependencies(quartz dxsdk quartz_idlheader stdole2) -add_pch(quartz quartz_private.h SOURCE) +add_pch(quartz precomp.h SOURCE) add_cd_file(TARGET quartz DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/quartz/acmwrapper.c b/dll/directx/wine/quartz/acmwrapper.c index 686a23190f..3c1c7cffaa 100644 --- a/dll/directx/wine/quartz/acmwrapper.c +++ b/dll/directx/wine/quartz/acmwrapper.c @@ -18,7 +18,26 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" + #include "quartz_private.h" +#include "pin.h" + +#include "uuids.h" +#include "mmreg.h" +#include "windef.h" +#include "winbase.h" +#include "dshow.h" +#include "strmif.h" +#include "vfwmsgs.h" +#include "msacm.h" + +#include <assert.h> + +#include "wine/unicode.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); typedef struct ACMWrapperImpl { diff --git a/dll/directx/wine/quartz/avidec.c b/dll/directx/wine/quartz/avidec.c index 11964f4025..c9ca7606a5 100644 --- a/dll/directx/wine/quartz/avidec.c +++ b/dll/directx/wine/quartz/avidec.c @@ -18,7 +18,27 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" + #include "quartz_private.h" +#include "pin.h" + +#include "uuids.h" +#include "amvideo.h" +#include "windef.h" +#include "winbase.h" +#include "dshow.h" +#include "strmif.h" +#include "vfwmsgs.h" +#include "vfw.h" +#include "dvdmedia.h" + +#include <assert.h> + +#include "wine/unicode.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); typedef struct AVIDecImpl { diff --git a/dll/directx/wine/quartz/avisplit.c b/dll/directx/wine/quartz/avisplit.c index 0f5c2d72ed..f3eccedcfc 100644 --- a/dll/directx/wine/quartz/avisplit.c +++ b/dll/directx/wine/quartz/avisplit.c @@ -30,6 +30,21 @@ */ #include "quartz_private.h" +#include "pin.h" + +#include "uuids.h" +#include "vfw.h" +#include "aviriff.h" +#include "vfwmsgs.h" +#include "amvideo.h" + +#include "wine/unicode.h" +#include "wine/debug.h" + +#include <math.h> +#include <assert.h> + +#include "parser.h" #define TWOCCFromFOURCC(fcc) HIWORD(fcc) @@ -37,6 +52,8 @@ #define ckidINFO mmioFOURCC('I','N','F','O') #define ckidREC mmioFOURCC('R','E','C',' ') +WINE_DEFAULT_DEBUG_CHANNEL(quartz); + typedef struct StreamData { DWORD dwSampleSize; diff --git a/dll/directx/wine/quartz/dsoundrender.c b/dll/directx/wine/quartz/dsoundrender.c index 35daaefa79..7902955481 100644 --- a/dll/directx/wine/quartz/dsoundrender.c +++ b/dll/directx/wine/quartz/dsoundrender.c @@ -18,7 +18,25 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" + #include "quartz_private.h" +#include "pin.h" + +#include "uuids.h" +#include "vfwmsgs.h" +#include "windef.h" +#include "winbase.h" +#include "dshow.h" +#include "evcode.h" +#include "strmif.h" +#include "dsound.h" +#include "amaudio.h" + +#include "wine/unicode.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); /* NOTE: buffer can still be filled completely, * but we start waiting until only this amount is buffered diff --git a/dll/directx/wine/quartz/enumfilters.c b/dll/directx/wine/quartz/enumfilters.c index ea19f4e085..331991b84c 100644 --- a/dll/directx/wine/quartz/enumfilters.c +++ b/dll/directx/wine/quartz/enumfilters.c @@ -20,6 +20,10 @@ #include "quartz_private.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); + typedef struct IEnumFiltersImpl { IEnumFilters IEnumFilters_iface; diff --git a/dll/directx/wine/quartz/enummedia.c b/dll/directx/wine/quartz/enummedia.c index 32b42a6bd6..b3acc5d4e2 100644 --- a/dll/directx/wine/quartz/enummedia.c +++ b/dll/directx/wine/quartz/enummedia.c @@ -20,6 +20,10 @@ #include "quartz_private.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); + void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE * pmt) { if (!pmt) diff --git a/dll/directx/wine/quartz/enummoniker.c b/dll/directx/wine/quartz/enummoniker.c index a90e6a4ead..c0071a3360 100644 --- a/dll/directx/wine/quartz/enummoniker.c +++ b/dll/directx/wine/quartz/enummoniker.c @@ -18,8 +18,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#define COBJMACROS + #include "quartz_private.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); + typedef struct EnumMonikerImpl { IEnumMoniker IEnumMoniker_iface; diff --git a/dll/directx/wine/quartz/enumregfilters.c b/dll/directx/wine/quartz/enumregfilters.c index 033299b1d4..a116063268 100644 --- a/dll/directx/wine/quartz/enumregfilters.c +++ b/dll/directx/wine/quartz/enumregfilters.c @@ -20,6 +20,12 @@ #include "quartz_private.h" +#include "wine/unicode.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); + typedef struct IEnumRegFiltersImpl { IEnumRegFilters IEnumRegFilters_iface; diff --git a/dll/directx/wine/quartz/filesource.c b/dll/directx/wine/quartz/filesource.c index 39227a1747..4290ac351d 100644 --- a/dll/directx/wine/quartz/filesource.c +++ b/dll/directx/wine/quartz/filesource.c @@ -18,8 +18,23 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + #include "quartz_private.h" +#include "wine/debug.h" +#include "wine/unicode.h" +#include "pin.h" +#include "uuids.h" +#include "vfwmsgs.h" +#include "winbase.h" +#include "winreg.h" +#include "shlwapi.h" +#include <assert.h> + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); + static const WCHAR wszOutputPinName[] = { 'O','u','t','p','u','t',0 }; typedef struct AsyncReader diff --git a/dll/directx/wine/quartz/filtergraph.c b/dll/directx/wine/quartz/filtergraph.c index b6538ab16c..f482d4ef38 100644 --- a/dll/directx/wine/quartz/filtergraph.c +++ b/dll/directx/wine/quartz/filtergraph.c @@ -18,7 +18,28 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include <stdarg.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winreg.h" +#include "shlwapi.h" +#include "dshow.h" +#include "wine/debug.h" #include "quartz_private.h" +#include "ole2.h" +#include "olectl.h" +#include "strmif.h" +#include "vfwmsgs.h" +#include "evcode.h" +#include "wine/unicode.h" + + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); typedef struct { HWND hWnd; /* Target window */ @@ -179,7 +200,6 @@ typedef struct _IFilterGraphImpl { GUID timeformatseek; REFERENCE_TIME start_time; REFERENCE_TIME pause_time; - LONGLONG stop_position; LONG recursioncount; IUnknown *pSite; LONG version; @@ -1028,6 +1048,7 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut, if (IsEqualGUID(&clsid, &FilterCLSID)) { /* Skip filter (same as the one the output pin belongs to) */ IBaseFilter_Release(pfilter); + pfilter = NULL; goto error; } @@ -2458,52 +2479,6 @@ static HRESULT WINAPI MediaSeeking_GetDuration(IMediaSeeking *iface, LONGLONG *p return hr; } -static HRESULT WINAPI MediaSeeking_GetStopPosition(IMediaSeeking *iface, LONGLONG *pStop) -{ - IFilterGraphImpl *This = impl_from_IMediaSeeking(iface); - HRESULT hr = S_OK; - - TRACE("(%p/%p)->(%p)\n", This, iface, pStop); - - if (!pStop) - return E_POINTER; - - EnterCriticalSection(&This->cs); - if (This->stop_position < 0) - /* Stop position not set, use duration instead */ - hr = IMediaSeeking_GetDuration(iface, pStop); - else - *pStop = This->stop_position; - LeaveCriticalSection(&This->cs); - - return hr; -} - -static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONGLONG *pCurrent) -{ - IFilterGraphImpl *This = impl_from_IMediaSeeking(iface); - LONGLONG time = 0; - - if (!pCurrent) - return E_POINTER; - - EnterCriticalSection(&This->cs); - if (This->state == State_Running && This->refClock && This->start_time >= 0) - { - IReferenceClock_GetTime(This->refClock, &time); - if (time) - time -= This->start_time; - } - if (This->pause_time > 0) - time += This->pause_time; - *pCurrent = time; - LeaveCriticalSection(&This->cs); - - TRACE("Time: %u.%03u\n", (DWORD)(*pCurrent / 10000000), (DWORD)((*pCurrent / 10000)%1000)); - - return S_OK; -} - static HRESULT WINAPI MediaSeeking_ConvertTimeFormat(IMediaSeeking *iface, LONGLONG *pTarget, const GUID *pTargetFormat, LONGLONG Source, const GUID *pSourceFormat) { @@ -2556,11 +2531,6 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG * (dwCurrentFlags & 0x7) != AM_SEEKING_NoPositioning) FIXME("Adjust method %x not handled yet!\n", dwCurrentFlags & 0x7); - if ((dwStopFlags & 0x7) == AM_SEEKING_AbsolutePositioning) - This->stop_position = *pStop; - else if ((dwStopFlags & 0x7) != AM_SEEKING_NoPositioning) - FIXME("Stop position not handled yet!\n"); - if (state == State_Running && !(dwCurrentFlags & AM_SEEKING_NoFlush)) IMediaControl_Pause(&This->IMediaControl_iface); args.current = pCurrent; @@ -2578,16 +2548,68 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG * return hr; } +static HRESULT WINAPI found_getposition(IFilterGraphImpl *This, IMediaSeeking *seek, DWORD_PTR pargs) +{ + struct pos_args *args = (void*)pargs; + + return IMediaSeeking_GetPositions(seek, args->current, args->stop); +} + static HRESULT WINAPI MediaSeeking_GetPositions(IMediaSeeking *iface, LONGLONG *pCurrent, LONGLONG *pStop) { IFilterGraphImpl *This = impl_from_IMediaSeeking(iface); + struct pos_args args; + LONGLONG time = 0; HRESULT hr; TRACE("(%p/%p)->(%p, %p)\n", This, iface, pCurrent, pStop); - hr = IMediaSeeking_GetCurrentPosition(iface, pCurrent); - if (SUCCEEDED(hr)) - hr = IMediaSeeking_GetStopPosition(iface, pStop); + + args.current = pCurrent; + args.stop = pStop; + EnterCriticalSection(&This->cs); + hr = all_renderers_seek(This, found_getposition, (DWORD_PTR)&args); + if (This->state == State_Running && This->refClock && This->start_time >= 0) + { + IReferenceClock_GetTime(This->refClock, &time); + if (time) + time -= This->start_time; + } + if (This->pause_time > 0) + time += This->pause_time; + *pCurrent += time; + LeaveCriticalSection(&This->cs); + + return hr; +} + +static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONGLONG *pCurrent) +{ + LONGLONG time; + HRESULT hr; + + if (!pCurrent) + return E_POINTER; + + hr = MediaSeeking_GetPositions(iface, pCurrent, &time); + + TRACE("Time: %u.%03u\n", (DWORD)(*pCurrent / 10000000), (DWORD)((*pCurrent / 10000)%1000)); + + return hr; +} + +static HRESULT WINAPI MediaSeeking_GetStopPosition(IMediaSeeking *iface, LONGLONG *pStop) +{ + IFilterGraphImpl *This = impl_from_IMediaSeeking(iface); + LONGLONG time; + HRESULT hr; + + TRACE("(%p/%p)->(%p)\n", This, iface, pStop); + + if (!pStop) + return E_POINTER; + + hr = MediaSeeking_GetPositions(iface, &time, pStop); return hr; } @@ -5713,7 +5735,6 @@ HRESULT FilterGraph_create(IUnknown *pUnkOuter, LPVOID *ppObj) fimpl->nItfCacheEntries = 0; memcpy(&fimpl->timeformatseek, &TIME_FORMAT_MEDIA_TIME, sizeof(GUID)); fimpl->start_time = fimpl->pause_time = 0; - fimpl->stop_position = -1; fimpl->punkFilterMapper2 = NULL; fimpl->recursioncount = 0; fimpl->version = 0; diff --git a/dll/directx/wine/quartz/filtermapper.c b/dll/directx/wine/quartz/filtermapper.c index 98d3cab92a..2dd316d877 100644 --- a/dll/directx/wine/quartz/filtermapper.c +++ b/dll/directx/wine/quartz/filtermapper.c @@ -19,10 +19,29 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#define NONAMELESSUNION +#define NONAMELESSSTRUCT +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winreg.h" +#include "winerror.h" + #include "quartz_private.h" -#include <initguid.h> -#include <fil_data.h> +#include "ole2.h" +#include "olectl.h" +#include "strmif.h" +#include "wine/unicode.h" +#include "uuids.h" +#include "initguid.h" +#include "fil_data.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); #undef ARRAYSIZE #define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0])) diff --git a/dll/directx/wine/quartz/main.c b/dll/directx/wine/quartz/main.c index 5b373d5ab0..7c2accb9b2 100644 --- a/dll/directx/wine/quartz/main.c +++ b/dll/directx/wine/quartz/main.c @@ -17,7 +17,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include "wine/debug.h" + #include "quartz_private.h" +#include "wine/unicode.h" + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); extern HRESULT WINAPI QUARTZ_DllGetClassObject(REFCLSID, REFIID, LPVOID *) DECLSPEC_HIDDEN; extern HRESULT WINAPI QUARTZ_DllCanUnloadNow(void) DECLSPEC_HIDDEN; diff --git a/dll/directx/wine/quartz/memallocator.c b/dll/directx/wine/quartz/memallocator.c index 10aab46c27..f5ee3c29ef 100644 --- a/dll/directx/wine/quartz/memallocator.c +++ b/dll/directx/wine/quartz/memallocator.c @@ -18,9 +18,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <assert.h> +#include <limits.h> +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "vfwmsgs.h" + #include "quartz_private.h" +#include "wine/debug.h" -#include <wine/list.h> +WINE_DEFAULT_DEBUG_CHANNEL(quartz); typedef struct StdMediaSample2 { diff --git a/dll/directx/wine/quartz/mpegsplit.c b/dll/directx/wine/quartz/mpegsplit.c index 8d108f5382..c78046fff3 100644 --- a/dll/directx/wine/quartz/mpegsplit.c +++ b/dll/directx/wine/quartz/mpegsplit.c @@ -21,10 +21,24 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <assert.h> +#include <math.h> + #include "quartz_private.h" +#include "pin.h" + +#include "uuids.h" +#include "mmreg.h" +#include "mmsystem.h" + +#include "wine/winternl.h" + +#include "wine/unicode.h" +#include "wine/debug.h" -#include <strmif.h> +#include "parser.h" +WINE_DEFAULT_DEBUG_CHANNEL(quartz); #define SEQUENCE_HEADER_CODE 0xB3 #define PACK_START_CODE 0xBA diff --git a/dll/directx/wine/quartz/nullrenderer.c b/dll/directx/wine/quartz/nullrenderer.c index 432749a976..eccdfc6757 100644 --- a/dll/directx/wine/quartz/nullrenderer.c +++ b/dll/directx/wine/quartz/nullrenderer.c @@ -19,7 +19,25 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" + #include "quartz_private.h" +#include "pin.h" + +#include "uuids.h" +#include "vfwmsgs.h" +#include "amvideo.h" +#include "windef.h" +#include "winbase.h" +#include "dshow.h" +#include "evcode.h" +#include "strmif.h" +#include "ddraw.h" + +#include "wine/unicode.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); typedef struct NullRendererImpl { diff --git a/dll/directx/wine/quartz/parser.c b/dll/directx/wine/quartz/parser.c index 6f46ed7339..4b968a398c 100644 --- a/dll/directx/wine/quartz/parser.c +++ b/dll/directx/wine/quartz/parser.c @@ -20,6 +20,20 @@ */ #include "quartz_private.h" +#include "pin.h" + +#include "vfwmsgs.h" +#include "amvideo.h" + +#include "wine/unicode.h" +#include "wine/debug.h" + +#include <math.h> +#include <assert.h> + +#include "parser.h" + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0}; static const IMediaSeekingVtbl Parser_Seeking_Vtbl; @@ -143,8 +157,12 @@ HRESULT WINAPI Parser_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * return S_OK; } - if (!IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IVideoWindow)) + if (!IsEqualIID(riid, &IID_IPin) && + !IsEqualIID(riid, &IID_IVideoWindow) && + !IsEqualIID(riid, &IID_IAMFilterMiscFlags)) + { FIXME("No interface for %s!\n", qzdebugstr_guid(riid)); + } return E_NOINTERFACE; } diff --git a/dll/directx/wine/quartz/pin.c b/dll/directx/wine/quartz/pin.c index 738b1c0609..5197d5ceb9 100644 --- a/dll/directx/wine/quartz/pin.c +++ b/dll/directx/wine/quartz/pin.c @@ -19,6 +19,15 @@ */ #include "quartz_private.h" +#include "pin.h" + +#include "wine/debug.h" +#include "wine/unicode.h" +#include "uuids.h" +#include "vfwmsgs.h" +#include <assert.h> + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); #define ALIGNDOWN(value,boundary) ((value)/(boundary)*(boundary)) #define ALIGNUP(value,boundary) (ALIGNDOWN((value)+(boundary)-1, (boundary))) @@ -532,11 +541,7 @@ static void PullPin_Thread_Stop(PullPin *This) TRACE("(%p)->()\n", This); EnterCriticalSection(This->pin.pCritSec); - { - CloseHandle(This->hThread); - This->hThread = NULL; - SetEvent(This->hEventStateChanged); - } + SetEvent(This->hEventStateChanged); LeaveCriticalSection(This->pin.pCritSec); IBaseFilter_Release(This->pin.pinInfo.pFilter); @@ -822,6 +827,10 @@ HRESULT WINAPI PullPin_Disconnect(IPin *iface) } LeaveCriticalSection(This->pin.pCritSec); + WaitForSingleObject(This->hThread, INFINITE); + CloseHandle(This->hThread); + This->hThread = NULL; + return hr; } diff --git a/dll/directx/wine/quartz/precomp.h b/dll/directx/wine/quartz/precomp.h new file mode 100644 index 0000000000..5aa2020fd7 --- /dev/null +++ b/dll/directx/wine/quartz/precomp.h @@ -0,0 +1,29 @@ + +#ifndef _QUARTZ_PRECOMP_H_ +#define _QUARTZ_PRECOMP_H_ + +#include <wine/config.h> + +#include <assert.h> + +#define WIN32_LEAN_AND_MEAN +#define WIN32_NO_STATUS +#define _INC_WINDOWS + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "quartz_private.h" + +#include <dvdmedia.h> +#include <vfw.h> +#include <aviriff.h> +#include <shlwapi.h> + +#include <wine/unicode.h> +#include <wine/debug.h> + +#include "pin.h" +#include "parser.h" + +#endif /* !_QUARTZ_PRECOMP_H_ */ diff --git a/dll/directx/wine/quartz/quartz_private.h b/dll/directx/wine/quartz/quartz_private.h index 45565939a1..a9855e95ac 100644 --- a/dll/directx/wine/quartz/quartz_private.h +++ b/dll/directx/wine/quartz/quartz_private.h @@ -20,37 +20,18 @@ #ifndef __QUARTZ_PRIVATE_INCLUDED__ #define __QUARTZ_PRIVATE_INCLUDED__ -#include <wine/config.h> - #include <stdarg.h> -#include <assert.h> - -#define WIN32_LEAN_AND_MEAN -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H #define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include <windef.h> -#include <winbase.h> -#include <objbase.h> -#include <dshow.h> -#include <dvdmedia.h> -#include <vfw.h> -#include <aviriff.h> -#include <shlwapi.h> - -#include <wine/strmbase.h> -#include <wine/unicode.h> - -#include <wine/debug.h> -WINE_DEFAULT_DEBUG_CHANNEL(quartz); -#include "pin.h" -#include "parser.h" +#include "windef.h" +#include "winbase.h" +#include "wtypes.h" +#include "wingdi.h" +#include "winuser.h" +#include "dshow.h" +#include "wine/strmbase.h" +#include "wine/list.h" /* see IAsyncReader::Request on MSDN for the explanation of this */ #define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000) diff --git a/dll/directx/wine/quartz/regsvr.c b/dll/directx/wine/quartz/regsvr.c index e5b7abc10c..196e0649d8 100644 --- a/dll/directx/wine/quartz/regsvr.c +++ b/dll/directx/wine/quartz/regsvr.c @@ -18,9 +18,27 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "quartz_private.h" - -#include <uuids.h> +#define NONAMELESSUNION +#define NONAMELESSSTRUCT +#define COBJMACROS +#include <stdarg.h> +#include <string.h> + +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" +#include "winreg.h" +#include "winerror.h" + +#include "ole2.h" +#include "uuids.h" +#include "strmif.h" + +#include "wine/debug.h" +#include "wine/unicode.h" + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); /* * Near the bottom of this file are the exported DllRegisterServer and diff --git a/dll/directx/wine/quartz/systemclock.c b/dll/directx/wine/quartz/systemclock.c index 207bccb53a..1638e1117e 100644 --- a/dll/directx/wine/quartz/systemclock.c +++ b/dll/directx/wine/quartz/systemclock.c @@ -20,6 +20,12 @@ #include "quartz_private.h" +#include "wine/debug.h" +#include "wine/unicode.h" +#include <assert.h> + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); + typedef struct SystemClockAdviseEntry SystemClockAdviseEntry; struct SystemClockAdviseEntry { SystemClockAdviseEntry* next; @@ -223,7 +229,7 @@ static ULONG WINAPI SystemClockImpl_Release(IReferenceClock* iface) { ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p): ReleaseRef to %d\n", This, ref); if (ref == 0) { - if (SystemClockPostMessageToAdviseThread(This, ADVISE_EXIT)) { + if (This->adviseThreadActive && SystemClockPostMessageToAdviseThread(This, ADVISE_EXIT)) { WaitForSingleObject(This->adviseThread, INFINITE); CloseHandle(This->adviseThread); } diff --git a/dll/directx/wine/quartz/videorenderer.c b/dll/directx/wine/quartz/videorenderer.c index 43448df50a..61f08f5156 100644 --- a/dll/directx/wine/quartz/videorenderer.c +++ b/dll/directx/wine/quartz/videorenderer.c @@ -18,7 +18,27 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" + #include "quartz_private.h" +#include "pin.h" + +#include "uuids.h" +#include "vfwmsgs.h" +#include "amvideo.h" +#include "windef.h" +#include "winbase.h" +#include "dshow.h" +#include "evcode.h" +#include "strmif.h" +#include "ddraw.h" +#include "dvdmedia.h" + +#include <assert.h> +#include "wine/unicode.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); typedef struct VideoRendererImpl { diff --git a/dll/directx/wine/quartz/vmr9.c b/dll/directx/wine/quartz/vmr9.c index 6e06cf43b0..d9e4f46fe0 100644 --- a/dll/directx/wine/quartz/vmr9.c +++ b/dll/directx/wine/quartz/vmr9.c @@ -20,10 +20,28 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" + #include "quartz_private.h" -#include <d3d9.h> -#include <vmr9.h> +#include "uuids.h" +#include "vfwmsgs.h" +#include "amvideo.h" +#include "windef.h" +#include "winbase.h" +#include "dshow.h" +#include "evcode.h" +#include "strmif.h" +#include "ddraw.h" +#include "dvdmedia.h" +#include "d3d9.h" +#include "vmr9.h" +#include "pin.h" + +#include "wine/unicode.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); struct quartz_vmr { diff --git a/dll/directx/wine/quartz/waveparser.c b/dll/directx/wine/quartz/waveparser.c index 27006be568..f6bea2c704 100644 --- a/dll/directx/wine/quartz/waveparser.c +++ b/dll/directx/wine/quartz/waveparser.c @@ -19,6 +19,22 @@ */ #include "quartz_private.h" +#include "pin.h" + +#include "uuids.h" +#include "aviriff.h" +#include "vfwmsgs.h" +#include "mmsystem.h" + +#include "wine/unicode.h" +#include "wine/debug.h" + +#include <math.h> +#include <assert.h> + +#include "parser.h" + +WINE_DEFAULT_DEBUG_CHANNEL(quartz); static const WCHAR wcsOutputPinName[] = {'o','u','t','p','u','t',' ','p','i','n',0}; diff --git a/media/doc/README.WINE b/media/doc/README.WINE index f702a41581..cd4452c42d 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -39,7 +39,7 @@ reactos/dll/directx/wine/dsound # Synced to Wine-1.3.29 reactos/dll/directx/wine/dxdiagn # Synced to WineStaging-3.3 reactos/dll/directx/wine/msdmo # Synced to WineStaging-3.3 reactos/dll/directx/wine/qedit # Synced to WineStaging-3.3 -reactos/dll/directx/wine/quartz # Synced to Wine-3.0 +reactos/dll/directx/wine/quartz # Synced to WineStaging-3.3 reactos/dll/directx/wine/wined3d # Synced to WineStaging-3.3 reactos/dll/win32/activeds # Synced to WineStaging-2.9
6 years, 8 months
1
0
0
0
← Newer
1
...
34
35
36
37
38
39
40
...
44
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
Results per page:
10
25
50
100
200