winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2008
----- 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
4 participants
1278 discussions
Start a n
N
ew thread
Dmitry Timoshkov : gdi32: Add SetPixel to the EMF DC functions.
by Alexandre Julliard
28 Apr '08
28 Apr '08
Module: wine Branch: master Commit: c814d17c764341dc127ab1c6307abe5cdf91ff23 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c814d17c764341dc127ab1c63…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Fri Apr 25 22:39:59 2008 +0900 gdi32: Add SetPixel to the EMF DC functions. --- dlls/gdi32/enhmfdrv/init.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c index 2203ced..7e68847 100644 --- a/dlls/gdi32/enhmfdrv/init.c +++ b/dlls/gdi32/enhmfdrv/init.c @@ -130,7 +130,7 @@ static const DC_FUNCTIONS EMFDRV_Funcs = NULL, /* pSetDeviceGammaRamp */ EMFDRV_SetMapMode, /* pSetMapMode */ EMFDRV_SetMapperFlags, /* pSetMapperFlags */ - NULL, /* pSetPixel */ + EMFDRV_SetPixel, /* pSetPixel */ NULL, /* pSetPixelFormat */ EMFDRV_SetPolyFillMode, /* pSetPolyFillMode */ EMFDRV_SetROP2, /* pSetROP2 */
1
0
0
0
Guy Albertelli : listview: Correct return value from LVM_GETORIGIN including tests for this.
by Alexandre Julliard
28 Apr '08
28 Apr '08
Module: wine Branch: master Commit: 7fb21244d9d9369d95c4109e7ad421a176796d59 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7fb21244d9d9369d95c4109e7…
Author: Guy Albertelli <galberte(a)neo.rr.com> Date: Sat Apr 26 00:20:09 2008 -0400 listview: Correct return value from LVM_GETORIGIN including tests for this. Tests to validate return value of the LVM_GETORIGIN message and fix our implementation. --- dlls/comctl32/listview.c | 2 + dlls/comctl32/tests/listview.c | 49 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index a634f98..7760ecb 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -9632,6 +9632,8 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case LVM_GETORIGIN: if (!lParam) return FALSE; + if ((infoPtr->dwStyle & LVS_TYPEMASK) == LVS_REPORT || + (infoPtr->dwStyle & LVS_TYPEMASK) == LVS_LIST) return FALSE; LISTVIEW_GetOrigin(infoPtr, (LPPOINT)lParam); return TRUE; diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index ad82579..838691c 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -1076,6 +1076,54 @@ static void test_item_position(void) DestroyWindow(hwnd); } +static void test_getorigin(void) +{ + /* LVM_GETORIGIN */ + + HWND hwnd; + DWORD r; + POINT position; + + position.x = position.y = 0; + + hwnd = create_custom_listview_control(LVS_ICON); + ok(hwnd != NULL, "failed to create a listview window\n"); + flush_sequences(sequences, NUM_MSG_SEQUENCES); + trace("test get origin results\n"); + r = SendMessage(hwnd, LVM_GETORIGIN, 0, (LPARAM)&position); + expect(TRUE, r); + flush_sequences(sequences, NUM_MSG_SEQUENCES); + DestroyWindow(hwnd); + + hwnd = create_custom_listview_control(LVS_SMALLICON); + ok(hwnd != NULL, "failed to create a listview window\n"); + flush_sequences(sequences, NUM_MSG_SEQUENCES); + trace("test get origin results\n"); + r = SendMessage(hwnd, LVM_GETORIGIN, 0, (LPARAM)&position); + expect(TRUE, r); + flush_sequences(sequences, NUM_MSG_SEQUENCES); + DestroyWindow(hwnd); + + hwnd = create_custom_listview_control(LVS_LIST); + ok(hwnd != NULL, "failed to create a listview window\n"); + flush_sequences(sequences, NUM_MSG_SEQUENCES); + trace("test get origin results\n"); + r = SendMessage(hwnd, LVM_GETORIGIN, 0, (LPARAM)&position); + expect(FALSE, r); + flush_sequences(sequences, NUM_MSG_SEQUENCES); + DestroyWindow(hwnd); + + hwnd = create_custom_listview_control(LVS_REPORT); + ok(hwnd != NULL, "failed to create a listview window\n"); + flush_sequences(sequences, NUM_MSG_SEQUENCES); + trace("test get origin results\n"); + r = SendMessage(hwnd, LVM_GETORIGIN, 0, (LPARAM)&position); + expect(FALSE, r); + flush_sequences(sequences, NUM_MSG_SEQUENCES); + DestroyWindow(hwnd); + +} + START_TEST(listview) { HMODULE hComctl32; @@ -1111,4 +1159,5 @@ START_TEST(listview) test_item_count(); test_item_position(); test_columns(); + test_getorigin(); }
1
0
0
0
Guy Albertelli : listview: Implement 2 pixel decoration at top of report style with grid lines.
by Alexandre Julliard
28 Apr '08
28 Apr '08
Module: wine Branch: master Commit: e85fa81f3cc8b52f01b603cb228379a0ed764cdf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e85fa81f3cc8b52f01b603cb2…
Author: Guy Albertelli <galberte(a)neo.rr.com> Date: Sat Apr 26 00:20:06 2008 -0400 listview: Implement 2 pixel decoration at top of report style with grid lines. The native control has a 2 pixel header. This implements that background pixel line and the gridline below it. --- dlls/comctl32/listview.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index ad0ad0e..a634f98 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -4100,6 +4100,9 @@ static void LISTVIEW_RefreshReportGrid(LISTVIEW_INFO *infoPtr, HDC hdc) itemheight = LISTVIEW_CalculateItemHeight(infoPtr); rcItem.left = infoPtr->rcList.left + Origin.x; rcItem.right = infoPtr->rcList.right + Origin.x; + rcItem.bottom = rcItem.top = Origin.y - 1; + MoveToEx(hdc, rcItem.left, rcItem.top, NULL); + LineTo(hdc, rcItem.right, rcItem.top); for(y=itemheight-1+Origin.y; y<=infoPtr->rcList.bottom; y+=itemheight) { rcItem.bottom = rcItem.top = y; @@ -7131,6 +7134,13 @@ static DWORD LISTVIEW_SetExtendedListViewStyle(LISTVIEW_INFO *infoPtr, DWORD dwM SetWindowLongW(infoPtr->hwndHeader, GWL_STYLE, dwStyle); } + /* GRIDLINES adds decoration at top so changes sizes */ + if((infoPtr->dwLvExStyle ^ dwOldExStyle) & LVS_EX_GRIDLINES) + { + LISTVIEW_UpdateSize(infoPtr); + } + + LISTVIEW_InvalidateList(infoPtr); return dwOldExStyle; } @@ -9368,10 +9378,12 @@ static void LISTVIEW_UpdateSize(LISTVIEW_INFO *infoPtr) hl.prc = &infoPtr->rcList; hl.pwpos = ℘ SendMessageW( infoPtr->hwndHeader, HDM_LAYOUT, 0, (LPARAM)&hl ); - + TRACE(" wp.flags=0x%08x, wp=%d,%d (%dx%d)\n", wp.flags, wp.x, wp.y, wp.cx, wp.cy); SetWindowPos(wp.hwnd, wp.hwndInsertAfter, wp.x, wp.y, wp.cx, wp.cy, wp.flags); + TRACE(" after SWP wp=%d,%d (%dx%d)\n", wp.x, wp.y, wp.cx, wp.cy); infoPtr->rcList.top = max(wp.cy, 0); + infoPtr->rcList.top += (infoPtr->dwLvExStyle & LVS_EX_GRIDLINES) ? 2 : 0; } TRACE(" rcList=%s\n", wine_dbgstr_rect(&infoPtr->rcList));
1
0
0
0
Guy Albertelli : listview: Implement LVS_EX_GRIDLINES functionality.
by Alexandre Julliard
28 Apr '08
28 Apr '08
Module: wine Branch: master Commit: 7326f091b0f19e2043fcccc2d4d75c3e43cdae92 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7326f091b0f19e2043fcccc2d…
Author: Guy Albertelli <galberte(a)neo.rr.com> Date: Sat Apr 26 00:20:03 2008 -0400 listview: Implement LVS_EX_GRIDLINES functionality. Implement basic LVS_EX_GRIDLINES functionality including support for no items. --- dlls/comctl32/listview.c | 94 +++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 93 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index ab819e6..ad0ad0e 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -91,7 +91,6 @@ * Extended Styles * -- LVS_EX_BORDERSELECT * -- LVS_EX_FLATSB - * -- LVS_EX_GRIDLINES * -- LVS_EX_HEADERDRAGDROP * -- LVS_EX_INFOTIP * -- LVS_EX_LABELTIP @@ -2495,6 +2494,8 @@ static INT LISTVIEW_CalculateItemHeight(const LISTVIEW_INFO *infoPtr) else { nItemHeight = infoPtr->ntmHeight; + if (uView == LVS_REPORT && infoPtr->dwLvExStyle & LVS_EX_GRIDLINES) + nItemHeight++; if (infoPtr->himlState) nItemHeight = max(nItemHeight, infoPtr->iconStateSize.cy); if (infoPtr->himlSmall) @@ -3873,6 +3874,11 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS else rcLabel.left += LABEL_HOR_PADDING; } else if (uFormat & DT_RIGHT) rcLabel.right -= LABEL_HOR_PADDING; + + /* for GRIDLINES reduce the bottom so the text formats correctly */ + if (uView == LVS_REPORT && infoPtr->dwLvExStyle & LVS_EX_GRIDLINES) + rcLabel.bottom--; + DrawTextW(hdc, lvItem.pszText, -1, &rcLabel, uFormat); postpaint: @@ -4029,6 +4035,86 @@ static void LISTVIEW_RefreshReport(LISTVIEW_INFO *infoPtr, ITERATOR *i, HDC hdc, /*** * DESCRIPTION: + * Draws the gridlines if necessary when in report display mode. + * + * PARAMETER(S): + * [I] infoPtr : valid pointer to the listview structure + * [I] hdc : device context handle + * + * RETURN: + * None + */ +static void LISTVIEW_RefreshReportGrid(LISTVIEW_INFO *infoPtr, HDC hdc) +{ + INT rgntype; + INT y, itemheight; + HPEN hPen, hOldPen; + RECT rcClip, rcItem; + POINT Origin; + RANGE colRange; + ITERATOR j; + + TRACE("()\n"); + + /* figure out what to draw */ + rgntype = GetClipBox(hdc, &rcClip); + if (rgntype == NULLREGION) return; + + /* Get scroll info once before loop */ + LISTVIEW_GetOrigin(infoPtr, &Origin); + + /* narrow down the columns we need to paint */ + for(colRange.lower = 0; colRange.lower < DPA_GetPtrCount(infoPtr->hdpaColumns); colRange.lower++) + { + LISTVIEW_GetHeaderRect(infoPtr, colRange.lower, &rcItem); + if (rcItem.right + Origin.x >= rcClip.left) break; + } + for(colRange.upper = DPA_GetPtrCount(infoPtr->hdpaColumns); colRange.upper > 0; colRange.upper--) + { + LISTVIEW_GetHeaderRect(infoPtr, colRange.upper - 1, &rcItem); + if (rcItem.left + Origin.x < rcClip.right) break; + } + iterator_rangeitems(&j, colRange); + + if ((hPen = CreatePen( PS_SOLID, 1, comctl32_color.clr3dFace ))) + { + hOldPen = SelectObject ( hdc, hPen ); + + /* draw the vertical lines for the columns */ + iterator_rangeitems(&j, colRange); + while(iterator_next(&j)) + { + LISTVIEW_GetHeaderRect(infoPtr, j.nItem, &rcItem); + if (rcItem.left == 0) continue; /* skip first column */ + rcItem.left += Origin.x; + rcItem.right += Origin.x; + rcItem.top = infoPtr->rcList.top; + rcItem.bottom = infoPtr->rcList.bottom; + TRACE("vert col=%d, rcItem=%s\n", j.nItem, wine_dbgstr_rect(&rcItem)); + MoveToEx (hdc, rcItem.left, rcItem.top, NULL); + LineTo (hdc, rcItem.left, rcItem.bottom); + } + iterator_destroy(&j); + + /* draw the horizontial lines for the rows */ + itemheight = LISTVIEW_CalculateItemHeight(infoPtr); + rcItem.left = infoPtr->rcList.left + Origin.x; + rcItem.right = infoPtr->rcList.right + Origin.x; + for(y=itemheight-1+Origin.y; y<=infoPtr->rcList.bottom; y+=itemheight) + { + rcItem.bottom = rcItem.top = y; + TRACE("horz rcItem=%s\n", wine_dbgstr_rect(&rcItem)); + MoveToEx (hdc, rcItem.left, rcItem.top, NULL); + LineTo (hdc, rcItem.right, rcItem.top); + } + + SelectObject( hdc, hOldPen ); + DeleteObject( hPen ); + } +} + +/*** + * DESCRIPTION: * Draws listview items when in list display mode. * * PARAMETER(S): @@ -4175,6 +4261,12 @@ static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc, const RECT *prcEra iterator_destroy(&i); enddraw: + /* For LVS_EX_GRIDLINES go and draw lines */ + /* This includes the case where there were *no* items */ + if ((infoPtr->dwStyle & LVS_TYPEMASK) == LVS_REPORT && + infoPtr->dwLvExStyle & LVS_EX_GRIDLINES) + LISTVIEW_RefreshReportGrid(infoPtr, hdc); + if (cdmode & CDRF_NOTIFYPOSTPAINT) notify_postpaint(infoPtr, &nmlvcd);
1
0
0
0
Maarten Lankhorst : quartz: Fix acmwrapper time regression.
by Alexandre Julliard
28 Apr '08
28 Apr '08
Module: wine Branch: master Commit: 10708b405c2303e782a688edad1a79215fca142d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=10708b405c2303e782a688eda…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Fri Apr 25 15:14:54 2008 -0700 quartz: Fix acmwrapper time regression. --- dlls/quartz/acmwrapper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c index 65f196a..c7b1e42 100644 --- a/dlls/quartz/acmwrapper.c +++ b/dlls/quartz/acmwrapper.c @@ -170,7 +170,7 @@ static HRESULT ACMWrapper_ProcessSampleData(TransformFilterImpl* pTransformFilte if (ash.cbSrcLengthUsed == cbSrcStream) { IMediaSample_SetTime(pOutSample, &tStart, &tStop); - tStart = tStop; + tStart = tMed = tStop; } else if (tStop != tStart) {
1
0
0
0
Maarten Lankhorst : quartz: Add a function that can be called when stopping processing data.
by Alexandre Julliard
28 Apr '08
28 Apr '08
Module: wine Branch: master Commit: 512ee927cb56a6b3355550c2f929d34f080247ea URL:
http://source.winehq.org/git/wine.git/?a=commit;h=512ee927cb56a6b3355550c2f…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Fri Apr 25 14:59:05 2008 -0700 quartz: Add a function that can be called when stopping processing data. --- dlls/quartz/avisplit.c | 2 +- dlls/quartz/mpegsplit.c | 2 +- dlls/quartz/parser.c | 65 +++++++++++++++++++++++++++++++--------------- dlls/quartz/parser.h | 2 +- dlls/quartz/pin.c | 12 ++++++-- dlls/quartz/pin.h | 8 +++++- dlls/quartz/waveparser.c | 2 +- 7 files changed, 64 insertions(+), 29 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=512ee927cb56a6b335555…
1
0
0
0
Maarten Lankhorst : quartz: Make dwSamplesProcessed a longlong.
by Alexandre Julliard
28 Apr '08
28 Apr '08
Module: wine Branch: master Commit: ec87de35af3ccb76383697b51aefe8041bbfdc15 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ec87de35af3ccb76383697b51…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Fri Apr 25 14:50:22 2008 -0700 quartz: Make dwSamplesProcessed a longlong. --- dlls/quartz/parser.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/quartz/parser.h b/dlls/quartz/parser.h index 6fda5e3..f30a8fd 100644 --- a/dlls/quartz/parser.h +++ b/dlls/quartz/parser.h @@ -52,7 +52,7 @@ typedef struct Parser_OutputPin OutputPin pin; AM_MEDIA_TYPE * pmt; - DWORD dwSamplesProcessed; + LONGLONG dwSamplesProcessed; } Parser_OutputPin; extern HRESULT Parser_AddPin(ParserImpl * This, const PIN_INFO * piOutput, ALLOCATOR_PROPERTIES * props, const AM_MEDIA_TYPE * amt);
1
0
0
0
Maarten Lankhorst : quartz: Optimize the file source to do its job better.
by Alexandre Julliard
28 Apr '08
28 Apr '08
Module: wine Branch: master Commit: 12a0fd3d8b0acff07ec07b4d7f5ea1f79effad93 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=12a0fd3d8b0acff07ec07b4d7…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Fri Apr 25 14:33:15 2008 -0700 quartz: Optimize the file source to do its job better. --- dlls/quartz/filesource.c | 42 +++++++++++++++++++++++++++++++++--------- 1 files changed, 33 insertions(+), 9 deletions(-) diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index a44de7a..1ac37b0 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -769,6 +769,8 @@ typedef struct FileAsyncReader LONG samples; CRITICAL_SECTION csList; /* critical section to prevent concurrency issues */ DATAREQUEST *sample_list; + + /* Have a handle for every sample, and then one more as flushing handle */ HANDLE *handle_list; } FileAsyncReader; @@ -832,7 +834,7 @@ static ULONG WINAPI FileAsyncReaderPin_Release(IPin * iface) CoTaskMemFree(This->sample_list); if (This->handle_list) { - for (x = 0; x < This->samples; ++x) + for (x = 0; x <= This->samples; ++x) CloseHandle(This->handle_list[x]); CoTaskMemFree(This->handle_list); } @@ -1009,7 +1011,7 @@ done: if (This->handle_list) { int x; - for (x = 0; x < This->samples; ++x) + for (x = 0; x <= This->samples; ++x) CloseHandle(This->handle_list[x]); CoTaskMemFree(This->handle_list); } @@ -1017,7 +1019,7 @@ done: This->samples = pProps->cBuffers; TRACE("Samples: %u\n", This->samples); This->sample_list = CoTaskMemAlloc(sizeof(This->sample_list[0]) * pProps->cBuffers); - This->handle_list = CoTaskMemAlloc(sizeof(HANDLE) * pProps->cBuffers); + This->handle_list = CoTaskMemAlloc(sizeof(HANDLE) * (pProps->cBuffers + 1)); if (This->sample_list && This->handle_list) { @@ -1027,6 +1029,7 @@ done: { This->sample_list[x].ovl.hEvent = This->handle_list[x] = CreateEventW(NULL, 0, 0, NULL); } + This->handle_list[This->samples] = CreateEventW(NULL, 1, 0, NULL); This->pin.allocProps = *pProps; } else @@ -1060,6 +1063,7 @@ static HRESULT WINAPI FileAsyncReader_Request(IAsyncReader * iface, IMediaSample REFERENCE_TIME Stop; FileAsyncReader *This = impl_from_IAsyncReader(iface); LPBYTE pBuffer = NULL; + DWORD wait; TRACE("(%p, %lx)\n", pSample, dwUser); @@ -1080,17 +1084,32 @@ static HRESULT WINAPI FileAsyncReader_Request(IAsyncReader * iface, IMediaSample return VFW_E_WRONG_STATE; } + wait = WaitForMultipleObjectsEx(This->samples, This->handle_list, FALSE, 0, FALSE); + if (wait < This->samples - 1) + SetEvent(This->handle_list[wait]); + else + wait = This->samples; + if (SUCCEEDED(hr)) { DWORD dwLength = (DWORD) BYTES_FROM_MEDIATIME(Stop - Start); DATAREQUEST *pDataRq; int x; - for (x = 0; x < This->samples; ++x) + /* Try to insert above the waiting sample if possible */ + for (x = wait + 1; x < This->samples; ++x) { if (!This->sample_list[x].pSample) break; } + + if (x >= This->samples) + for (x = 0; x < This->samples; ++x) + { + if (!This->sample_list[x].pSample) + break; + } + assert(x < This->samples); InterlockedIncrement(&This->queued_number); @@ -1138,20 +1157,20 @@ static HRESULT WINAPI FileAsyncReader_WaitForNext(IAsyncReader * iface, DWORD dw { if (!This->queued_number) { - ERR("Called without samples in queue and not flushing!!\n"); - return E_FAIL; + /* It could be that nothing is queued right now, but that can be fixed */ + WARN("Called without samples in queue and not flushing!!\n"); } /* wait for an object to read, or time out */ - buffer = WaitForMultipleObjectsEx(This->samples, This->handle_list, FALSE, dwTimeout, TRUE); + buffer = WaitForMultipleObjectsEx(This->samples+1, This->handle_list, FALSE, dwTimeout, TRUE); - if (buffer >= MAXIMUM_WAIT_OBJECTS) + if (buffer >= This->samples) { FIXME("Returned: %u (%08x)\n", buffer, GetLastError()); hr = VFW_E_TIMEOUT; buffer = ~0; } - else + else if (buffer < This->samples) InterlockedDecrement(&This->queued_number); } @@ -1161,7 +1180,10 @@ static HRESULT WINAPI FileAsyncReader_WaitForNext(IAsyncReader * iface, DWORD dw for (buffer = 0; buffer < This->samples; ++buffer) { if (This->sample_list[buffer].pSample) + { + ResetEvent(This->handle_list[buffer]); break; + } } if (buffer == This->samples) { @@ -1311,6 +1333,7 @@ static HRESULT WINAPI FileAsyncReader_BeginFlush(IAsyncReader * iface) EnterCriticalSection(&This->csList); This->bFlushing = TRUE; CancelIo(This->hFile); + SetEvent(This->handle_list[This->samples]); LeaveCriticalSection(&This->csList); return S_OK; @@ -1323,6 +1346,7 @@ static HRESULT WINAPI FileAsyncReader_EndFlush(IAsyncReader * iface) TRACE("()\n"); EnterCriticalSection(&This->csList); + ResetEvent(This->handle_list[This->samples]); This->bFlushing = FALSE; LeaveCriticalSection(&This->csList);
1
0
0
0
Maarten Lankhorst : quartz: Make the EnumPins interface dynamic.
by Alexandre Julliard
28 Apr '08
28 Apr '08
Module: wine Branch: master Commit: 79349513435aa677e584bcad66865cafbac95db9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79349513435aa677e584bcad6…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Fri Apr 25 14:25:49 2008 -0700 quartz: Make the EnumPins interface dynamic. Take a reference to the ibasefilter and request it for the pins and a cookie. This seems to be the easiest way to ensure correctness. --- dlls/quartz/dsoundrender.c | 41 ++++++++++++------------- dlls/quartz/enumpins.c | 69 ++++++++++++++++++++++++++++-------------- dlls/quartz/filesource.c | 25 ++++++++++++--- dlls/quartz/nullrenderer.c | 33 ++++++++++++-------- dlls/quartz/parser.c | 27 +++++++++++++--- dlls/quartz/parser.h | 1 + dlls/quartz/quartz_private.h | 10 ++---- dlls/quartz/transform.c | 20 ++++++++++-- dlls/quartz/videorenderer.c | 52 ++++++++++++++++++++----------- 9 files changed, 182 insertions(+), 96 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=79349513435aa677e584b…
1
0
0
0
Maarten Lankhorst : quartz: Fix time discontinuities in the acm wrapper.
by Alexandre Julliard
28 Apr '08
28 Apr '08
Module: wine Branch: master Commit: b7e20bfdd1bc9777e56cb3fe73976e38146c1741 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b7e20bfdd1bc9777e56cb3fe7…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Fri Apr 25 14:15:42 2008 -0700 quartz: Fix time discontinuities in the acm wrapper. --- dlls/quartz/acmwrapper.c | 42 ++++++++++++++++++++++++++++++++++-------- 1 files changed, 34 insertions(+), 8 deletions(-) diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c index 11b07f1..65f196a 100644 --- a/dlls/quartz/acmwrapper.c +++ b/dlls/quartz/acmwrapper.c @@ -47,6 +47,9 @@ typedef struct ACMWrapperImpl HACMSTREAM has; LPWAVEFORMATEX pWfIn; LPWAVEFORMATEX pWfOut; + + LONGLONG lasttime_real; + LONGLONG lasttime_sent; } ACMWrapperImpl; static HRESULT ACMWrapper_ProcessSampleData(TransformFilterImpl* pTransformFilter, IMediaSample *pSample) @@ -75,6 +78,19 @@ static HRESULT ACMWrapper_ProcessSampleData(TransformFilterImpl* pTransformFilte IMediaSample_GetTime(pSample, &tStart, &tStop); cbSrcStream = IMediaSample_GetActualDataLength(pSample); + /* Prevent discontinuities when codecs 'absorb' data but not give anything back in return */ + if (IMediaSample_IsDiscontinuity(pSample) == S_OK) + { + This->lasttime_real = tStart; + This->lasttime_sent = tStart; + } + else if (This->lasttime_real == tStart) + tStart = This->lasttime_sent; + else + WARN("Discontinuity\n"); + + tMed = tStart; + TRACE("Sample data ptr = %p, size = %ld\n", pbSrcStream, (long)cbSrcStream); hr = IPin_ConnectionMediaType(This->tf.ppPins[0], &amt); @@ -132,19 +148,20 @@ static HRESULT ACMWrapper_ProcessSampleData(TransformFilterImpl* pTransformFilte if (res) { - if(res != MMSYSERR_MOREDATA) - ERR("Cannot convert data header %d\n", res); - goto error; - } + if(res != MMSYSERR_MOREDATA) + ERR("Cannot convert data header %d\n", res); + goto error; + } - TRACE("used in %u/%u, used out %u/%u\n", ash.cbSrcLengthUsed, ash.cbSrcLength, ash.cbDstLengthUsed, ash.cbDstLength); + TRACE("used in %u/%u, used out %u/%u\n", ash.cbSrcLengthUsed, ash.cbSrcLength, ash.cbDstLengthUsed, ash.cbDstLength); - hr = IMediaSample_SetActualDataLength(pOutSample, ash.cbDstLengthUsed); - assert(hr == S_OK); + hr = IMediaSample_SetActualDataLength(pOutSample, ash.cbDstLengthUsed); + assert(hr == S_OK); + /* Bug in acm codecs? It apparantly uses the input, but doesn't necessarily output immediately kl*/ if (!ash.cbSrcLengthUsed) { - WARN("Sample was skipped\n"); + WARN("Sample was skipped? Outputted: %u\n", ash.cbDstLengthUsed); ash.cbSrcLength = 0; goto error; } @@ -187,8 +204,15 @@ error: if (pOutSample) IMediaSample_Release(pOutSample); pOutSample = NULL; + } + This->lasttime_real = tStop; + This->lasttime_sent = tMed; + + if (hr != S_OK) + FIXME("FATALITY: %08x\n", hr); + return hr; } @@ -252,6 +276,7 @@ static HRESULT ACMWrapper_Cleanup(TransformFilterImpl* pTransformFilter) acmStreamClose(This->has, 0); This->has = 0; + This->lasttime_real = This->lasttime_sent = -1; return S_OK; } @@ -287,6 +312,7 @@ HRESULT ACMWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv) return hr; *ppv = (LPVOID)This; + This->lasttime_real = This->lasttime_sent = -1; return hr; }
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
128
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Results per page:
10
25
50
100
200