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
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
June 2011
----- 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
809 discussions
Start a n
N
ew thread
Alexandre Julliard : winex11: Try harder to ignore broken raw motions events caused by pointer warping.
by Alexandre Julliard
20 Jun '11
20 Jun '11
Module: wine Branch: master Commit: adb86c5f2a2584dc8131b08d26aef7c82910d0b5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=adb86c5f2a2584dc8131b08d2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 20 19:31:05 2011 +0200 winex11: Try harder to ignore broken raw motions events caused by pointer warping. --- dlls/winex11.drv/mouse.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 8456d67..0ff701f 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -1220,9 +1220,10 @@ BOOL CDECL X11DRV_SetCursorPos( INT x, INT y ) struct x11drv_thread_data *data = x11drv_init_thread_data(); wine_tsx11_lock(); - data->warp_serial = NextRequest( data->display ); XWarpPointer( data->display, root_window, root_window, 0, 0, 0, 0, x - virtual_screen_rect.left, y - virtual_screen_rect.top ); + data->warp_serial = NextRequest( data->display ); + XNoOp( data->display ); XFlush( data->display ); /* avoids bad mouse lag in games that do their own mouse warping */ wine_tsx11_unlock(); TRACE( "warped to %d,%d serial %lu\n", x, y, data->warp_serial ); @@ -1431,14 +1432,12 @@ static void X11DRV_RawMotion( XGenericEventCookie *xev ) if (thread_data->warp_serial) { - long diff = xev->serial - thread_data->warp_serial; - - if (diff >= 0) thread_data->warp_serial = 0; /* we caught up now */ - if (diff <= 0) /* <= 0 because we also want to ignore the first event after the warp request */ + if ((long)(xev->serial - thread_data->warp_serial) < 0) { TRACE( "pos %d,%d old serial %lu, ignoring\n", input.u.mi.dx, input.u.mi.dy, xev->serial ); return; } + thread_data->warp_serial = 0; /* we caught up now */ } TRACE( "pos %d,%d\n", input.u.mi.dx, input.u.mi.dy );
1
0
0
0
Michael Stefaniuc : quartz/tests: Simplify the file handling in filtergraph .c.
by Alexandre Julliard
20 Jun '11
20 Jun '11
Module: wine Branch: master Commit: d2910bb7faaf0ec11d70cbda510c6e7b25feeb0f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d2910bb7faaf0ec11d70cbda5…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Jun 19 14:40:08 2011 +0200 quartz/tests: Simplify the file handling in filtergraph.c. --- dlls/quartz/tests/filtergraph.c | 28 +++++++++------------------- 1 files changed, 9 insertions(+), 19 deletions(-) diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index cd3daaf..596d115 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -41,9 +41,8 @@ typedef struct TestFilterImpl UINT nPins; } TestFilterImpl; -#define FILE_LEN 9 -static const char avifileA[FILE_LEN] = "test.avi"; -static const char mpegfileA[FILE_LEN] = "test.mpg"; +static const WCHAR avifile[] = {'t','e','s','t','.','a','v','i',0}; +static const WCHAR mpegfile[] = {'t','e','s','t','.','m','p','g',0}; static IGraphBuilder *pgraph; @@ -53,17 +52,6 @@ static int createfiltergraph(void) &CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IGraphBuilder, (LPVOID*)&pgraph); } -static void renderfile(const char * fileA) -{ - HRESULT hr; - WCHAR fileW[FILE_LEN]; - - MultiByteToWideChar(CP_ACP, 0, fileA, -1, fileW, FILE_LEN); - - hr = IGraphBuilder_RenderFile(pgraph, fileW, NULL); - ok(hr==S_OK, "RenderFile returned: %x\n", hr); -} - static void rungraph(void) { HRESULT hr; @@ -155,17 +143,19 @@ static void releasefiltergraph(void) ok(hr==0, "Releasing filtergraph returned: %x\n", hr); } -static void test_render_run(const char * fileA) +static void test_render_run(const WCHAR *file) { HANDLE h; + HRESULT hr; if (!createfiltergraph()) return; - h = CreateFileA(fileA, 0, 0, NULL, OPEN_EXISTING, 0, NULL); + h = CreateFileW(file, 0, 0, NULL, OPEN_EXISTING, 0, NULL); if (h != INVALID_HANDLE_VALUE) { CloseHandle(h); - renderfile(fileA); + hr = IGraphBuilder_RenderFile(pgraph, file, NULL); + ok(hr==S_OK, "RenderFile returned: %x\n", hr); rungraph(); } @@ -1883,8 +1873,8 @@ static void test_render_filter_priority(void) START_TEST(filtergraph) { CoInitializeEx(NULL, COINIT_MULTITHREADED); - test_render_run(avifileA); - test_render_run(mpegfileA); + test_render_run(avifile); + test_render_run(mpegfile); test_graph_builder(); test_graph_builder_addfilter(); test_mediacontrol();
1
0
0
0
Michael Stefaniuc : quartz/tests: Store the TestFilterImpl instead of its iface in IEnumPinsImpl.
by Alexandre Julliard
20 Jun '11
20 Jun '11
Module: wine Branch: master Commit: ee9ca54eba21df940d3f0896ce22ee266104211d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ee9ca54eba21df940d3f0896c…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Jun 19 14:36:29 2011 +0200 quartz/tests: Store the TestFilterImpl instead of its iface in IEnumPinsImpl. --- dlls/quartz/tests/filtergraph.c | 50 +++++++++++++++++++------------------- 1 files changed, 25 insertions(+), 25 deletions(-) diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 98445f2..cd3daaf 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -28,6 +28,19 @@ #include "dshow.h" #include "control.h" +typedef struct TestFilterImpl +{ + IBaseFilter IBaseFilter_iface; + + LONG refCount; + CRITICAL_SECTION csFilter; + FILTER_STATE state; + FILTER_INFO filterInfo; + CLSID clsid; + IPin **ppPins; + UINT nPins; +} TestFilterImpl; + #define FILE_LEN 9 static const char avifileA[FILE_LEN] = "test.avi"; static const char mpegfileA[FILE_LEN] = "test.mpg"; @@ -882,14 +895,14 @@ static HRESULT TestFilter_Pin_Construct(const IPinVtbl *Pin_Vtbl, const PIN_INFO /* IEnumPins implementation */ -typedef HRESULT (* FNOBTAINPIN)(IBaseFilter *iface, ULONG pos, IPin **pin, DWORD *lastsynctick); +typedef HRESULT (* FNOBTAINPIN)(TestFilterImpl *tf, ULONG pos, IPin **pin, DWORD *lastsynctick); typedef struct IEnumPinsImpl { IEnumPins IEnumPins_iface; LONG refCount; ULONG uIndex; - IBaseFilter *base; + TestFilterImpl *base; FNOBTAINPIN receive_pin; DWORD synctime; } IEnumPinsImpl; @@ -901,7 +914,7 @@ static inline IEnumPinsImpl *impl_from_IEnumPins(IEnumPins *iface) return CONTAINING_RECORD(iface, IEnumPinsImpl, IEnumPins_iface); } -static HRESULT IEnumPinsImpl_Construct(IEnumPins ** ppEnum, FNOBTAINPIN receive_pin, IBaseFilter *base) +static HRESULT createenumpins(IEnumPins ** ppEnum, FNOBTAINPIN receive_pin, TestFilterImpl *base) { IEnumPinsImpl * pEnumPins; @@ -919,7 +932,7 @@ static HRESULT IEnumPinsImpl_Construct(IEnumPins ** ppEnum, FNOBTAINPIN receive_ pEnumPins->uIndex = 0; pEnumPins->receive_pin = receive_pin; pEnumPins->base = base; - IBaseFilter_AddRef(base); + IBaseFilter_AddRef(&base->IBaseFilter_iface); *ppEnum = &pEnumPins->IEnumPins_iface; receive_pin(base, ~0, NULL, &pEnumPins->synctime); @@ -960,7 +973,7 @@ static ULONG WINAPI IEnumPinsImpl_Release(IEnumPins * iface) if (!refCount) { - IBaseFilter_Release(This->base); + IBaseFilter_Release(&This->base->IBaseFilter_iface); CoTaskMemFree(This); return 0; } @@ -1042,7 +1055,7 @@ static HRESULT WINAPI IEnumPinsImpl_Clone(IEnumPins * iface, IEnumPins ** ppEnum HRESULT hr; IEnumPinsImpl *This = impl_from_IEnumPins(iface); - hr = IEnumPinsImpl_Construct(ppEnum, This->receive_pin, This->base); + hr = createenumpins(ppEnum, This->receive_pin, This->base); if (FAILED(hr)) return hr; return IEnumPins_Skip(*ppEnum, This->uIndex); @@ -1068,19 +1081,6 @@ PIN_DIRECTION pinDir; const GUID *mediasubtype; } TestFilterPinData; -typedef struct TestFilterImpl -{ - IBaseFilter IBaseFilter_iface; - - LONG refCount; - CRITICAL_SECTION csFilter; - FILTER_STATE state; - FILTER_INFO filterInfo; - CLSID clsid; - IPin ** ppPins; - UINT nPins; -} TestFilterImpl; - static const IBaseFilterVtbl TestFilter_Vtbl; static inline TestFilterImpl *impl_from_IBaseFilter(IBaseFilter *iface) @@ -1285,24 +1285,24 @@ static HRESULT WINAPI TestFilter_GetSyncSource(IBaseFilter * iface, IReferenceCl /** IBaseFilter implementation **/ -static HRESULT TestFilter_GetPin(IBaseFilter *iface, ULONG pos, IPin **pin, DWORD *lastsynctick) +static HRESULT getpin_callback(TestFilterImpl *tf, ULONG pos, IPin **pin, DWORD *lastsynctick) { - TestFilterImpl *This = (TestFilterImpl *)iface; - /* Our pins are static, not changing so setting static tick count is ok */ *lastsynctick = 0; - if (pos >= This->nPins) + if (pos >= tf->nPins) return S_FALSE; - *pin = This->ppPins[pos]; + *pin = tf->ppPins[pos]; IPin_AddRef(*pin); return S_OK; } static HRESULT WINAPI TestFilter_EnumPins(IBaseFilter * iface, IEnumPins **ppEnum) { - return IEnumPinsImpl_Construct(ppEnum, TestFilter_GetPin, iface); + TestFilterImpl *This = impl_from_IBaseFilter(iface); + + return createenumpins(ppEnum, getpin_callback, This); } static HRESULT WINAPI TestFilter_FindPin(IBaseFilter * iface, LPCWSTR Id, IPin **ppPin)
1
0
0
0
Michael Stefaniuc : quatz/tests: Pass back the object instead of the iface in createtestfilter().
by Alexandre Julliard
20 Jun '11
20 Jun '11
Module: wine Branch: master Commit: 9f52e80055389fea41f4d2a3bc151b3a6bf8b7fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9f52e80055389fea41f4d2a3b…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Jun 19 14:30:39 2011 +0200 quatz/tests: Pass back the object instead of the iface in createtestfilter(). --- dlls/quartz/tests/filtergraph.c | 159 ++++++++++++++++++++------------------- 1 files changed, 80 insertions(+), 79 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9f52e80055389fea41f4d…
1
0
0
0
Michael Stefaniuc : quartz/tests: Finish the COM cleanup in filtergraph.c.
by Alexandre Julliard
20 Jun '11
20 Jun '11
Module: wine Branch: master Commit: b9d5a5007a6c17381c770d51f040b6abd57d7350 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b9d5a5007a6c17381c770d51f…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Jun 19 14:25:46 2011 +0200 quartz/tests: Finish the COM cleanup in filtergraph.c. --- dlls/quartz/tests/filtergraph.c | 72 +++++++++++++++++++++++--------------- 1 files changed, 43 insertions(+), 29 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=b9d5a5007a6c17381c770…
1
0
0
0
Michael Stefaniuc : quartz/tests: COM cleanup for the IClassFactory iface.
by Alexandre Julliard
20 Jun '11
20 Jun '11
Module: wine Branch: master Commit: b21c2d652244257669198575b4020a4205d3a088 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b21c2d652244257669198575b…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Jun 19 14:24:43 2011 +0200 quartz/tests: COM cleanup for the IClassFactory iface. --- dlls/quartz/tests/filtergraph.c | 39 ++++++++++++++++++++++++++++----------- 1 files changed, 28 insertions(+), 11 deletions(-) diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index e95aa5b..582e2cc 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -1354,11 +1354,16 @@ static const IBaseFilterVtbl TestFilter_Vtbl = typedef struct TestClassFactoryImpl { - IClassFactoryVtbl *lpVtbl; + IClassFactory IClassFactory_iface; const TestFilterPinData *filterPinData; const CLSID *clsid; } TestClassFactoryImpl; +static inline TestClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface) +{ + return CONTAINING_RECORD(iface, TestClassFactoryImpl, IClassFactory_iface); +} + static HRESULT WINAPI Test_IClassFactory_QueryInterface( LPCLASSFACTORY iface, REFIID riid, @@ -1394,7 +1399,7 @@ static HRESULT WINAPI Test_IClassFactory_CreateInstance( REFIID riid, LPVOID *ppvObj) { - TestClassFactoryImpl *This = (TestClassFactoryImpl *)iface; + TestClassFactoryImpl *This = impl_from_IClassFactory(iface); HRESULT hr; IUnknown *punk = NULL; @@ -1522,9 +1527,18 @@ static void test_render_filter_priority(void) { PINDIR_INPUT, &mediasubtype2 }, { 0, 0 } }; - TestClassFactoryImpl Filter1ClassFactory = { &TestClassFactory_Vtbl, PinData2, &CLSID_TestFilter2 }; - TestClassFactoryImpl Filter2ClassFactory = { &TestClassFactory_Vtbl, PinData4, &CLSID_TestFilter3 }; - TestClassFactoryImpl Filter3ClassFactory = { &TestClassFactory_Vtbl, PinData5, &CLSID_TestFilter4 }; + TestClassFactoryImpl Filter1ClassFactory = { + { &TestClassFactory_Vtbl }, + PinData2, &CLSID_TestFilter2 + }; + TestClassFactoryImpl Filter2ClassFactory = { + { &TestClassFactory_Vtbl }, + PinData4, &CLSID_TestFilter3 + }; + TestClassFactoryImpl Filter3ClassFactory = { + { &TestClassFactory_Vtbl }, + PinData5, &CLSID_TestFilter4 + }; char ConnectedFilterName1[MAX_FILTER_NAME]; char ConnectedFilterName2[MAX_FILTER_NAME]; REGFILTER2 rgf2; @@ -1760,16 +1774,19 @@ static void test_render_filter_priority(void) ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); /* Register our filters with COM and with Filtermapper. */ - hr = CoRegisterClassObject(Filter1ClassFactory.clsid, (IUnknown *)&Filter1ClassFactory, - CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie1); + hr = CoRegisterClassObject(Filter1ClassFactory.clsid, + (IUnknown *)&Filter1ClassFactory.IClassFactory_iface, CLSCTX_INPROC_SERVER, + REGCLS_MULTIPLEUSE, &cookie1); ok(hr == S_OK, "CoRegisterClassObject failed with %08x\n", hr); if (FAILED(hr)) goto out; - hr = CoRegisterClassObject(Filter2ClassFactory.clsid, (IUnknown *)&Filter2ClassFactory, - CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie2); + hr = CoRegisterClassObject(Filter2ClassFactory.clsid, + (IUnknown *)&Filter2ClassFactory.IClassFactory_iface, CLSCTX_INPROC_SERVER, + REGCLS_MULTIPLEUSE, &cookie2); ok(hr == S_OK, "CoRegisterClassObject failed with %08x\n", hr); if (FAILED(hr)) goto out; - hr = CoRegisterClassObject(Filter3ClassFactory.clsid, (IUnknown *)&Filter3ClassFactory, - CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie3); + hr = CoRegisterClassObject(Filter3ClassFactory.clsid, + (IUnknown *)&Filter3ClassFactory.IClassFactory_iface, CLSCTX_INPROC_SERVER, + REGCLS_MULTIPLEUSE, &cookie3); ok(hr == S_OK, "CoRegisterClassObject failed with %08x\n", hr); if (FAILED(hr)) goto out;
1
0
0
0
Michael Stefaniuc : quartz/tests: COM cleanup for the IPin iface.
by Alexandre Julliard
20 Jun '11
20 Jun '11
Module: wine Branch: master Commit: 6009ed4b6fdf63fae740e668c516f901f77eadaf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6009ed4b6fdf63fae740e668c…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Jun 19 14:21:26 2011 +0200 quartz/tests: COM cleanup for the IPin iface. --- dlls/quartz/tests/filtergraph.c | 57 +++++++++++++++++++++----------------- 1 files changed, 31 insertions(+), 26 deletions(-) diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 9b08494..e95aa5b 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -22,6 +22,7 @@ #include <assert.h> #define COBJMACROS +#define CONST_VTABLE #include "wine/test.h" #include "dshow.h" @@ -526,15 +527,20 @@ static void Copy_PinInfo(PIN_INFO * pDest, const PIN_INFO * pSrc) typedef struct ITestPinImpl { - const struct IPinVtbl * lpVtbl; - LONG refCount; - LPCRITICAL_SECTION pCritSec; - PIN_INFO pinInfo; - IPin * pConnectedTo; - AM_MEDIA_TYPE mtCurrent; - LPVOID pUserData; + IPin IPin_iface; + LONG refCount; + LPCRITICAL_SECTION pCritSec; + PIN_INFO pinInfo; + IPin * pConnectedTo; + AM_MEDIA_TYPE mtCurrent; + LPVOID pUserData; } ITestPinImpl; +static inline ITestPinImpl *impl_from_IPin(IPin *iface) +{ + return CONTAINING_RECORD(iface, ITestPinImpl, IPin_iface); +} + static HRESULT WINAPI TestFilter_Pin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv) { *ppv = NULL; @@ -555,20 +561,19 @@ static HRESULT WINAPI TestFilter_Pin_QueryInterface(IPin * iface, REFIID riid, static ULONG WINAPI TestFilter_Pin_AddRef(IPin * iface) { - ITestPinImpl *This = (ITestPinImpl *)iface; + ITestPinImpl *This = impl_from_IPin(iface); ULONG refCount = InterlockedIncrement(&This->refCount); return refCount; } static ULONG WINAPI TestFilter_Pin_Release(IPin * iface) { - ITestPinImpl *This = (ITestPinImpl *)iface; + ITestPinImpl *This = impl_from_IPin(iface); ULONG refCount = InterlockedDecrement(&This->refCount); if (!refCount) { FreeMediaType(&This->mtCurrent); - This->lpVtbl = NULL; CoTaskMemFree(This); return 0; } @@ -583,7 +588,7 @@ static HRESULT WINAPI TestFilter_InputPin_Connect(IPin * iface, IPin * pConnecto static HRESULT WINAPI TestFilter_InputPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) { - ITestPinImpl *This = (ITestPinImpl *)iface; + ITestPinImpl *This = impl_from_IPin(iface); PIN_DIRECTION pindirReceive; HRESULT hr = S_OK; @@ -621,7 +626,7 @@ static HRESULT WINAPI TestFilter_InputPin_ReceiveConnection(IPin * iface, IPin * static HRESULT WINAPI TestFilter_Pin_Disconnect(IPin * iface) { HRESULT hr; - ITestPinImpl *This = (ITestPinImpl *)iface; + ITestPinImpl *This = impl_from_IPin(iface); EnterCriticalSection(This->pCritSec); { @@ -642,7 +647,7 @@ static HRESULT WINAPI TestFilter_Pin_Disconnect(IPin * iface) static HRESULT WINAPI TestFilter_Pin_ConnectedTo(IPin * iface, IPin ** ppPin) { HRESULT hr; - ITestPinImpl *This = (ITestPinImpl *)iface; + ITestPinImpl *This = impl_from_IPin(iface); EnterCriticalSection(This->pCritSec); { @@ -666,7 +671,7 @@ static HRESULT WINAPI TestFilter_Pin_ConnectedTo(IPin * iface, IPin ** ppPin) static HRESULT WINAPI TestFilter_Pin_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt) { HRESULT hr; - ITestPinImpl *This = (ITestPinImpl *)iface; + ITestPinImpl *This = impl_from_IPin(iface); EnterCriticalSection(This->pCritSec); { @@ -688,7 +693,7 @@ static HRESULT WINAPI TestFilter_Pin_ConnectionMediaType(IPin * iface, AM_MEDIA_ static HRESULT WINAPI TestFilter_Pin_QueryPinInfo(IPin * iface, PIN_INFO * pInfo) { - ITestPinImpl *This = (ITestPinImpl *)iface; + ITestPinImpl *This = impl_from_IPin(iface); Copy_PinInfo(pInfo, &This->pinInfo); IBaseFilter_AddRef(pInfo->pFilter); @@ -698,7 +703,7 @@ static HRESULT WINAPI TestFilter_Pin_QueryPinInfo(IPin * iface, PIN_INFO * pInfo static HRESULT WINAPI TestFilter_Pin_QueryDirection(IPin * iface, PIN_DIRECTION * pPinDir) { - ITestPinImpl *This = (ITestPinImpl *)iface; + ITestPinImpl *This = impl_from_IPin(iface); *pPinDir = This->pinInfo.dir; @@ -712,7 +717,7 @@ static HRESULT WINAPI TestFilter_Pin_QueryId(IPin * iface, LPWSTR * Id) static HRESULT WINAPI TestFilter_Pin_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt) { - ITestPinImpl *This = (ITestPinImpl *)iface; + ITestPinImpl *This = impl_from_IPin(iface); if (IsEqualIID(&pmt->majortype, &This->mtCurrent.majortype) && (IsEqualIID(&pmt->subtype, &This->mtCurrent.subtype) || IsEqualIID(&GUID_NULL, &This->mtCurrent.subtype))) @@ -723,7 +728,7 @@ static HRESULT WINAPI TestFilter_Pin_QueryAccept(IPin * iface, const AM_MEDIA_TY static HRESULT WINAPI TestFilter_Pin_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnum) { - ITestPinImpl *This = (ITestPinImpl *)iface; + ITestPinImpl *This = impl_from_IPin(iface); return IEnumMediaTypesImpl_Construct(&This->mtCurrent, 1, ppEnum); } @@ -781,15 +786,15 @@ static HRESULT WINAPI TestFilter_OutputPin_ReceiveConnection(IPin * iface, IPin } /* Private helper function */ -static HRESULT TestFilter_OutputPin_ConnectSpecific(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) +static HRESULT TestFilter_OutputPin_ConnectSpecific(ITestPinImpl * This, IPin * pReceivePin, + const AM_MEDIA_TYPE * pmt) { - ITestPinImpl *This = (ITestPinImpl *)iface; HRESULT hr; This->pConnectedTo = pReceivePin; IPin_AddRef(pReceivePin); - hr = IPin_ReceiveConnection(pReceivePin, iface, pmt); + hr = IPin_ReceiveConnection(pReceivePin, &This->IPin_iface, pmt); if (FAILED(hr)) { @@ -802,7 +807,7 @@ static HRESULT TestFilter_OutputPin_ConnectSpecific(IPin * iface, IPin * pReceiv static HRESULT WINAPI TestFilter_OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) { - ITestPinImpl *This = (ITestPinImpl *)iface; + ITestPinImpl *This = impl_from_IPin(iface); HRESULT hr; EnterCriticalSection(This->pCritSec); @@ -810,11 +815,11 @@ static HRESULT WINAPI TestFilter_OutputPin_Connect(IPin * iface, IPin * pReceive /* if we have been a specific type to connect with, then we can either connect * with that or fail. We cannot choose different AM_MEDIA_TYPE */ if (pmt && !IsEqualGUID(&pmt->majortype, &GUID_NULL) && !IsEqualGUID(&pmt->subtype, &GUID_NULL)) - hr = TestFilter_OutputPin_ConnectSpecific(iface, pReceivePin, pmt); + hr = TestFilter_OutputPin_ConnectSpecific(This, pReceivePin, pmt); else { if (( !pmt || CompareMediaTypes(pmt, &This->mtCurrent, TRUE) ) && - (TestFilter_OutputPin_ConnectSpecific(iface, pReceivePin, &This->mtCurrent) == S_OK)) + (TestFilter_OutputPin_ConnectSpecific(This, pReceivePin, &This->mtCurrent) == S_OK)) hr = S_OK; else hr = VFW_E_NO_ACCEPTABLE_TYPES; } /* if negotiate media type */ @@ -864,9 +869,9 @@ static HRESULT TestFilter_Pin_Construct(const IPinVtbl *Pin_Vtbl, const PIN_INFO Copy_PinInfo(&pPinImpl->pinInfo, pPinInfo); pPinImpl->mtCurrent = *pinmt; - pPinImpl->lpVtbl = Pin_Vtbl; + pPinImpl->IPin_iface.lpVtbl = Pin_Vtbl; - *ppPin = (IPin *)pPinImpl; + *ppPin = &pPinImpl->IPin_iface; return S_OK; }
1
0
0
0
Alistair Leslie-Hughes : xmllite: Added interface IXmlWriter.
by Alexandre Julliard
20 Jun '11
20 Jun '11
Module: wine Branch: master Commit: 89a094569bd6caa216e9e726c16a9a2d63784d30 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=89a094569bd6caa216e9e726c…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Sun Jun 19 21:09:40 2011 +1000 xmllite: Added interface IXmlWriter. --- include/xmllite.idl | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 62 insertions(+), 0 deletions(-) diff --git a/include/xmllite.idl b/include/xmllite.idl index 552b5d6..d416d21 100644 --- a/include/xmllite.idl +++ b/include/xmllite.idl @@ -109,3 +109,65 @@ cpp_quote("typedef IUnknown IXmlReaderInput;") cpp_quote("STDAPI CreateXmlReaderInputWithEncodingName(IUnknown *stream, IMalloc *pMalloc,") cpp_quote(" LPCWSTR encoding, BOOL hint,") cpp_quote(" LPCWSTR base_uri, IXmlReaderInput **ppInput);") + +typedef enum XmlStandalone +{ + XmlStandalone_Omit, + XmlStandalone_Yes, + XmlStandalone_No, + _XmlStandalone_Last = XmlStandalone_No +} XmlStandalone; + +typedef enum XmlWriterProperty +{ + XmlWriterProperty_MultiLanguage, + XmlWriterProperty_Indent, + XmlWriterProperty_ByteOrderMark, + XmlWriterProperty_OmitXmlDeclaration, + XmlWriterProperty_ConformanceLevel, + _XmlWriterProperty_Last = XmlWriterProperty_OmitXmlDeclaration +} XmlWriterProperty; + +/* IXmlWriter */ +[ + local, + object, + uuid(7279FC88-709D-4095-B63D-69FE4B0D9030), + pointer_default(unique) +] +interface IXmlWriter : IUnknown +{ + HRESULT SetOutput([in] IUnknown *pOutput); + HRESULT GetProperty([in] UINT nProperty, [out] LONG_PTR *ppValue); + HRESULT SetProperty([in] UINT nProperty, [in] LONG_PTR pValue); + HRESULT WriteAttributes([in] IXmlReader *pReader, [in] BOOL fWriteDefaultAttributes); + HRESULT WriteAttributeString([in] LPCWSTR pwszPrefix, [in] LPCWSTR pwszLocalName, + [in] LPCWSTR pwszNamespaceUri, [in] LPCWSTR pwszValue); + HRESULT WriteCData([in] LPCWSTR pwszText); + HRESULT WriteCharEntity([in] WCHAR wch); + HRESULT WriteChars([in] const WCHAR *pwch, [in] UINT cwch); + HRESULT WriteComment([in] LPCWSTR pwszComment); + HRESULT WriteDocType([in] LPCWSTR pwszName, [in] LPCWSTR pwszPublicId, + [in] LPCWSTR pwszSystemId, [in] LPCWSTR pwszSubset); + HRESULT WriteElementString([in] LPCWSTR pwszPrefix, [in] LPCWSTR pwszLocalName, + [in] LPCWSTR pwszNamespaceUri, [in] LPCWSTR pwszValue); + HRESULT WriteEndDocument(); + HRESULT WriteEndElement(); + HRESULT WriteEntityRef([in] LPCWSTR pwszName); + HRESULT WriteFullEndElement(); + HRESULT WriteName([in] LPCWSTR pwszName); + HRESULT WriteNmToken([in] LPCWSTR pwszNmToken); + HRESULT WriteNode([in] IXmlReader *pReader, [in] BOOL fWriteDefaultAttributes); + HRESULT WriteNodeShallow([in] IXmlReader *pReader, [in] BOOL fWriteDefaultAttributes); + HRESULT WriteProcessingInstruction([in] LPCWSTR pwszName, [in] LPCWSTR pwszText); + HRESULT WriteQualifiedName([in] LPCWSTR pwszLocalName, [in] LPCWSTR pwszNamespaceUri); + HRESULT WriteRaw([in] LPCWSTR pwszData); + HRESULT WriteRawChars([in] const WCHAR *pwch, [in] UINT cwch); + HRESULT WriteStartDocument([in] XmlStandalone standalone); + HRESULT WriteStartElement([in] LPCWSTR pwszPrefix, [in] LPCWSTR pwszLocalName, + [in] LPCWSTR pwszNamespaceUri); + HRESULT WriteString([in] LPCWSTR pwszText); + HRESULT WriteSurrogateCharEntity([in] WCHAR wchLow, [in] WCHAR wchHigh); + HRESULT WriteWhitespace([in] LPCWSTR pwszWhitespace); + HRESULT Flush(); +}
1
0
0
0
Alexandre Julliard : rpcrt4: Make sure we don't try to free a pointer twice .
by Alexandre Julliard
20 Jun '11
20 Jun '11
Module: wine Branch: master Commit: 781ff545cfbdcfd5e91a9308ef6dc7fde8ac032a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=781ff545cfbdcfd5e91a9308e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 20 14:07:59 2011 +0200 rpcrt4: Make sure we don't try to free a pointer twice. --- dlls/rpcrt4/ndr_stubless.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index bbc9c19..c5f3074 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -1241,18 +1241,18 @@ static LONG_PTR *stub_do_args(MIDL_STUB_MESSAGE *pStubMsg, else call_freer(pStubMsg, *(unsigned char **)pArg, pTypeFormat); } - - if (pParam->param_attributes.IsOut && - !pParam->param_attributes.IsIn && - !pParam->param_attributes.IsByValue && - !pParam->param_attributes.ServerAllocSize) + else if (pParam->param_attributes.ServerAllocSize) + { + HeapFree(GetProcessHeap(), 0, *(void **)pArg); + } + else if (pParam->param_attributes.IsOut && + !pParam->param_attributes.IsIn && + !pParam->param_attributes.IsByValue) { if (*pTypeFormat != RPC_FC_BIND_CONTEXT) pStubMsg->pfnFree(*(void **)pArg); } - if (pParam->param_attributes.ServerAllocSize) - HeapFree(GetProcessHeap(), 0, *(void **)pArg); break; case STUBLESS_INITOUT: if (!pParam->param_attributes.IsIn &&
1
0
0
0
Alexandre Julliard : widl: Use NdrPointerFree instead of freeing by hand where possible.
by Alexandre Julliard
20 Jun '11
20 Jun '11
Module: wine Branch: master Commit: 809810eb28739307a53915325eb23d76f4483eb8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=809810eb28739307a53915325…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 20 13:51:27 2011 +0200 widl: Use NdrPointerFree instead of freeing by hand where possible. --- tools/widl/typegen.c | 24 ++++++++++++++++-------- 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 0096c32..847e10b 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -4189,19 +4189,18 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const if (phase == PHASE_FREE || pass == PASS_RETURN || pointer_type != RPC_FC_RP) { - if (pointer_type == RPC_FC_RP && phase == PHASE_FREE && + /* strings returned are assumed to be global and hence don't + * need freeing */ + if (is_declptr(type) && !(phase == PHASE_FREE && pass == PASS_RETURN)) + print_phase_function(file, indent, "Pointer", local_var_prefix, + phase, var, start_offset); + else if (pointer_type == RPC_FC_RP && phase == PHASE_FREE && !in_attr && is_conformant_array(type)) { print_file(file, indent, "if (%s%s)\n", local_var_prefix, var->name); indent++; print_file(file, indent, "__frame->_StubMsg.pfnFree(%s%s);\n", local_var_prefix, var->name); } - /* strings returned are assumed to be global and hence don't - * need freeing */ - else if (is_declptr(type) && - !(phase == PHASE_FREE && pass == PASS_RETURN)) - print_phase_function(file, indent, "Pointer", local_var_prefix, - phase, var, start_offset); } else { @@ -4257,7 +4256,7 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const } if (pointer_type != RPC_FC_RP) array_type = "Pointer"; - print_phase_function(file, indent, array_type, local_var_prefix, phase, var, start_offset); + if (phase == PHASE_FREE && pointer_type == RPC_FC_RP) { /* these are all unmarshalled by allocating memory */ @@ -4266,11 +4265,20 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const ((tc == RPC_FC_SMVARRAY || tc == RPC_FC_LGVARRAY) && in_attr) || (tc == RPC_FC_CARRAY && !in_attr)) { + if (type_array_is_decl_as_ptr(type) && type->details.array.ptr_tfsoff) + { + print_phase_function(file, indent, "Pointer", local_var_prefix, phase, var, + type->details.array.ptr_tfsoff); + break; + } + print_phase_function(file, indent, array_type, local_var_prefix, phase, var, start_offset); print_file(file, indent, "if (%s%s)\n", local_var_prefix, var->name); indent++; print_file(file, indent, "__frame->_StubMsg.pfnFree(%s%s);\n", local_var_prefix, var->name); + break; } } + print_phase_function(file, indent, array_type, local_var_prefix, phase, var, start_offset); break; } case TGT_BASIC:
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
81
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Results per page:
10
25
50
100
200