winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
February 2020
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
874 discussions
Start a n
N
ew thread
Alexandre Julliard : wmc: Set the output format from the output file name.
by Alexandre Julliard
06 Feb '20
06 Feb '20
Module: wine Branch: master Commit: 8247686c106fca0098d22bd6b182942b2597dfde URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8247686c106fca0098d22bd6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 6 15:05:48 2020 +0100 wmc: Set the output format from the output file name. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/makedep.c | 15 ++++++--------- tools/wmc/utils.c | 7 +++++++ tools/wmc/utils.h | 1 + tools/wmc/wmc.c | 12 ++++++++++++ 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index 4cc0e784c7..e5628712cc 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -2757,11 +2757,15 @@ static void output_source_rc( struct makefile *make, struct incl_file *source, c static void output_source_mc( struct makefile *make, struct incl_file *source, const char *obj ) { unsigned int i; + char *obj_path = obj_dir_path( make, obj ); strarray_add( &make->res_files, strmake( "%s.res", obj )); strarray_add( &make->clean_files, strmake( "%s.pot", obj )); - output( "%s.res: %s\n", obj_dir_path( make, obj ), source->filename ); - output( "\t%s -U -O res -o $@ %s", tools_path( make, "wmc" ), source->filename ); + output( "%s.pot %s.res: %s", obj_path, obj_path, source->filename ); + output_filename( tools_path( make, "wmc" )); + output_filenames( source->dependencies ); + output( "\n" ); + output( "\t%s -u -o $@ %s", tools_path( make, "wmc" ), source->filename ); if (linguas.count) { char *po_dir = top_obj_dir_path( make, "po" ); @@ -2772,13 +2776,6 @@ static void output_source_mc( struct makefile *make, struct incl_file *source, c output_filename( strmake( "%s/%s.mo", po_dir, linguas.str[i] )); } output( "\n" ); - output( "%s.pot: %s\n", obj_dir_path( make, obj ), source->filename ); - output( "\t%s -O pot -o $@ %s", tools_path( make, "wmc" ), source->filename ); - output( "\n" ); - output( "%s.pot %s.res:", obj_dir_path( make, obj ), obj_dir_path( make, obj )); - output_filename( tools_path( make, "wmc" )); - output_filenames( source->dependencies ); - output( "\n" ); } diff --git a/tools/wmc/utils.c b/tools/wmc/utils.c index e3da5422d7..7261fe715a 100644 --- a/tools/wmc/utils.c +++ b/tools/wmc/utils.c @@ -200,6 +200,13 @@ char *strmake( const char* fmt, ... ) } } +int strendswith( const char *str, const char *end ) +{ + int l = strlen(str); + int m = strlen(end); + return l >= m && !strcmp( str + l - m, end ); +} + int unistrlen(const WCHAR *s) { int n; diff --git a/tools/wmc/utils.h b/tools/wmc/utils.h index 48f47ee751..e4c546765d 100644 --- a/tools/wmc/utils.h +++ b/tools/wmc/utils.h @@ -43,6 +43,7 @@ void error(const char *s, ...) __attribute__((format (printf, 1, 2))); void warning(const char *s, ...) __attribute__((format (printf, 1, 2))); char *dup_basename(const char *name, const char *ext); +int strendswith( const char *str, const char *end ); WCHAR *xunistrdup(const WCHAR * str); WCHAR *unistrcpy(WCHAR *dst, const WCHAR *src); diff --git a/tools/wmc/wmc.c b/tools/wmc/wmc.c index 89c8d6e8e9..93c029d751 100644 --- a/tools/wmc/wmc.c +++ b/tools/wmc/wmc.c @@ -126,6 +126,7 @@ FILE *yyin; static enum { + FORMAT_UNKNOWN, FORMAT_RC, FORMAT_RES, FORMAT_POT @@ -287,6 +288,15 @@ int main(int argc,char *argv[]) input_name = argv[optind]; } + /* Guess output format */ + if (output_format == FORMAT_UNKNOWN) + { + if (output_name && strendswith( output_name, ".res" )) output_format = FORMAT_RES; + else if (output_name && strendswith( output_name, ".pot" )) output_format = FORMAT_POT; + else output_format = FORMAT_RC; + } + if (output_format == FORMAT_RES) unicodeout = 1; + /* Generate appropriate outfile names */ if(!output_name) { @@ -340,6 +350,8 @@ int main(int argc,char *argv[]) case FORMAT_POT: write_pot_file( output_name ); break; + default: + break; } output_name = NULL; header_name = NULL;
1
0
0
0
Alexandre Julliard : wmc: Reimplement input format detection to correctly handle Unicode BOM.
by Alexandre Julliard
06 Feb '20
06 Feb '20
Module: wine Branch: master Commit: b7b44224d1274df2bf2b851099c4c4deb4bddc5f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b7b44224d1274df2bf2b8510…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 6 15:06:10 2020 +0100 wmc: Reimplement input format detection to correctly handle Unicode BOM. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/wmc/mcl.c | 212 +++++++++++++++++++------------------------------------- 1 file changed, 72 insertions(+), 140 deletions(-) diff --git a/tools/wmc/mcl.c b/tools/wmc/mcl.c index 56c5ca640c..1319113fff 100644 --- a/tools/wmc/mcl.c +++ b/tools/wmc/mcl.c @@ -160,14 +160,13 @@ void set_codepage(int cp) /* * Input functions */ +#define INPUTBUFFER_SIZE 2048 /* Must be larger than 4 and approx. large enough to hold a line */ + static int nungetstack = 0; static int allocungetstack = 0; static char *ungetstack = NULL; static int ninputbuffer = 0; -static WCHAR *inputbuffer = NULL; -static char *xlatebuffer = NULL; - -#define INPUTBUFFER_SIZE 2048 /* Must be larger than 4 and approx. large enough to hold a line */ +static WCHAR inputbuffer[INPUTBUFFER_SIZE]; /* * Fill the input buffer with *one* line of input. @@ -179,141 +178,74 @@ static char *xlatebuffer = NULL; */ static int fill_inputbuffer(void) { - int n; - static const char err_fatalread[] = "Fatal: reading input failed"; - static int endian = -1; - - if(!inputbuffer) - { - inputbuffer = xmalloc(INPUTBUFFER_SIZE*sizeof(WCHAR)); - xlatebuffer = xmalloc(INPUTBUFFER_SIZE); - } - -try_again: - if(!unicodein) - { - char *cptr; - cptr = fgets(xlatebuffer, INPUTBUFFER_SIZE, yyin); - if(!cptr && ferror(yyin)) - xyyerror(err_fatalread); - else if(!cptr) - return 0; - if (codepage == CP_UTF8) - { - WCHAR *buf = utf8_to_unicode( xlatebuffer, strlen(xlatebuffer), &n ); - memcpy( inputbuffer, buf, (n + 1) * sizeof(WCHAR) ); - free( buf ); - } - else - { - n = wmc_mbstowcs(codepage, 0, xlatebuffer, strlen(xlatebuffer)+1, inputbuffer, INPUTBUFFER_SIZE); - if(n < 0) - internal_error(__FILE__, __LINE__, "Could not translate to unicode (%d)\n", n); - } - if(n <= 1) - goto try_again; /* Should not happen */ - n--; /* Strip added conversion '\0' from input length */ - /* - * FIXME: - * Detect UTF-8 in the first time we read some bytes by - * checking the special sequence "FE..." or something like - * that. I need to check
www.unicode.org
for details. - */ - } - else - { - if(endian == -1) - { - n = fread(inputbuffer, 1, 8, yyin); - if(n != 8) - { - if(!n && ferror(yyin)) - xyyerror(err_fatalread); - else - xyyerror("Fatal: file too short to determine byteorder (should never happen)\n"); - } - if(isisochar(inputbuffer[0]) && - isisochar(inputbuffer[1]) && - isisochar(inputbuffer[2]) && - isisochar(inputbuffer[3])) - { -#ifdef WORDS_BIGENDIAN - endian = WMC_BO_BIG; -#else - endian = WMC_BO_LITTLE; -#endif - } - else if(isisochar(BYTESWAP_WORD(inputbuffer[0])) && - isisochar(BYTESWAP_WORD(inputbuffer[1])) && - isisochar(BYTESWAP_WORD(inputbuffer[2])) && - isisochar(BYTESWAP_WORD(inputbuffer[3]))) - { -#ifdef WORDS_BIGENDIAN - endian = WMC_BO_LITTLE; -#else - endian = WMC_BO_BIG; -#endif - } - else - xyyerror("Fatal: cannot determine file's byteorder\n"); - /* FIXME: - * Determine the file-endian with the leader-bytes - * "FF FE..."; can't remember the exact sequence. - */ - n /= 2; -#ifdef WORDS_BIGENDIAN - if(endian == WMC_BO_LITTLE) -#else - if(endian == WMC_BO_BIG) -#endif - { - inputbuffer[0] = BYTESWAP_WORD(inputbuffer[0]); - inputbuffer[1] = BYTESWAP_WORD(inputbuffer[1]); - inputbuffer[2] = BYTESWAP_WORD(inputbuffer[2]); - inputbuffer[3] = BYTESWAP_WORD(inputbuffer[3]); - } - - } - else - { - int i; - n = 0; - for(i = 0; i < INPUTBUFFER_SIZE; i++) - { - int t; - t = fread(&inputbuffer[i], 2, 1, yyin); - if(!t && ferror(yyin)) - xyyerror(err_fatalread); - else if(!t && n) - break; - n++; -#ifdef WORDS_BIGENDIAN - if(endian == WMC_BO_LITTLE) -#else - if(endian == WMC_BO_BIG) -#endif - { - if((inputbuffer[i] = BYTESWAP_WORD(inputbuffer[i])) == '\n') - break; - } - else - { - if(inputbuffer[i] == '\n') - break; - } - } - } - - } - - if(!n) - { - mcy_warning("Re-read line (input was or converted to zilch)\n"); - goto try_again; /* Should not happen, but could be due to stdin reading and a signal */ - } - - ninputbuffer += n; - return 1; + static enum input_mode { INPUT_UNKNOWN, INPUT_ASCII, INPUT_UTF8, INPUT_UNICODE } mode; + static int swapped; + static unsigned char utf8_bom[3] = { 0xef, 0xbb, 0xbf }; + WCHAR *wbuf; + int i, pos = 0, len = 0; + char buffer[INPUTBUFFER_SIZE]; + + if (mode == INPUT_UNKNOWN) + { + len = fread( buffer, 1, 8, yyin ); + wbuf = (WCHAR *)buffer; + if (len >= 3 && !memcmp( buffer, utf8_bom, 3 )) + { + mode = INPUT_UTF8; + memmove( buffer, buffer + 3, len - 3 ); + len -= 3; + } + else if (len == 8) + { + if (wbuf[0] == 0xfeff || wbuf[0] == 0xfffe) + { + mode = INPUT_UNICODE; + pos = 1; + swapped = (wbuf[0] == 0xfffe); + } + else if (!((wbuf[0] | wbuf[1] | wbuf[2] | wbuf[3]) & 0xff00)) + { + mode = INPUT_UNICODE; + } + else if (!((wbuf[0] | wbuf[1] | wbuf[2] | wbuf[3]) & 0x00ff)) + { + mode = INPUT_UNICODE; + swapped = 1; + } + } + + if (mode == INPUT_UNICODE) + { + len = 4 - pos; + memcpy( inputbuffer, wbuf + pos, len * sizeof(WCHAR) ); + } + else if (mode == INPUT_UNKNOWN) mode = unicodein ? INPUT_UTF8 : INPUT_ASCII; + } + + switch (mode) + { + case INPUT_ASCII: + if (!fgets( buffer + len, sizeof(buffer) - len, yyin )) break; + ninputbuffer = wmc_mbstowcs( codepage, 0, buffer, strlen(buffer), inputbuffer, INPUTBUFFER_SIZE ); + if (ninputbuffer < 0) internal_error(__FILE__, __LINE__, "Could not translate to unicode\n"); + return 1; + case INPUT_UTF8: + if (!fgets( buffer + len, sizeof(buffer) - len, yyin )) break; + wbuf = utf8_to_unicode( buffer, strlen(buffer), &ninputbuffer ); + memcpy( inputbuffer, wbuf, ninputbuffer * sizeof(WCHAR) ); + free( wbuf ); + return 1; + case INPUT_UNICODE: + len += fread( inputbuffer + len, sizeof(WCHAR), INPUTBUFFER_SIZE - len, yyin ); + if (!len) break; + if (swapped) for (i = 0; i < len; i++) inputbuffer[i] = BYTESWAP_WORD( inputbuffer[i] ); + ninputbuffer = len; + return 1; + case INPUT_UNKNOWN: + break; + } + if (ferror(yyin)) xyyerror( "Fatal: reading input failed\n" ); + return 0; } static int get_unichar(void) @@ -332,7 +264,7 @@ static int get_unichar(void) } ninputbuffer--; - return (int)(*b++ & 0xffff); + return *b++; } static void unget_unichar(int ch)
1
0
0
0
Alistair Leslie-Hughes : include: Add X3DAUDIO_CALCULATE_* defines.
by Alexandre Julliard
06 Feb '20
06 Feb '20
Module: wine Branch: master Commit: c2bd9deac83e98d4c878af24b4efdcfdac1ed032 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c2bd9deac83e98d4c878af24…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Feb 5 23:05:54 2020 +0000 include: Add X3DAUDIO_CALCULATE_* defines. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/x3daudio.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/x3daudio.h b/include/x3daudio.h index a503507a40..0fd9a30092 100644 --- a/include/x3daudio.h +++ b/include/x3daudio.h @@ -87,6 +87,16 @@ typedef struct X3DAUDIO_DSP_SETTINGS { float ListenerVelocityComponent; } X3DAUDIO_DSP_SETTINGS; +#define X3DAUDIO_CALCULATE_MATRIX 0x00000001 +#define X3DAUDIO_CALCULATE_DELAY 0x00000002 +#define X3DAUDIO_CALCULATE_LPF_DIRECT 0x00000004 +#define X3DAUDIO_CALCULATE_LPF_REVERB 0x00000008 +#define X3DAUDIO_CALCULATE_REVERB 0x00000010 +#define X3DAUDIO_CALCULATE_DOPPLER 0x00000020 +#define X3DAUDIO_CALCULATE_EMITTER_ANGLE 0x00000040 +#define X3DAUDIO_CALCULATE_ZEROCENTER 0x00010000 +#define X3DAUDIO_CALCULATE_REDIRECT_TO_LFE 0x00020000 + #define X3DAUDIO_HANDLE_BYTESIZE 20 typedef BYTE X3DAUDIO_HANDLE[X3DAUDIO_HANDLE_BYTESIZE];
1
0
0
0
Liam Middlebrook : winevulkan: Handle bitmask pointers for spec generation.
by Alexandre Julliard
06 Feb '20
06 Feb '20
Module: wine Branch: master Commit: 936d28e2c5f418bf30933cbad67472f1e7b068f2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=936d28e2c5f418bf30933cba…
Author: Liam Middlebrook <lmiddlebrook(a)nvidia.com> Date: Wed Feb 5 22:36:34 2020 -0800 winevulkan: Handle bitmask pointers for spec generation. Fixes a bug where pointer types for the following functions would be marked as long: vkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR Signed-off-by: Liam Middlebrook <lmiddlebrook(a)nvidia.com> Signed-off-by: James Jones <jajones(a)nvidia.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vulkan-1/vulkan-1.spec | 6 +++--- dlls/winevulkan/make_vulkan | 4 ++-- dlls/winevulkan/winevulkan.spec | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/vulkan-1/vulkan-1.spec b/dlls/vulkan-1/vulkan-1.spec index 88e4eb72f5..625e50ed70 100644 --- a/dlls/vulkan-1/vulkan-1.spec +++ b/dlls/vulkan-1/vulkan-1.spec @@ -158,9 +158,9 @@ @ stdcall vkGetBufferMemoryRequirements(ptr int64 ptr) winevulkan.wine_vkGetBufferMemoryRequirements @ stdcall vkGetBufferMemoryRequirements2(ptr ptr ptr) winevulkan.wine_vkGetBufferMemoryRequirements2 @ stdcall vkGetDescriptorSetLayoutSupport(ptr ptr ptr) winevulkan.wine_vkGetDescriptorSetLayoutSupport -@ stdcall vkGetDeviceGroupPeerMemoryFeatures(ptr long long long long) winevulkan.wine_vkGetDeviceGroupPeerMemoryFeatures +@ stdcall vkGetDeviceGroupPeerMemoryFeatures(ptr long long long ptr) winevulkan.wine_vkGetDeviceGroupPeerMemoryFeatures @ stdcall vkGetDeviceGroupPresentCapabilitiesKHR(ptr ptr) winevulkan.wine_vkGetDeviceGroupPresentCapabilitiesKHR -@ stdcall vkGetDeviceGroupSurfacePresentModesKHR(ptr int64 long) winevulkan.wine_vkGetDeviceGroupSurfacePresentModesKHR +@ stdcall vkGetDeviceGroupSurfacePresentModesKHR(ptr int64 ptr) winevulkan.wine_vkGetDeviceGroupSurfacePresentModesKHR @ stdcall vkGetDeviceMemoryCommitment(ptr int64 ptr) winevulkan.wine_vkGetDeviceMemoryCommitment @ stdcall vkGetDeviceProcAddr(ptr str) winevulkan.wine_vkGetDeviceProcAddr @ stdcall vkGetDeviceQueue(ptr long long ptr) winevulkan.wine_vkGetDeviceQueue @@ -198,7 +198,7 @@ @ stdcall vkGetPhysicalDeviceSparseImageFormatProperties2(ptr ptr ptr ptr) winevulkan.wine_vkGetPhysicalDeviceSparseImageFormatProperties2 @ stdcall vkGetPhysicalDeviceSurfaceCapabilitiesKHR(ptr int64 ptr) winevulkan.wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR @ stdcall vkGetPhysicalDeviceSurfaceFormatsKHR(ptr int64 ptr ptr) winevulkan.wine_vkGetPhysicalDeviceSurfaceFormatsKHR -@ stdcall vkGetPhysicalDeviceSurfacePresentModesKHR(ptr int64 ptr long) winevulkan.wine_vkGetPhysicalDeviceSurfacePresentModesKHR +@ stdcall vkGetPhysicalDeviceSurfacePresentModesKHR(ptr int64 ptr ptr) winevulkan.wine_vkGetPhysicalDeviceSurfacePresentModesKHR @ stdcall vkGetPhysicalDeviceSurfaceSupportKHR(ptr long int64 ptr) winevulkan.wine_vkGetPhysicalDeviceSurfaceSupportKHR @ stdcall vkGetPhysicalDeviceWin32PresentationSupportKHR(ptr long) winevulkan.wine_vkGetPhysicalDeviceWin32PresentationSupportKHR @ stdcall vkGetPipelineCacheData(ptr int64 ptr ptr) winevulkan.wine_vkGetPipelineCacheData diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 5eebc0f3b2..52ef25948c 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -1491,12 +1491,12 @@ class VkParam(object): def spec(self): """ Generate spec file entry for this parameter. """ - if self.type_info["category"] in ["bitmask", "enum"]: - return "long" if self.is_pointer() and self.type == "char": return "str" if self.is_dispatchable() or self.is_pointer() or self.is_static_array(): return "ptr" + if self.type_info["category"] in ["bitmask", "enum"]: + return "long" if self.is_handle() and not self.is_dispatchable(): return "int64" if self.type == "float": diff --git a/dlls/winevulkan/winevulkan.spec b/dlls/winevulkan/winevulkan.spec index 57ee94abe2..8cdf387857 100644 --- a/dlls/winevulkan/winevulkan.spec +++ b/dlls/winevulkan/winevulkan.spec @@ -161,9 +161,9 @@ @ stdcall -private wine_vkGetBufferMemoryRequirements(ptr int64 ptr) @ stdcall -private wine_vkGetBufferMemoryRequirements2(ptr ptr ptr) @ stdcall -private wine_vkGetDescriptorSetLayoutSupport(ptr ptr ptr) -@ stdcall -private wine_vkGetDeviceGroupPeerMemoryFeatures(ptr long long long long) +@ stdcall -private wine_vkGetDeviceGroupPeerMemoryFeatures(ptr long long long ptr) @ stdcall -private wine_vkGetDeviceGroupPresentCapabilitiesKHR(ptr ptr) -@ stdcall -private wine_vkGetDeviceGroupSurfacePresentModesKHR(ptr int64 long) +@ stdcall -private wine_vkGetDeviceGroupSurfacePresentModesKHR(ptr int64 ptr) @ stdcall -private wine_vkGetDeviceMemoryCommitment(ptr int64 ptr) @ stdcall -private wine_vkGetDeviceProcAddr(ptr str) @ stdcall -private wine_vkGetDeviceQueue(ptr long long ptr) @@ -201,7 +201,7 @@ @ stdcall -private wine_vkGetPhysicalDeviceSparseImageFormatProperties2(ptr ptr ptr ptr) @ stdcall -private wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(ptr int64 ptr) @ stdcall -private wine_vkGetPhysicalDeviceSurfaceFormatsKHR(ptr int64 ptr ptr) -@ stdcall -private wine_vkGetPhysicalDeviceSurfacePresentModesKHR(ptr int64 ptr long) +@ stdcall -private wine_vkGetPhysicalDeviceSurfacePresentModesKHR(ptr int64 ptr ptr) @ stdcall -private wine_vkGetPhysicalDeviceSurfaceSupportKHR(ptr long int64 ptr) @ stdcall -private wine_vkGetPhysicalDeviceWin32PresentationSupportKHR(ptr long) @ stdcall -private wine_vkGetPipelineCacheData(ptr int64 ptr ptr)
1
0
0
0
Nikolay Sivov : rtworkq: Add deadline management stubs.
by Alexandre Julliard
06 Feb '20
06 Feb '20
Module: wine Branch: master Commit: 9f27848d90c6583be546d0cf17dbbb7a75762739 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9f27848d90c6583be546d0cf…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Feb 6 10:06:06 2020 +0300 rtworkq: Add deadline management stubs. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/rtworkq/queue.c | 21 +++++++++++++++++++++ dlls/rtworkq/rtworkq.spec | 6 +++--- include/rtworkq.idl | 3 +++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/dlls/rtworkq/queue.c b/dlls/rtworkq/queue.c index 5e9ca51c60..a2fb3824c3 100644 --- a/dlls/rtworkq/queue.c +++ b/dlls/rtworkq/queue.c @@ -1099,3 +1099,24 @@ HRESULT WINAPI RtwqLockSharedWorkQueue(const WCHAR *usageclass, LONG priority, D return RtwqAllocateWorkQueue(RTWQ_STANDARD_WORKQUEUE, queue); } + +HRESULT WINAPI RtwqSetDeadline(DWORD queue_id, LONGLONG deadline, HANDLE *request) +{ + FIXME("%#x, %s, %p.\n", queue_id, wine_dbgstr_longlong(deadline), request); + + return E_NOTIMPL; +} + +HRESULT WINAPI RtwqSetDeadline2(DWORD queue_id, LONGLONG deadline, LONGLONG predeadline, HANDLE *request) +{ + FIXME("%#x, %s, %s, %p.\n", queue_id, wine_dbgstr_longlong(deadline), wine_dbgstr_longlong(predeadline), request); + + return E_NOTIMPL; +} + +HRESULT WINAPI RtwqCancelDeadline(HANDLE request) +{ + FIXME("%p.\n", request); + + return E_NOTIMPL; +} diff --git a/dlls/rtworkq/rtworkq.spec b/dlls/rtworkq/rtworkq.spec index c619b3a867..1a8909e098 100644 --- a/dlls/rtworkq/rtworkq.spec +++ b/dlls/rtworkq/rtworkq.spec @@ -3,7 +3,7 @@ @ stdcall RtwqAllocateWorkQueue(long ptr) @ stub RtwqBeginRegisterWorkQueueWithMMCSS @ stub RtwqBeginUnregisterWorkQueueWithMMCSS -@ stub RtwqCancelDeadline +@ stdcall RtwqCancelDeadline(long) @ stub RtwqCancelMultipleWaitingWorkItem @ stdcall RtwqCancelWorkItem(int64) @ stdcall RtwqCreateAsyncResult(ptr ptr ptr ptr) @@ -25,8 +25,8 @@ @ stub RtwqRegisterPlatformWithMMCSS @ stdcall RtwqRemovePeriodicCallback(long) @ stdcall RtwqScheduleWorkItem(ptr int64 ptr) -@ stub RtwqSetDeadline -@ stub RtwqSetDeadline2 +@ stdcall RtwqSetDeadline(long int64 ptr) +@ stdcall RtwqSetDeadline2(long int64 int64 ptr) @ stdcall RtwqSetLongRunning(long long) @ stdcall RtwqShutdown() @ stdcall RtwqStartup() diff --git a/include/rtworkq.idl b/include/rtworkq.idl index b27cce49fd..325bebfde5 100644 --- a/include/rtworkq.idl +++ b/include/rtworkq.idl @@ -79,6 +79,7 @@ cpp_quote("typedef void (WINAPI *RTWQPERIODICCALLBACK)(IUnknown *context);") cpp_quote("HRESULT WINAPI RtwqAddPeriodicCallback(RTWQPERIODICCALLBACK callback, IUnknown *context, DWORD *key);") cpp_quote("HRESULT WINAPI RtwqAllocateWorkQueue(RTWQ_WORKQUEUE_TYPE queue_type, DWORD *queue);") +cpp_quote("HRESULT WINAPI RtwqCancelDeadline(HANDLE request);") cpp_quote("HRESULT WINAPI RtwqCancelWorkItem(RTWQWORKITEM_KEY key);") cpp_quote("HRESULT WINAPI RtwqCreateAsyncResult(IUnknown *object, IRtwqAsyncCallback *callback, IUnknown *state, IRtwqAsyncResult **result);") cpp_quote("HRESULT WINAPI RtwqInvokeCallback(IRtwqAsyncResult *result);") @@ -89,6 +90,8 @@ cpp_quote("HRESULT WINAPI RtwqPutWaitingWorkItem(HANDLE event, LONG priority, IR cpp_quote("HRESULT WINAPI RtwqPutWorkItem(DWORD queue, LONG priority, IRtwqAsyncResult *result);") cpp_quote("HRESULT WINAPI RtwqRemovePeriodicCallback(DWORD key);") cpp_quote("HRESULT WINAPI RtwqScheduleWorkItem(IRtwqAsyncResult *result, INT64 timeout, RTWQWORKITEM_KEY *key);") +cpp_quote("HRESULT WINAPI RtwqSetDeadline(DWORD queue_id, LONGLONG deadline, HANDLE *request);") +cpp_quote("HRESULT WINAPI RtwqSetDeadline2(DWORD queue_id, LONGLONG deadline, LONGLONG predeadline, HANDLE *request);") cpp_quote("HRESULT WINAPI RtwqSetLongRunning(DWORD queue_id, BOOL enable);") cpp_quote("HRESULT WINAPI RtwqShutdown(void);") cpp_quote("HRESULT WINAPI RtwqStartup(void);")
1
0
0
0
Nikolay Sivov : rtworkq: Add partial implementation of RtwqLockSharedWorkQueue().
by Alexandre Julliard
06 Feb '20
06 Feb '20
Module: wine Branch: master Commit: 4e3e8f54ae71701296bdf3e137a74fdfbc84546b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4e3e8f54ae71701296bdf3e1…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Feb 6 10:06:05 2020 +0300 rtworkq: Add partial implementation of RtwqLockSharedWorkQueue(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/rtworkq/queue.c | 7 +++++++ dlls/rtworkq/rtworkq.spec | 2 +- include/rtworkq.idl | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/rtworkq/queue.c b/dlls/rtworkq/queue.c index 13bce0836a..5e9ca51c60 100644 --- a/dlls/rtworkq/queue.c +++ b/dlls/rtworkq/queue.c @@ -1092,3 +1092,10 @@ HRESULT WINAPI RtwqSetLongRunning(DWORD queue_id, BOOL enable) return hr; } + +HRESULT WINAPI RtwqLockSharedWorkQueue(const WCHAR *usageclass, LONG priority, DWORD *taskid, DWORD *queue) +{ + FIXME("%s, %d, %p, %p.\n", debugstr_w(usageclass), priority, taskid, queue); + + return RtwqAllocateWorkQueue(RTWQ_STANDARD_WORKQUEUE, queue); +} diff --git a/dlls/rtworkq/rtworkq.spec b/dlls/rtworkq/rtworkq.spec index 2d0d3b40e6..c619b3a867 100644 --- a/dlls/rtworkq/rtworkq.spec +++ b/dlls/rtworkq/rtworkq.spec @@ -16,7 +16,7 @@ @ stdcall RtwqInvokeCallback(ptr) @ stub RtwqJoinWorkQueue @ stdcall RtwqLockPlatform() -@ stub RtwqLockSharedWorkQueue +@ stdcall RtwqLockSharedWorkQueue(wstr long ptr ptr) @ stdcall RtwqLockWorkQueue(long) @ stub RtwqPutMultipleWaitingWorkItem @ stdcall RtwqPutWaitingWorkItem(long long ptr ptr) diff --git a/include/rtworkq.idl b/include/rtworkq.idl index 6ddb232fbd..b27cce49fd 100644 --- a/include/rtworkq.idl +++ b/include/rtworkq.idl @@ -83,6 +83,7 @@ cpp_quote("HRESULT WINAPI RtwqCancelWorkItem(RTWQWORKITEM_KEY key);") cpp_quote("HRESULT WINAPI RtwqCreateAsyncResult(IUnknown *object, IRtwqAsyncCallback *callback, IUnknown *state, IRtwqAsyncResult **result);") cpp_quote("HRESULT WINAPI RtwqInvokeCallback(IRtwqAsyncResult *result);") cpp_quote("HRESULT WINAPI RtwqLockPlatform(void);") +cpp_quote("HRESULT WINAPI RtwqLockSharedWorkQueue(const WCHAR *usageclass, LONG priority, DWORD *taskid, DWORD *queue);") cpp_quote("HRESULT WINAPI RtwqLockWorkQueue(DWORD queue);") cpp_quote("HRESULT WINAPI RtwqPutWaitingWorkItem(HANDLE event, LONG priority, IRtwqAsyncResult *result, RTWQWORKITEM_KEY *key);") cpp_quote("HRESULT WINAPI RtwqPutWorkItem(DWORD queue, LONG priority, IRtwqAsyncResult *result);")
1
0
0
0
Nikolay Sivov : rtworkq: Add RtwqSetLongRunning().
by Alexandre Julliard
06 Feb '20
06 Feb '20
Module: wine Branch: master Commit: baeb8c2d45f92f749cdf4b0e11f205db06bc6711 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=baeb8c2d45f92f749cdf4b0e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Feb 6 10:06:04 2020 +0300 rtworkq: Add RtwqSetLongRunning(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/rtworkq/queue.c | 21 +++++++++++++++++++++ dlls/rtworkq/rtworkq.spec | 2 +- include/rtworkq.idl | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/dlls/rtworkq/queue.c b/dlls/rtworkq/queue.c index a6aac6abda..13bce0836a 100644 --- a/dlls/rtworkq/queue.c +++ b/dlls/rtworkq/queue.c @@ -1071,3 +1071,24 @@ HRESULT WINAPI RtwqUnlockWorkQueue(DWORD queue) return unlock_user_queue(queue); } + +HRESULT WINAPI RtwqSetLongRunning(DWORD queue_id, BOOL enable) +{ + struct queue *queue; + HRESULT hr; + int i; + + TRACE("%#x, %d.\n", queue_id, enable); + + lock_user_queue(queue_id); + + if (SUCCEEDED(hr = grab_queue(queue_id, &queue))) + { + for (i = 0; i < ARRAY_SIZE(queue->envs); ++i) + queue->envs[i].u.s.LongFunction = !!enable; + } + + unlock_user_queue(queue_id); + + return hr; +} diff --git a/dlls/rtworkq/rtworkq.spec b/dlls/rtworkq/rtworkq.spec index 48bc17cbfc..2d0d3b40e6 100644 --- a/dlls/rtworkq/rtworkq.spec +++ b/dlls/rtworkq/rtworkq.spec @@ -27,7 +27,7 @@ @ stdcall RtwqScheduleWorkItem(ptr int64 ptr) @ stub RtwqSetDeadline @ stub RtwqSetDeadline2 -@ stub RtwqSetLongRunning +@ stdcall RtwqSetLongRunning(long long) @ stdcall RtwqShutdown() @ stdcall RtwqStartup() @ stub RtwqUnjoinWorkQueue diff --git a/include/rtworkq.idl b/include/rtworkq.idl index 001cf2c3e9..6ddb232fbd 100644 --- a/include/rtworkq.idl +++ b/include/rtworkq.idl @@ -88,6 +88,7 @@ cpp_quote("HRESULT WINAPI RtwqPutWaitingWorkItem(HANDLE event, LONG priority, IR cpp_quote("HRESULT WINAPI RtwqPutWorkItem(DWORD queue, LONG priority, IRtwqAsyncResult *result);") cpp_quote("HRESULT WINAPI RtwqRemovePeriodicCallback(DWORD key);") cpp_quote("HRESULT WINAPI RtwqScheduleWorkItem(IRtwqAsyncResult *result, INT64 timeout, RTWQWORKITEM_KEY *key);") +cpp_quote("HRESULT WINAPI RtwqSetLongRunning(DWORD queue_id, BOOL enable);") cpp_quote("HRESULT WINAPI RtwqShutdown(void);") cpp_quote("HRESULT WINAPI RtwqStartup(void);") cpp_quote("HRESULT WINAPI RtwqUnlockPlatform(void);")
1
0
0
0
Zebediah Figura : strmbase: Check if the pin is already connected in source_Connect().
by Alexandre Julliard
06 Feb '20
06 Feb '20
Module: wine Branch: master Commit: d1897cf96ba3041e17416f618197302c996c8115 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d1897cf96ba3041e17416f61…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Feb 5 19:50:07 2020 -0600 strmbase: Check if the pin is already connected in source_Connect(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/strmbase/pin.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c index 90064c25d4..18631410b7 100644 --- a/dlls/strmbase/pin.c +++ b/dlls/strmbase/pin.c @@ -463,6 +463,13 @@ static HRESULT WINAPI source_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYP EnterCriticalSection(&pin->pin.filter->csFilter); + if (pin->pin.peer) + { + LeaveCriticalSection(&pin->pin.filter->csFilter); + WARN("Pin is already connected, returning VFW_E_ALREADY_CONNECTED.\n"); + return VFW_E_ALREADY_CONNECTED; + } + if (pin->pin.filter->state != State_Stopped) { LeaveCriticalSection(&pin->pin.filter->csFilter);
1
0
0
0
Zebediah Figura : strmbase: Simplify CompareMediaTypes().
by Alexandre Julliard
06 Feb '20
06 Feb '20
Module: wine Branch: master Commit: 09b0d9d4564fdb087aebe39d640ba6e52c48680e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=09b0d9d4564fdb087aebe39d…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Feb 5 19:50:06 2020 -0600 strmbase: Simplify CompareMediaTypes(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/strmbase/pin.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c index 58778e5789..90064c25d4 100644 --- a/dlls/strmbase/pin.c +++ b/dlls/strmbase/pin.c @@ -247,12 +247,6 @@ static HRESULT SendFurther(struct strmbase_sink *sink, SendPinFunc func, void *a return hr; } -static BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * pmt2, BOOL bWildcards) -{ - return (((bWildcards && (IsEqualGUID(&pmt1->majortype, &GUID_NULL) || IsEqualGUID(&pmt2->majortype, &GUID_NULL))) || IsEqualGUID(&pmt1->majortype, &pmt2->majortype)) && - ((bWildcards && (IsEqualGUID(&pmt1->subtype, &GUID_NULL) || IsEqualGUID(&pmt2->subtype, &GUID_NULL))) || IsEqualGUID(&pmt1->subtype, &pmt2->subtype))); -} - HRESULT strmbase_pin_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt) { return VFW_S_NO_MORE_ITEMS; @@ -428,6 +422,24 @@ static inline struct strmbase_source *impl_source_from_IPin( IPin *iface ) return CONTAINING_RECORD(iface, struct strmbase_source, pin.IPin_iface); } +static BOOL compare_media_types(const AM_MEDIA_TYPE *a, const AM_MEDIA_TYPE *b) +{ + if (!a) + return TRUE; + + if (!IsEqualGUID(&a->majortype, &b->majortype) + && !IsEqualGUID(&a->majortype, &GUID_NULL) + && !IsEqualGUID(&b->majortype, &GUID_NULL)) + return FALSE; + + if (!IsEqualGUID(&a->subtype, &b->subtype) + && !IsEqualGUID(&a->subtype, &GUID_NULL) + && !IsEqualGUID(&b->subtype, &GUID_NULL)) + return FALSE; + + return TRUE; +} + static HRESULT WINAPI source_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYPE *mt) { struct strmbase_source *pin = impl_source_from_IPin(iface); @@ -468,7 +480,7 @@ static HRESULT WINAPI source_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYP for (i = 0; pin->pFuncsTable->base.pin_get_media_type(&pin->pin, i, &candidate) == S_OK; ++i) { strmbase_dump_media_type(&candidate); - if ((!mt || CompareMediaTypes(mt, &candidate, TRUE)) + if (compare_media_types(mt, &candidate) && pin->pFuncsTable->pfnAttemptConnection(pin, peer, &candidate) == S_OK) { LeaveCriticalSection(&pin->pin.filter->csFilter); @@ -482,7 +494,7 @@ static HRESULT WINAPI source_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYP { while (IEnumMediaTypes_Next(enummt, 1, &candidate_ptr, &count) == S_OK) { - if ((!mt || CompareMediaTypes(mt, candidate_ptr, TRUE)) + if (compare_media_types(mt, candidate_ptr) && pin->pFuncsTable->pfnAttemptConnection(pin, peer, candidate_ptr) == S_OK) { LeaveCriticalSection(&pin->pin.filter->csFilter);
1
0
0
0
Zebediah Figura : strmbase: Access our own media types directly in source_Connect().
by Alexandre Julliard
06 Feb '20
06 Feb '20
Module: wine Branch: master Commit: e14c5430ccc9ae63770e47c2bd6ada227fa4ca33 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e14c5430ccc9ae63770e47c2…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Feb 5 19:50:05 2020 -0600 strmbase: Access our own media types directly in source_Connect(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/strmbase/pin.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c index 44831d13f4..58778e5789 100644 --- a/dlls/strmbase/pin.c +++ b/dlls/strmbase/pin.c @@ -431,8 +431,9 @@ static inline struct strmbase_source *impl_source_from_IPin( IPin *iface ) static HRESULT WINAPI source_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYPE *mt) { struct strmbase_source *pin = impl_source_from_IPin(iface); - AM_MEDIA_TYPE *candidate; + AM_MEDIA_TYPE candidate, *candidate_ptr; IEnumMediaTypes *enummt; + unsigned int i; ULONG count; HRESULT hr; @@ -464,37 +465,32 @@ static HRESULT WINAPI source_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYP return hr; } - if (SUCCEEDED(IPin_EnumMediaTypes(iface, &enummt))) + for (i = 0; pin->pFuncsTable->base.pin_get_media_type(&pin->pin, i, &candidate) == S_OK; ++i) { - while (IEnumMediaTypes_Next(enummt, 1, &candidate, NULL) == S_OK) + strmbase_dump_media_type(&candidate); + if ((!mt || CompareMediaTypes(mt, &candidate, TRUE)) + && pin->pFuncsTable->pfnAttemptConnection(pin, peer, &candidate) == S_OK) { - if ((!mt || CompareMediaTypes(mt, candidate, TRUE)) - && pin->pFuncsTable->pfnAttemptConnection(pin, peer, candidate) == S_OK) - { - LeaveCriticalSection(&pin->pin.filter->csFilter); - DeleteMediaType(candidate); - IEnumMediaTypes_Release(enummt); - return S_OK; - } - DeleteMediaType(candidate); + LeaveCriticalSection(&pin->pin.filter->csFilter); + FreeMediaType(&candidate); + return S_OK; } - - IEnumMediaTypes_Release(enummt); + FreeMediaType(&candidate); } if (SUCCEEDED(IPin_EnumMediaTypes(peer, &enummt))) { - while (IEnumMediaTypes_Next(enummt, 1, &candidate, &count) == S_OK) + while (IEnumMediaTypes_Next(enummt, 1, &candidate_ptr, &count) == S_OK) { - if ((!mt || CompareMediaTypes(mt, candidate, TRUE)) - && pin->pFuncsTable->pfnAttemptConnection(pin, peer, candidate) == S_OK) + if ((!mt || CompareMediaTypes(mt, candidate_ptr, TRUE)) + && pin->pFuncsTable->pfnAttemptConnection(pin, peer, candidate_ptr) == S_OK) { LeaveCriticalSection(&pin->pin.filter->csFilter); - DeleteMediaType(candidate); + DeleteMediaType(candidate_ptr); IEnumMediaTypes_Release(enummt); return S_OK; } - DeleteMediaType(candidate); + DeleteMediaType(candidate_ptr); } IEnumMediaTypes_Release(enummt);
1
0
0
0
← Newer
1
...
67
68
69
70
71
72
73
...
88
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Results per page:
10
25
50
100
200