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
July
June
May
April
March
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
August 2012
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
541 discussions
Start a n
N
ew thread
Dmitry Timoshkov : gdiplus: Destination points passed to GdipDrawImagePointsRect should be in device units .
by Alexandre Julliard
16 Aug '12
16 Aug '12
Module: wine Branch: master Commit: 7f1cb3bca20a94ce0161e6a9c44e9c831611ef8e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7f1cb3bca20a94ce0161e6a9c…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Aug 15 12:09:24 2012 +0900 gdiplus: Destination points passed to GdipDrawImagePointsRect should be in device units. --- dlls/gdiplus/graphics.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 77f2f8d..4606074 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -2969,14 +2969,19 @@ GpStatus WINGDIPAPI GdipDrawImagePointRect(GpGraphics *graphics, GpImage *image, GpUnit srcUnit) { GpPointF points[3]; + REAL scale_x, scale_y, width, height; + TRACE("(%p, %p, %f, %f, %f, %f, %f, %f, %d)\n", graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit); + scale_x = units_scale(srcUnit, graphics->unit, graphics->xres); + scale_y = units_scale(srcUnit, graphics->unit, graphics->yres); + width = srcwidth * scale_x; + height = srcheight * scale_y; + points[0].X = points[2].X = x; points[0].Y = points[1].Y = y; - - /* FIXME: convert image coordinates to Graphics coordinates? */ - points[1].X = x + srcwidth; - points[2].Y = y + srcheight; + points[1].X = x + width; + points[2].Y = y + height; return GdipDrawImagePointsRect(graphics, image, points, 3, srcx, srcy, srcwidth, srcheight, srcUnit, NULL, NULL, NULL);
1
0
0
0
Piotr Caban : msvcp100: Fixed 64-bit variables alignment.
by Alexandre Julliard
16 Aug '12
16 Aug '12
Module: wine Branch: master Commit: 5e7452ade9dccebcc53a0b2f2c481a3b70755339 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e7452ade9dccebcc53a0b2f2…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Aug 16 10:47:23 2012 +0200 msvcp100: Fixed 64-bit variables alignment. --- dlls/msvcp100/ios.c | 64 ++++++++++++++++++++++++------------------------ dlls/msvcp100/msvcp.h | 6 +++- 2 files changed, 36 insertions(+), 34 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5e7452ade9dccebcc53a0…
1
0
0
0
Piotr Caban : msvcp100: Update spec file.
by Alexandre Julliard
16 Aug '12
16 Aug '12
Module: wine Branch: master Commit: 4bdaa20a73e86e6170453e28d7a2527154c09a0f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4bdaa20a73e86e6170453e28d…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Aug 16 10:36:28 2012 +0200 msvcp100: Update spec file. --- dlls/msvcp100/msvcp100.spec | 4392 +++++++++++++++++++++--------------------- 1 files changed, 2196 insertions(+), 2196 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=4bdaa20a73e86e6170453…
1
0
0
0
Piotr Caban : msvcp100: Fixed ctype class virtual functions table.
by Alexandre Julliard
16 Aug '12
16 Aug '12
Module: wine Branch: master Commit: 0446d426ad4ab8c055e60c86a8612ba720274687 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0446d426ad4ab8c055e60c86a…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Aug 16 10:36:17 2012 +0200 msvcp100: Fixed ctype class virtual functions table. --- dlls/msvcp100/locale.c | 20 +++++++------------- 1 files changed, 7 insertions(+), 13 deletions(-) diff --git a/dlls/msvcp100/locale.c b/dlls/msvcp100/locale.c index 58068c9..fedaea2 100644 --- a/dlls/msvcp100/locale.c +++ b/dlls/msvcp100/locale.c @@ -1372,7 +1372,7 @@ ctype_char* __thiscall MSVCP_ctype_char_vector_dtor(ctype_char *this, unsigned i /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */ /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */ DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch, 12) -#define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 36, \ +#define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 32, \ char, (const ctype_char*, char, char), (this, ch, unused)) char __thiscall ctype_char_do_narrow_ch(const ctype_char *this, char ch, char unused) { @@ -1383,7 +1383,7 @@ char __thiscall ctype_char_do_narrow_ch(const ctype_char *this, char ch, char un /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */ /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */ DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow, 20) -#define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 32, \ +#define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 28, \ const char*, (const ctype_char*, const char*, const char*, char, char*), \ (this, first, last, unused, dest)) const char* __thiscall ctype_char_do_narrow(const ctype_char *this, @@ -2000,7 +2000,7 @@ char __thiscall ctype_wchar__Donarrow(const ctype_wchar *this, wchar_t ch, char /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */ /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */ DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch, 12) -#define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 52, \ +#define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 48, \ char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt)) char __thiscall ctype_wchar_do_narrow_ch(const ctype_wchar *this, wchar_t ch, char dflt) { @@ -2012,7 +2012,7 @@ char __thiscall ctype_wchar_do_narrow_ch(const ctype_wchar *this, wchar_t ch, ch /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */ /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */ DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow, 20) -#define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 48, \ +#define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 44, \ const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \ (this, first, last, dflt, dest)) const wchar_t* __thiscall ctype_wchar_do_narrow(const ctype_wchar *this, @@ -8590,10 +8590,8 @@ void __asm_dummy_vtables(void) { VTABLE_ADD_FUNC(ctype_char_do_toupper_ch) VTABLE_ADD_FUNC(ctype_char_do_widen) VTABLE_ADD_FUNC(ctype_char_do_widen_ch) - VTABLE_ADD_FUNC(ctype_char__Do_widen_s) VTABLE_ADD_FUNC(ctype_char_do_narrow) - VTABLE_ADD_FUNC(ctype_char_do_narrow_ch) - VTABLE_ADD_FUNC(ctype_char__Do_narrow_s)); + VTABLE_ADD_FUNC(ctype_char_do_narrow_ch)); __ASM_VTABLE(ctype_wchar, VTABLE_ADD_FUNC(ctype_wchar_do_is) VTABLE_ADD_FUNC(ctype_wchar_do_is_ch) @@ -8605,10 +8603,8 @@ void __asm_dummy_vtables(void) { VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch) VTABLE_ADD_FUNC(ctype_wchar_do_widen) VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch) - VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s) VTABLE_ADD_FUNC(ctype_wchar_do_narrow) - VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch) - VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s)); + VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch)); __ASM_VTABLE(ctype_short, VTABLE_ADD_FUNC(ctype_wchar_do_is) VTABLE_ADD_FUNC(ctype_wchar_do_is_ch) @@ -8620,10 +8616,8 @@ void __asm_dummy_vtables(void) { VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch) VTABLE_ADD_FUNC(ctype_wchar_do_widen) VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch) - VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s) VTABLE_ADD_FUNC(ctype_wchar_do_narrow) - VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch) - VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s)); + VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch)); __ASM_VTABLE(codecvt_base, VTABLE_ADD_FUNC(codecvt_base_do_always_noconv) VTABLE_ADD_FUNC(codecvt_base_do_max_length)
1
0
0
0
Piotr Caban : msvcp100: Fixed basic_streambuf virtual functions table.
by Alexandre Julliard
16 Aug '12
16 Aug '12
Module: wine Branch: master Commit: 197de8d6ece36c7e3a7058b4b1931608bbea26cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=197de8d6ece36c7e3a7058b4b…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Aug 16 10:36:04 2012 +0200 msvcp100: Fixed basic_streambuf virtual functions table. --- dlls/msvcp100/ios.c | 90 +++++++++++++++++++++++++++++--------------------- 1 files changed, 52 insertions(+), 38 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=197de8d6ece36c7e3a705…
1
0
0
0
Piotr Caban : msvcp100: Fixed streamoff and streamsize definition.
by Alexandre Julliard
16 Aug '12
16 Aug '12
Module: wine Branch: master Commit: 6b5e9e3e3f45fa9f700f6d1904c82a21b3ffd0f8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6b5e9e3e3f45fa9f700f6d190…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Aug 16 10:35:36 2012 +0200 msvcp100: Fixed streamoff and streamsize definition. --- dlls/msvcp100/ios.c | 232 ++++++++++++++++++++++++------------------------ dlls/msvcp100/msvcp.h | 4 +- dlls/msvcp90/ios.c | 2 +- 3 files changed, 119 insertions(+), 119 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6b5e9e3e3f45fa9f700f6…
1
0
0
0
Piotr Caban : msvcp100: Copy source files from msvcp90.
by Alexandre Julliard
16 Aug '12
16 Aug '12
Module: wine Branch: master Commit: 4fe6e583752915161142089c3c0d916eefde5ef8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4fe6e583752915161142089c3…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Aug 16 10:35:15 2012 +0200 msvcp100: Copy source files from msvcp90. --- dlls/msvcp100/Makefile.in | 12 +- dlls/msvcp100/cxx.h | 224 + dlls/msvcp100/exception.c | 759 +++ dlls/msvcp100/ios.c |13037 +++++++++++++++++++++++++++++++++++++++++++++ dlls/msvcp100/locale.c | 8755 ++++++++++++++++++++++++++++++ dlls/msvcp100/math.c | 896 ++++ dlls/msvcp100/memory.c | 338 ++ dlls/msvcp100/misc.c | 221 + dlls/msvcp100/msvcp.h | 467 ++ dlls/msvcp100/msvcp100.c | 93 +- dlls/msvcp100/string.c | 4473 ++++++++++++++++ 11 files changed, 29250 insertions(+), 25 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=4fe6e5837529151611420…
1
0
0
0
Andrew Eikum : mciavi32: Advance video frames based on frame duration, not audio sample rate.
by Alexandre Julliard
16 Aug '12
16 Aug '12
Module: wine Branch: master Commit: b0312eab924277d483c16ab0de235d00a2f26abb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b0312eab924277d483c16ab0d…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Wed Aug 15 13:45:07 2012 -0500 mciavi32: Advance video frames based on frame duration, not audio sample rate. --- dlls/mciavi32/mciavi.c | 45 ++++++++++++++++++++++++--------------- dlls/mciavi32/mmoutput.c | 10 ++++---- dlls/mciavi32/private_mciavi.h | 2 +- 3 files changed, 34 insertions(+), 23 deletions(-) diff --git a/dlls/mciavi32/mciavi.c b/dlls/mciavi32/mciavi.c index c78ddc0..597359c 100644 --- a/dlls/mciavi32/mciavi.c +++ b/dlls/mciavi32/mciavi.c @@ -391,19 +391,27 @@ static DWORD MCIAVI_mciPlay_async(WINE_MCIAVI *wma, DWORD dwFlags, LPMCI_PLAY_PA return 0; } +static double currenttime_us(void) +{ + LARGE_INTEGER lc, lf; + QueryPerformanceCounter(&lc); + QueryPerformanceFrequency(&lf); + return (lc.QuadPart * 1000000) / lf.QuadPart; +} + /*************************************************************************** * MCIAVI_mciPlay [internal] */ static DWORD MCIAVI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms) { WINE_MCIAVI *wma; - DWORD frameTime; DWORD dwRet; LPWAVEHDR waveHdr = NULL; unsigned i, nHdr = 0; DWORD dwFromFrame, dwToFrame; DWORD numEvents = 1; HANDLE events[2]; + double next_frame_us; TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms); @@ -476,9 +484,6 @@ static DWORD MCIAVI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms if (dwFlags & (MCI_DGV_PLAY_REPEAT|MCI_MCIAVI_PLAY_WINDOW|MCI_MCIAVI_PLAY_FULLSCREEN)) FIXME("Unsupported flag %08x\n", dwFlags); - /* time is in microseconds, we should convert it to milliseconds */ - frameTime = (wma->mah.dwMicroSecPerFrame + 500) / 1000; - events[0] = wma->hStopEvent; if (wma->lpWaveFormat) { if (MCIAVI_OpenAudio(wma, &nHdr, &waveHdr) != 0) @@ -496,39 +501,45 @@ static DWORD MCIAVI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms } } + next_frame_us = currenttime_us(); while (wma->dwStatus == MCI_MODE_PLAY) { HDC hDC; - DWORD tc, delta; + double tc, delta; DWORD ret; - tc = GetTickCount(); + tc = currenttime_us(); hDC = wma->hWndPaint ? GetDC(wma->hWndPaint) : 0; if (hDC) { - MCIAVI_PaintFrame(wma, hDC); + while(next_frame_us <= tc && wma->dwCurrVideoFrame < dwToFrame){ + double dur; + ++wma->dwCurrVideoFrame; + dur = MCIAVI_PaintFrame(wma, hDC); + if(!dur) + break; + next_frame_us += dur; + TRACE("next_frame: %f\n", next_frame_us); + } ReleaseDC(wma->hWndPaint, hDC); } + if(wma->dwCurrVideoFrame >= dwToFrame) + break; if (wma->lpWaveFormat) - MCIAVI_PlayAudioBlocks(wma, nHdr, waveHdr); + MCIAVI_PlayAudioBlocks(wma, nHdr, waveHdr); - delta = GetTickCount() - tc; - if (delta < frameTime) - delta = frameTime - delta; + tc = currenttime_us(); + if(tc < next_frame_us) + delta = next_frame_us - tc; else delta = 0; LeaveCriticalSection(&wma->cs); - ret = WaitForMultipleObjects(numEvents, events, FALSE, delta); + ret = WaitForMultipleObjects(numEvents, events, FALSE, delta / 1000); EnterCriticalSection(&wma->cs); if (ret == WAIT_OBJECT_0 || wma->dwStatus != MCI_MODE_PLAY) break; - - if (wma->dwCurrVideoFrame < dwToFrame) - wma->dwCurrVideoFrame++; - else - break; } if (wma->lpWaveFormat) { diff --git a/dlls/mciavi32/mmoutput.c b/dlls/mciavi32/mmoutput.c index 2cd3339..5d4e092 100644 --- a/dlls/mciavi32/mmoutput.c +++ b/dlls/mciavi32/mmoutput.c @@ -600,20 +600,20 @@ void MCIAVI_PlayAudioBlocks(WINE_MCIAVI* wma, unsigned nHdr, LPWAVEHDR waveHdr) } } -LRESULT MCIAVI_PaintFrame(WINE_MCIAVI* wma, HDC hDC) +double MCIAVI_PaintFrame(WINE_MCIAVI* wma, HDC hDC) { void* pBitmapData; LPBITMAPINFO pBitmapInfo; if (!hDC || !wma->inbih) - return TRUE; + return 0; TRACE("Painting frame %u (cached %u)\n", wma->dwCurrVideoFrame, wma->dwCachedFrame); if (wma->dwCurrVideoFrame != wma->dwCachedFrame) { if (!wma->lpVideoIndex[wma->dwCurrVideoFrame].dwOffset) - return FALSE; + return 0; if (wma->lpVideoIndex[wma->dwCurrVideoFrame].dwSize) { @@ -626,7 +626,7 @@ LRESULT MCIAVI_PaintFrame(WINE_MCIAVI* wma, HDC hDC) wma->outbih, wma->outdata) != ICERR_OK) { WARN("Decompression error\n"); - return FALSE; + return 0; } } @@ -648,5 +648,5 @@ LRESULT MCIAVI_PaintFrame(WINE_MCIAVI* wma, HDC hDC) wma->source.right - wma->source.left, wma->source.bottom - wma->source.top, pBitmapData, pBitmapInfo, DIB_RGB_COLORS, SRCCOPY); - return TRUE; + return (wma->ash_video.dwScale / (double)wma->ash_video.dwRate) * 1000000; } diff --git a/dlls/mciavi32/private_mciavi.h b/dlls/mciavi32/private_mciavi.h index 1ee0eb3..2b9d6c2 100644 --- a/dlls/mciavi32/private_mciavi.h +++ b/dlls/mciavi32/private_mciavi.h @@ -96,7 +96,7 @@ BOOL MCIAVI_GetInfo(WINE_MCIAVI* wma) DECLSPEC_HIDDEN; DWORD MCIAVI_OpenAudio(WINE_MCIAVI* wma, unsigned* nHdr, LPWAVEHDR* pWaveHdr) DECLSPEC_HIDDEN; BOOL MCIAVI_OpenVideo(WINE_MCIAVI* wma) DECLSPEC_HIDDEN; void MCIAVI_PlayAudioBlocks(WINE_MCIAVI* wma, unsigned nHdr, LPWAVEHDR waveHdr) DECLSPEC_HIDDEN; -LRESULT MCIAVI_PaintFrame(WINE_MCIAVI* wma, HDC hDC) DECLSPEC_HIDDEN; +double MCIAVI_PaintFrame(WINE_MCIAVI* wma, HDC hDC) DECLSPEC_HIDDEN; /* mciavi.c */ WINE_MCIAVI* MCIAVI_mciGetOpenDev(UINT wDevID) DECLSPEC_HIDDEN;
1
0
0
0
Michael Stefaniuc : dsound: Move the QI implementation from IDirectSoundFullDuplex to IUnknown.
by Alexandre Julliard
16 Aug '12
16 Aug '12
Module: wine Branch: master Commit: b522dc66f7a089de37d8ac037ad1ceb11ab15a75 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b522dc66f7a089de37d8ac037…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Aug 16 01:52:16 2012 +0200 dsound: Move the QI implementation from IDirectSoundFullDuplex to IUnknown. --- dlls/dsound/duplex.c | 63 ++++++++++++++++++++++++------------------------- 1 files changed, 31 insertions(+), 32 deletions(-) diff --git a/dlls/dsound/duplex.c b/dlls/dsound/duplex.c index 5e57bbd..a2bc726 100644 --- a/dlls/dsound/duplex.c +++ b/dlls/dsound/duplex.c @@ -79,8 +79,30 @@ static inline IDirectSoundFullDuplexImpl *impl_from_IUnknown(IUnknown *iface) static HRESULT WINAPI IUnknownImpl_QueryInterface(IUnknown *iface, REFIID riid, void **ppv) { IDirectSoundFullDuplexImpl *This = impl_from_IUnknown(iface); + TRACE("(%p,%s,%p)\n", This, debugstr_guid(riid), ppv); - return IDirectSoundFullDuplex_QueryInterface(&This->IDirectSoundFullDuplex_iface, riid, ppv); + + if (!ppv) { + WARN("invalid parameter\n"); + return E_INVALIDARG; + } + + if (IsEqualIID(riid, &IID_IUnknown)) { + IUnknown_AddRef(&This->IUnknown_iface); + *ppv = &This->IUnknown_iface; + return S_OK; + } else if (IsEqualIID(riid, &IID_IDirectSoundFullDuplex)) { + IDirectSoundFullDuplex_AddRef(&This->IDirectSoundFullDuplex_iface); + *ppv = &This->IDirectSoundFullDuplex_iface; + return S_OK; + } else if (This->ds8_unk && (IsEqualIID(riid, &IID_IDirectSound) || + IsEqualIID(riid, &IID_IDirectSound8))) + return IUnknown_QueryInterface(This->ds8_unk, riid, ppv); + else if (This->dsc8_unk && IsEqualIID(riid, &IID_IDirectSoundCapture)) + return IUnknown_QueryInterface(This->dsc8_unk, riid, ppv); + + *ppv = NULL; + return E_NOINTERFACE; } static ULONG WINAPI IUnknownImpl_AddRef(IUnknown *iface) @@ -122,6 +144,14 @@ static inline IDirectSoundFullDuplexImpl *impl_from_IDirectSoundFullDuplex(IDire return CONTAINING_RECORD(iface, IDirectSoundFullDuplexImpl, IDirectSoundFullDuplex_iface); } +static HRESULT WINAPI IDirectSoundFullDuplexImpl_QueryInterface(IDirectSoundFullDuplex *iface, + REFIID riid, void **ppv) +{ + IDirectSoundFullDuplexImpl *This = impl_from_IDirectSoundFullDuplex(iface); + TRACE("(%p,%s,%p)\n", This, debugstr_guid(riid), ppv); + return IUnknown_QueryInterface(&This->IUnknown_iface, riid, ppv); +} + static ULONG WINAPI IDirectSoundFullDuplexImpl_AddRef(IDirectSoundFullDuplex *iface) { IDirectSoundFullDuplexImpl *This = impl_from_IDirectSoundFullDuplex(iface); @@ -134,37 +164,6 @@ static ULONG WINAPI IDirectSoundFullDuplexImpl_AddRef(IDirectSoundFullDuplex *if return ref; } -static HRESULT WINAPI IDirectSoundFullDuplexImpl_QueryInterface(IDirectSoundFullDuplex *iface, - REFIID riid, void **ppv) -{ - IDirectSoundFullDuplexImpl *This = impl_from_IDirectSoundFullDuplex(iface); - TRACE("(%p,%s,%p)\n", This, debugstr_guid(riid), ppv); - - if (ppv == NULL) { - WARN("invalid parameter\n"); - return E_INVALIDARG; - } - - *ppv = NULL; - - if (IsEqualIID(riid, &IID_IUnknown)) { - IUnknown_AddRef(&This->IUnknown_iface); - *ppv = &This->IUnknown_iface; - return S_OK; - } else if (IsEqualIID(riid, &IID_IDirectSoundFullDuplex)) { - IDirectSoundFullDuplexImpl_AddRef(iface); - *ppv = &This->IDirectSoundFullDuplex_iface; - return S_OK; - } else if (This->ds8_unk && (IsEqualIID(riid, &IID_IDirectSound) || - IsEqualIID(riid, &IID_IDirectSound8))) { - return IUnknown_QueryInterface(This->ds8_unk, riid, ppv); - } else if (This->dsc8_unk && IsEqualIID(riid, &IID_IDirectSoundCapture)) { - return IUnknown_QueryInterface(This->dsc8_unk, riid, ppv); - } - - return E_NOINTERFACE; -} - static ULONG WINAPI IDirectSoundFullDuplexImpl_Release(IDirectSoundFullDuplex *iface) { IDirectSoundFullDuplexImpl *This = impl_from_IDirectSoundFullDuplex(iface);
1
0
0
0
Michael Stefaniuc : dsound: Aggregate IDirectSoundCapture8 instead of wrapping it.
by Alexandre Julliard
16 Aug '12
16 Aug '12
Module: wine Branch: master Commit: 0d33e204d1016c317f656c627a2c4537d1d9e315 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d33e204d1016c317f656c627…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Aug 16 01:50:27 2012 +0200 dsound: Aggregate IDirectSoundCapture8 instead of wrapping it. --- dlls/dsound/duplex.c | 172 ++++++++------------------------------------------ 1 files changed, 26 insertions(+), 146 deletions(-) diff --git a/dlls/dsound/duplex.c b/dlls/dsound/duplex.c index c521486..5e57bbd 100644 --- a/dlls/dsound/duplex.c +++ b/dlls/dsound/duplex.c @@ -46,27 +46,24 @@ typedef struct IDirectSoundFullDuplexImpl IDirectSoundFullDuplex IDirectSoundFullDuplex_iface; LONG ref, refdsfd, numIfaces; IUnknown *ds8_unk; /* Aggregated IDirectSound8 */ - IDirectSoundCapture *capture_device; - LPDIRECTSOUNDCAPTURE pDSC; + IUnknown *dsc8_unk; /* Aggregated IDirectSoundCapture8 */ } IDirectSoundFullDuplexImpl; -typedef struct IDirectSoundFullDuplex_IDirectSoundCapture { - const IDirectSoundCaptureVtbl *lpVtbl; - LONG ref; - IDirectSoundFullDuplexImpl *pdsfd; -} IDirectSoundFullDuplex_IDirectSoundCapture; - static void fullduplex_destroy(IDirectSoundFullDuplexImpl *This) { IDirectSound8 *ds8; + IDirectSoundCapture8 *dsc8; - if (This->capture_device) - IDirectSoundCapture_Release(This->capture_device); if (This->ds8_unk) { IUnknown_QueryInterface(This->ds8_unk, &IID_IDirectSound8, (void**)&ds8); while(IDirectSound8_Release(ds8) > 0); IUnknown_Release(This->ds8_unk); } + if (This->dsc8_unk) { + IUnknown_QueryInterface(This->dsc8_unk, &IID_IDirectSoundCapture8, (void**)&dsc8); + while(IDirectSoundCapture_Release(dsc8) > 0); + IUnknown_Release(This->dsc8_unk); + } HeapFree(GetProcessHeap(), 0, This); TRACE("(%p) released\n", This); } @@ -117,120 +114,6 @@ static const IUnknownVtbl unk_vtbl = IUnknownImpl_Release }; -/******************************************************************************* - * IDirectSoundFullDuplex_IDirectSoundCapture - */ -static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSoundCapture_QueryInterface( - LPDIRECTSOUNDCAPTURE iface, - REFIID riid, - LPVOID * ppobj) -{ - IDirectSoundFullDuplex_IDirectSoundCapture *This = (IDirectSoundFullDuplex_IDirectSoundCapture *)iface; - TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppobj); - return IDirectSoundFullDuplex_QueryInterface(&This->pdsfd->IDirectSoundFullDuplex_iface, riid, ppobj); -} - -static ULONG WINAPI IDirectSoundFullDuplex_IDirectSoundCapture_AddRef( - LPDIRECTSOUNDCAPTURE iface) -{ - IDirectSoundFullDuplex_IDirectSoundCapture *This = (IDirectSoundFullDuplex_IDirectSoundCapture *)iface; - ULONG ref = InterlockedIncrement(&(This->ref)); - TRACE("(%p) ref was %d\n", This, ref - 1); - return ref; -} - -static ULONG WINAPI IDirectSoundFullDuplex_IDirectSoundCapture_Release( - LPDIRECTSOUNDCAPTURE iface) -{ - IDirectSoundFullDuplex_IDirectSoundCapture *This = (IDirectSoundFullDuplex_IDirectSoundCapture *)iface; - ULONG ref = InterlockedDecrement(&(This->ref)); - TRACE("(%p) ref was %d\n", This, ref + 1); - if (!ref) { - This->pdsfd->pDSC = NULL; - HeapFree(GetProcessHeap(), 0, This); - TRACE("(%p) released\n", This); - } - return ref; -} - -static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSoundCapture_CreateCaptureBuffer( - LPDIRECTSOUNDCAPTURE iface, - LPCDSCBUFFERDESC lpcDSCBufferDesc, - LPDIRECTSOUNDCAPTUREBUFFER* lplpDSCaptureBuffer, - LPUNKNOWN pUnk) -{ - IDirectSoundFullDuplex_IDirectSoundCapture *This = (IDirectSoundFullDuplex_IDirectSoundCapture *)iface; - TRACE("(%p,%p,%p,%p)\n",This,lpcDSCBufferDesc,lplpDSCaptureBuffer,pUnk); - return IDirectSoundCapture_CreateCaptureBuffer(This->pdsfd->capture_device,lpcDSCBufferDesc,lplpDSCaptureBuffer,pUnk); -} - -static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSoundCapture_GetCaps( - LPDIRECTSOUNDCAPTURE iface, - LPDSCCAPS lpDSCCaps) -{ - IDirectSoundFullDuplex_IDirectSoundCapture *This = (IDirectSoundFullDuplex_IDirectSoundCapture *)iface; - TRACE("(%p,%p)\n",This,lpDSCCaps); - return IDirectSoundCapture_GetCaps(This->pdsfd->capture_device, lpDSCCaps); -} - -static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSoundCapture_Initialize( - LPDIRECTSOUNDCAPTURE iface, - LPCGUID lpcGUID) -{ - IDirectSoundFullDuplex_IDirectSoundCapture *This = (IDirectSoundFullDuplex_IDirectSoundCapture *)iface; - TRACE("(%p, %s)\n", This, debugstr_guid(lpcGUID)); - return IDirectSoundCapture_Initialize(This->pdsfd->capture_device,lpcGUID); -} - -static const IDirectSoundCaptureVtbl DirectSoundFullDuplex_DirectSoundCapture_Vtbl = -{ - IDirectSoundFullDuplex_IDirectSoundCapture_QueryInterface, - IDirectSoundFullDuplex_IDirectSoundCapture_AddRef, - IDirectSoundFullDuplex_IDirectSoundCapture_Release, - IDirectSoundFullDuplex_IDirectSoundCapture_CreateCaptureBuffer, - IDirectSoundFullDuplex_IDirectSoundCapture_GetCaps, - IDirectSoundFullDuplex_IDirectSoundCapture_Initialize -}; - -static HRESULT IDirectSoundFullDuplex_IDirectSoundCapture_Create( - IDirectSoundFullDuplexImpl *pdsfd, - LPDIRECTSOUNDCAPTURE8 * ppdsc8) -{ - IDirectSoundFullDuplex_IDirectSoundCapture * pdsfddsc; - TRACE("(%p,%p)\n",pdsfd,ppdsc8); - - if (pdsfd == NULL) { - ERR("invalid parameter: pdsfd == NULL\n"); - return DSERR_INVALIDPARAM; - } - - if (ppdsc8 == NULL) { - ERR("invalid parameter: ppdsc8 == NULL\n"); - return DSERR_INVALIDPARAM; - } - - if (pdsfd->capture_device == NULL) { - WARN("not initialized\n"); - *ppdsc8 = NULL; - return DSERR_UNINITIALIZED; - } - - pdsfddsc = HeapAlloc(GetProcessHeap(),0,sizeof(*pdsfddsc)); - if (pdsfddsc == NULL) { - WARN("out of memory\n"); - *ppdsc8 = NULL; - return DSERR_OUTOFMEMORY; - } - - pdsfddsc->lpVtbl = &DirectSoundFullDuplex_DirectSoundCapture_Vtbl; - pdsfddsc->ref = 0; - pdsfddsc->pdsfd = pdsfd; - - *ppdsc8 = (LPDIRECTSOUNDCAPTURE)pdsfddsc; - - return DS_OK; -} - /*************************************************************************** * IDirectSoundFullDuplex implementation */ @@ -275,18 +158,8 @@ static HRESULT WINAPI IDirectSoundFullDuplexImpl_QueryInterface(IDirectSoundFull } else if (This->ds8_unk && (IsEqualIID(riid, &IID_IDirectSound) || IsEqualIID(riid, &IID_IDirectSound8))) { return IUnknown_QueryInterface(This->ds8_unk, riid, ppv); - } else if (IsEqualIID(riid, &IID_IDirectSoundCapture)) { - if (!This->pDSC) { - IDirectSoundFullDuplex_IDirectSoundCapture_Create(This, &This->pDSC); - if (!This->pDSC) { - WARN("IDirectSoundFullDuplex_IDirectSoundCapture_Create() failed\n"); - *ppv = NULL; - return E_NOINTERFACE; - } - } - IDirectSoundFullDuplex_IDirectSoundCapture_AddRef(This->pDSC); - *ppv = This->pDSC; - return S_OK; + } else if (This->dsc8_unk && IsEqualIID(riid, &IID_IDirectSoundCapture)) { + return IUnknown_QueryInterface(This->dsc8_unk, riid, ppv); } return E_NOINTERFACE; @@ -311,6 +184,7 @@ static HRESULT WINAPI IDirectSoundFullDuplexImpl_Initialize(IDirectSoundFullDupl { IDirectSoundFullDuplexImpl *This = impl_from_IDirectSoundFullDuplex(iface); IDirectSound8 *ds8 = NULL; + IDirectSoundCapture8 *dsc8 = NULL; HRESULT hr; TRACE("(%p,%s,%s,%p,%p,%p,%x,%p,%p)\n", This, debugstr_guid(capture_dev), @@ -322,7 +196,7 @@ static HRESULT WINAPI IDirectSoundFullDuplexImpl_Initialize(IDirectSoundFullDupl *dscb8 = NULL; *dsb8 = NULL; - if (This->ds8_unk || This->capture_device != NULL) { + if (This->ds8_unk || This->dsc8_unk) { WARN("already initialized\n"); return DSERR_ALREADYINITIALIZED; } @@ -346,22 +220,26 @@ static HRESULT WINAPI IDirectSoundFullDuplexImpl_Initialize(IDirectSoundFullDupl goto error; } - hr = DSOUND_CaptureCreate8(&IID_IDirectSoundCapture8, (void**)&This->capture_device); - if (SUCCEEDED(hr)) - hr = IDirectSoundCapture_Initialize(This->capture_device, capture_dev); + hr = IDirectSoundCaptureImpl_Create(&This->IUnknown_iface, &IID_IUnknown, + (void**)&This->dsc8_unk, TRUE); + if (SUCCEEDED(hr)) { + IUnknown_QueryInterface(This->dsc8_unk, &IID_IDirectSoundCapture8, (void**)&dsc8); + hr = IDirectSoundCapture_Initialize(dsc8, capture_dev); + } if (hr != DS_OK) { - WARN("DirectSoundCaptureDevice_Initialize() failed\n"); + WARN("Creating/initializing IDirectSoundCapture8 failed\n"); goto error; } - hr = IDirectSoundCapture_CreateCaptureBuffer(This->capture_device, cbufdesc, + hr = IDirectSoundCapture_CreateCaptureBuffer(dsc8, cbufdesc, (IDirectSoundCaptureBuffer**)dscb8, NULL); if (hr != DS_OK) { - WARN("IDirectSoundCaptureBufferImpl_Create() failed\n"); + WARN("IDirectSoundCapture_CreateCaptureBuffer() failed\n"); goto error; } IDirectSound8_Release(ds8); + IDirectSoundCapture_Release(dsc8); return DS_OK; error: @@ -379,9 +257,11 @@ error: IDirectSoundCaptureBuffer8_Release(*dscb8); *dscb8 = NULL; } - if (This->capture_device) { - IDirectSoundCapture_Release(This->capture_device); - This->capture_device = NULL; + if (dsc8) + IDirectSoundCapture_Release(dsc8); + if (This->dsc8_unk) { + IUnknown_Release(This->dsc8_unk); + This->dsc8_unk = NULL; } return hr; }
1
0
0
0
← Newer
1
...
31
32
33
34
35
36
37
...
55
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
Results per page:
10
25
50
100
200