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
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
December 2019
----- 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
1 participants
635 discussions
Start a n
N
ew thread
Zebediah Figura : strmbase/transform: Use base sink streaming methods.
by Alexandre Julliard
13 Dec '19
13 Dec '19
Module: wine Branch: master Commit: da5a544b0298ee67e37da96d16774ee04e97ef04 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=da5a544b0298ee67e37da96d…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Dec 12 21:24:35 2019 -0600 strmbase/transform: Use base sink streaming methods. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/strmbase/transform.c | 116 +++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 62 deletions(-) diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index 993e30202b..69dc93affe 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -229,6 +229,52 @@ static void sink_disconnect(struct strmbase_sink *iface) filter->pFuncsTable->pfnBreakConnect(filter, PINDIR_INPUT); } +static HRESULT sink_eos(struct strmbase_sink *iface) +{ + TransformFilter *filter = impl_from_sink_IPin(&iface->pin.IPin_iface); + + if (filter->source.pin.peer) + return IPin_EndOfStream(filter->source.pin.peer); + return VFW_E_NOT_CONNECTED; +} + +static HRESULT sink_begin_flush(struct strmbase_sink *iface) +{ + TransformFilter *filter = impl_from_sink_IPin(&iface->pin.IPin_iface); + HRESULT hr = S_OK; + + if (filter->pFuncsTable->pfnBeginFlush) + hr = filter->pFuncsTable->pfnBeginFlush(filter); + if (SUCCEEDED(hr) && filter->source.pin.peer) + hr = IPin_BeginFlush(filter->source.pin.peer); + return hr; +} + +static HRESULT sink_end_flush(struct strmbase_sink *iface) +{ + TransformFilter *filter = impl_from_sink_IPin(&iface->pin.IPin_iface); + HRESULT hr = S_OK; + + if (filter->pFuncsTable->pfnEndFlush) + hr = filter->pFuncsTable->pfnEndFlush(filter); + if (SUCCEEDED(hr) && filter->source.pin.peer) + hr = IPin_EndFlush(filter->source.pin.peer); + return hr; +} + +static HRESULT sink_new_segment(struct strmbase_sink *iface, + REFERENCE_TIME start, REFERENCE_TIME stop, double rate) +{ + TransformFilter *filter = impl_from_sink_IPin(&iface->pin.IPin_iface); + HRESULT hr = S_OK; + + if (filter->pFuncsTable->pfnNewSegment) + hr = filter->pFuncsTable->pfnNewSegment(filter, start, stop, rate); + if (SUCCEEDED(hr) && filter->source.pin.peer) + hr = IPin_NewSegment(filter->source.pin.peer, start, stop, rate); + return hr; +} + static const struct strmbase_sink_ops sink_ops = { .base.pin_query_accept = sink_query_accept, @@ -237,6 +283,10 @@ static const struct strmbase_sink_ops sink_ops = .pfnReceive = TransformFilter_Input_Receive, .sink_connect = sink_connect, .sink_disconnect = sink_disconnect, + .sink_eos = sink_eos, + .sink_begin_flush = sink_begin_flush, + .sink_end_flush = sink_end_flush, + .sink_new_segment = sink_new_segment, }; static HRESULT source_query_interface(struct strmbase_pin *iface, REFIID iid, void **out) @@ -405,64 +455,6 @@ HRESULT strmbase_transform_create(LONG filter_size, IUnknown *outer, const CLSID return E_FAIL; } -static HRESULT WINAPI TransformFilter_InputPin_EndOfStream(IPin * iface) -{ - TransformFilter *filter = impl_from_sink_IPin(iface); - - TRACE("iface %p.\n", iface); - - if (filter->source.pin.peer) - return IPin_EndOfStream(filter->source.pin.peer); - return VFW_E_NOT_CONNECTED; -} - -static HRESULT WINAPI TransformFilter_InputPin_BeginFlush(IPin * iface) -{ - TransformFilter *pTransform = impl_from_sink_IPin(iface); - HRESULT hr = S_OK; - - TRACE("(%p)->()\n", iface); - - EnterCriticalSection(&pTransform->filter.csFilter); - if (pTransform->pFuncsTable->pfnBeginFlush) - hr = pTransform->pFuncsTable->pfnBeginFlush(pTransform); - if (SUCCEEDED(hr)) - hr = BaseInputPinImpl_BeginFlush(iface); - LeaveCriticalSection(&pTransform->filter.csFilter); - return hr; -} - -static HRESULT WINAPI TransformFilter_InputPin_EndFlush(IPin * iface) -{ - TransformFilter *pTransform = impl_from_sink_IPin(iface); - HRESULT hr = S_OK; - - TRACE("(%p)->()\n", iface); - - EnterCriticalSection(&pTransform->filter.csFilter); - if (pTransform->pFuncsTable->pfnEndFlush) - hr = pTransform->pFuncsTable->pfnEndFlush(pTransform); - if (SUCCEEDED(hr)) - hr = BaseInputPinImpl_EndFlush(iface); - LeaveCriticalSection(&pTransform->filter.csFilter); - return hr; -} - -static HRESULT WINAPI TransformFilter_InputPin_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate) -{ - TransformFilter *pTransform = impl_from_sink_IPin(iface); - HRESULT hr = S_OK; - - TRACE("iface %p, start %s, stop %s, rate %.16e.\n", - iface, debugstr_time(tStart), debugstr_time(tStop), dRate); - - if (pTransform->pFuncsTable->pfnNewSegment) - hr = pTransform->pFuncsTable->pfnNewSegment(pTransform, tStart, tStop, dRate); - if (SUCCEEDED(hr)) - hr = BaseInputPinImpl_NewSegment(iface, tStart, tStop, dRate); - return hr; -} - static const IPinVtbl TransformFilter_InputPin_Vtbl = { BasePinImpl_QueryInterface, @@ -479,8 +471,8 @@ static const IPinVtbl TransformFilter_InputPin_Vtbl = BasePinImpl_QueryAccept, BasePinImpl_EnumMediaTypes, BasePinImpl_QueryInternalConnections, - TransformFilter_InputPin_EndOfStream, - TransformFilter_InputPin_BeginFlush, - TransformFilter_InputPin_EndFlush, - TransformFilter_InputPin_NewSegment + BaseInputPinImpl_EndOfStream, + BaseInputPinImpl_BeginFlush, + BaseInputPinImpl_EndFlush, + BaseInputPinImpl_NewSegment };
1
0
0
0
Zebediah Figura : wineqtdecoder: Use base sink connection methods.
by Alexandre Julliard
13 Dec '19
13 Dec '19
Module: wine Branch: master Commit: 98ccda3e5c999c11ebb8961d5cb8ac2a37827016 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=98ccda3e5c999c11ebb8961d…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Dec 12 21:24:33 2019 -0600 wineqtdecoder: Use base sink connection methods. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wineqtdecoder/qtsplitter.c | 206 +++++++++++++++------------------------- 1 file changed, 75 insertions(+), 131 deletions(-) diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c index c8a34cbf95..01ec4c2ced 100644 --- a/dlls/wineqtdecoder/qtsplitter.c +++ b/dlls/wineqtdecoder/qtsplitter.c @@ -228,7 +228,6 @@ static struct strmbase_pin *qt_splitter_get_pin(struct strmbase_filter *base, un static void qt_splitter_destroy(struct strmbase_filter *iface) { QTSplitter *filter = impl_from_strmbase_filter(iface); - IPin *peer = NULL; EnterCriticalSection(&filter->csReceive); /* Don't need to clean up output pins, disconnecting input pin will do that */ @@ -285,13 +284,15 @@ static HRESULT qt_splitter_start_stream(struct strmbase_filter *iface, REFERENCE EnterCriticalSection(&filter->csReceive); if (filter->pVideo_Pin) - pin_hr = BaseOutputPinImpl_Active(&filter->pVideo_Pin->pin); - if (SUCCEEDED(pin_hr)) - hr = pin_hr; + { + if (SUCCEEDED(pin_hr = BaseOutputPinImpl_Active(&filter->pVideo_Pin->pin))) + hr = pin_hr; + } if (filter->pAudio_Pin) - pin_hr = BaseOutputPinImpl_Active(&filter->pAudio_Pin->pin); - if (SUCCEEDED(pin_hr)) - hr = pin_hr; + { + if (SUCCEEDED(pin_hr = BaseOutputPinImpl_Active(&filter->pAudio_Pin->pin))) + hr = pin_hr; + } SetEvent(filter->runEvent); LeaveCriticalSection(&filter->csReceive); @@ -331,10 +332,75 @@ static HRESULT sink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE return S_FALSE; } +static HRESULT QT_Process_Movie(QTSplitter *filter); + +static HRESULT qt_splitter_sink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *mt) +{ + QTSplitter *filter = impl_from_strmbase_filter(iface->pin.filter); + ALLOCATOR_PROPERTIES props; + IMemAllocator *allocator; + HRESULT hr = S_OK; + + filter->pInputPin.pReader = NULL; + + if (FAILED(hr = IPin_QueryInterface(peer, &IID_IAsyncReader, (void **)&filter->pInputPin.pReader))) + return hr; + + if (FAILED(hr = QT_Process_Movie(filter))) + { + IAsyncReader_Release(filter->pInputPin.pReader); + filter->pInputPin.pReader = NULL; + return hr; + } + + filter->pInputPin.pAlloc = NULL; + props.cBuffers = 8; + props.cbAlign = 1; + props.cbBuffer = filter->outputSize + props.cbAlign; + props.cbPrefix = 0; + + /* Some applications depend on IAsyncReader::RequestAllocator() passing a + * non-NULL preferred allocator. */ + hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC, + &IID_IMemAllocator, (void **)&allocator); + if (FAILED(hr)) + goto err; + + hr = IAsyncReader_RequestAllocator(filter->pInputPin.pReader, allocator, &props, &filter->pInputPin.pAlloc); + IMemAllocator_Release(allocator); + if (FAILED(hr)) + { + WARN("Failed to get allocator, hr %#x.\n", hr); + goto err; + } + + if (FAILED(hr = IMemAllocator_Commit(filter->pInputPin.pAlloc))) + { + WARN("Failed to commit allocator, hr %#x.\n", hr); + goto err; + } + + return S_OK; +err: + QT_RemoveOutputPins(filter); + IAsyncReader_Release(filter->pInputPin.pReader); + return hr; +} + +static void qt_splitter_sink_disconnect(struct strmbase_sink *iface) +{ + QTSplitter *filter = impl_from_strmbase_filter(iface->pin.filter); + + IMemAllocator_Decommit(filter->pInputPin.pAlloc); + QT_RemoveOutputPins(filter); +} + static const struct strmbase_sink_ops sink_ops = { .base.pin_query_accept = sink_query_accept, .base.pin_get_media_type = strmbase_pin_get_media_type, + .sink_connect = qt_splitter_sink_connect, + .sink_disconnect = qt_splitter_sink_disconnect, }; IUnknown * CALLBACK QTSplitter_create(IUnknown *outer, HRESULT *phr) @@ -964,128 +1030,6 @@ static HRESULT QT_Process_Movie(QTSplitter* filter) return hr; } -static HRESULT WINAPI QTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt) -{ - HRESULT hr = S_OK; - ALLOCATOR_PROPERTIES props; - QTInPin *This = impl_from_IPin(iface); - QTSplitter *filter = impl_from_strmbase_filter(This->pin.filter); - IMemAllocator *pAlloc; - - TRACE("(%p/%p)->(%p, %p)\n", This, iface, pReceivePin, pmt); - - EnterCriticalSection(&filter->filter.csFilter); - This->pReader = NULL; - - if (This->pin.pin.peer) - hr = VFW_E_ALREADY_CONNECTED; - else if (IPin_QueryAccept(iface, pmt) != S_OK) - hr = VFW_E_TYPE_NOT_ACCEPTED; - else - { - PIN_DIRECTION pindirReceive; - IPin_QueryDirection(pReceivePin, &pindirReceive); - if (pindirReceive != PINDIR_OUTPUT) - hr = VFW_E_INVALID_DIRECTION; - } - - if (FAILED(hr)) - { - LeaveCriticalSection(&filter->filter.csFilter); - return hr; - } - - hr = IPin_QueryInterface(pReceivePin, &IID_IAsyncReader, (LPVOID *)&This->pReader); - if (FAILED(hr)) - { - LeaveCriticalSection(&filter->filter.csFilter); - TRACE("Input source is not an AsyncReader\n"); - return hr; - } - - LeaveCriticalSection(&filter->filter.csFilter); - EnterCriticalSection(&filter->filter.csFilter); - hr = QT_Process_Movie(filter); - if (FAILED(hr)) - { - IAsyncReader_Release(This->pReader); - This->pReader = NULL; - LeaveCriticalSection(&filter->filter.csFilter); - TRACE("Unable to process movie\n"); - return hr; - } - - This->pAlloc = NULL; - props.cBuffers = 8; - props.cbAlign = 1; - props.cbBuffer = filter->outputSize + props.cbAlign; - props.cbPrefix = 0; - hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC, - &IID_IMemAllocator, (LPVOID *)&pAlloc); - if (SUCCEEDED(hr)) - { - /* A certain IAsyncReader::RequestAllocator expects to be passed - non-NULL preferred allocator */ - hr = IAsyncReader_RequestAllocator(This->pReader, pAlloc, &props, &This->pAlloc); - if (FAILED(hr)) - WARN("Can't get an allocator, got %08x\n", hr); - IMemAllocator_Release(pAlloc); - } - - if (SUCCEEDED(hr)) - { - CopyMediaType(&This->pin.mt, pmt); - This->pin.peer = pReceivePin; - IPin_AddRef(pReceivePin); - hr = IMemAllocator_Commit(This->pAlloc); - } - else - { - QT_RemoveOutputPins(filter); - if (This->pReader) - IAsyncReader_Release(This->pReader); - This->pReader = NULL; - if (This->pAlloc) - IMemAllocator_Release(This->pAlloc); - This->pAlloc = NULL; - } - TRACE("Size: %i\n", props.cbBuffer); - LeaveCriticalSection(&filter->filter.csFilter); - - return hr; -} - -static HRESULT WINAPI QTInPin_Disconnect(IPin *iface) -{ - HRESULT hr; - QTInPin *This = impl_from_IPin(iface); - QTSplitter *filter = impl_from_strmbase_filter(This->pin.pin.filter); - FILTER_STATE state; - TRACE("()\n"); - - hr = IBaseFilter_GetState(&filter->filter.IBaseFilter_iface, INFINITE, &state); - EnterCriticalSection(&filter->filter.csFilter); - if (This->pin.pin.peer) - { - QTSplitter *Parser = impl_from_strmbase_filter(This->pin.pin.filter); - - if (SUCCEEDED(hr) && state == State_Stopped) - { - IMemAllocator_Decommit(This->pAlloc); - IPin_Disconnect(This->pin.pin.peer); - IPin_Release(This->pin.pin.peer); - This->pin.pin.peer = NULL; - hr = QT_RemoveOutputPins(Parser); - } - else - hr = VFW_E_NOT_STOPPED; - } - else - hr = S_FALSE; - LeaveCriticalSection(&filter->filter.csFilter); - return hr; -} - static HRESULT WINAPI QTInPin_EndOfStream(IPin *iface) { FIXME("iface %p, stub!\n", iface); @@ -1116,8 +1060,8 @@ static const IPinVtbl QT_InputPin_Vtbl = { BasePinImpl_AddRef, BasePinImpl_Release, BaseInputPinImpl_Connect, - QTInPin_ReceiveConnection, - QTInPin_Disconnect, + BaseInputPinImpl_ReceiveConnection, + BaseInputPinImpl_Disconnect, BasePinImpl_ConnectedTo, BasePinImpl_ConnectionMediaType, BasePinImpl_QueryPinInfo,
1
0
0
0
Zebediah Figura : wineqtdecoder: Store the sink as a strmbase_sink structure.
by Alexandre Julliard
13 Dec '19
13 Dec '19
Module: wine Branch: master Commit: ad0cea83448a18de5ac617a7c1858fb72e162953 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ad0cea83448a18de5ac617a7…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Dec 12 21:24:32 2019 -0600 wineqtdecoder: Store the sink as a strmbase_sink structure. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wineqtdecoder/qtsplitter.c | 43 +++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c index d861110f5f..c8a34cbf95 100644 --- a/dlls/wineqtdecoder/qtsplitter.c +++ b/dlls/wineqtdecoder/qtsplitter.c @@ -138,7 +138,7 @@ typedef struct QTOutPin { } QTOutPin; typedef struct QTInPin { - struct strmbase_pin pin; + struct strmbase_sink pin; GUID subType; IAsyncReader *pReader; @@ -199,7 +199,7 @@ static inline QTSplitter *impl_from_IBaseFilter( IBaseFilter *iface ) static inline QTInPin *impl_from_IPin(IPin *iface) { - return CONTAINING_RECORD(iface, QTInPin, pin.IPin_iface); + return CONTAINING_RECORD(iface, QTInPin, pin.pin.IPin_iface); } /* @@ -211,7 +211,7 @@ static struct strmbase_pin *qt_splitter_get_pin(struct strmbase_filter *base, un QTSplitter *filter = impl_from_strmbase_filter(base); if (index == 0) - return &filter->pInputPin.pin; + return &filter->pInputPin.pin.pin; else if (index == 1) { if (filter->pVideo_Pin) @@ -232,18 +232,15 @@ static void qt_splitter_destroy(struct strmbase_filter *iface) EnterCriticalSection(&filter->csReceive); /* Don't need to clean up output pins, disconnecting input pin will do that */ + if (filter->pInputPin.pin.pin.peer) + IPin_Disconnect(filter->pInputPin.pin.pin.peer); - if (filter->pInputPin.pin.peer) - IPin_Disconnect(filter->pInputPin.pin.peer); - - FreeMediaType(&filter->pInputPin.pin.mt); if (filter->pInputPin.pAlloc) IMemAllocator_Release(filter->pInputPin.pAlloc); filter->pInputPin.pAlloc = NULL; if (filter->pInputPin.pReader) IAsyncReader_Release(filter->pInputPin.pReader); filter->pInputPin.pReader = NULL; - filter->pInputPin.pin.IPin_iface.lpVtbl = NULL; if (filter->pQTMovie) { @@ -274,6 +271,7 @@ static void qt_splitter_destroy(struct strmbase_filter *iface) filter->csReceive.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&filter->csReceive); + strmbase_sink_cleanup(&filter->pInputPin.pin); strmbase_filter_cleanup(&filter->filter); CoTaskMemFree(filter); @@ -333,10 +331,10 @@ static HRESULT sink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE return S_FALSE; } -static const BasePinFuncTable sink_ops = +static const struct strmbase_sink_ops sink_ops = { - .pin_query_accept = sink_query_accept, - .pin_get_media_type = strmbase_pin_get_media_type, + .base.pin_query_accept = sink_query_accept, + .base.pin_get_media_type = strmbase_pin_get_media_type, }; IUnknown * CALLBACK QTSplitter_create(IUnknown *outer, HRESULT *phr) @@ -357,6 +355,8 @@ IUnknown * CALLBACK QTSplitter_create(IUnknown *outer, HRESULT *phr) ZeroMemory(This,sizeof(*This)); strmbase_filter_init(&This->filter, outer, &CLSID_QTSplitter, &filter_ops); + strmbase_sink_init(&This->pInputPin.pin, &QT_InputPin_Vtbl, &This->filter, + wcsInputPinName, &sink_ops, NULL); InitializeCriticalSection(&This->csReceive); This->csReceive.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": QTSplitter.csReceive"); @@ -366,13 +366,6 @@ IUnknown * CALLBACK QTSplitter_create(IUnknown *outer, HRESULT *phr) This->aSession = NULL; This->runEvent = CreateEventW(NULL, 0, 0, NULL); - This->pInputPin.pin.dir = PINDIR_INPUT; - This->pInputPin.pin.filter = &This->filter; - lstrcpynW(This->pInputPin.pin.name, wcsInputPinName, ARRAY_SIZE(This->pInputPin.pin.name)); - This->pInputPin.pin.IPin_iface.lpVtbl = &QT_InputPin_Vtbl; - This->pInputPin.pin.peer = NULL; - This->pInputPin.pin.pFuncsTable = &sink_ops; - *phr = S_OK; return &This->filter.IUnknown_inner; } @@ -984,7 +977,7 @@ static HRESULT WINAPI QTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin, EnterCriticalSection(&filter->filter.csFilter); This->pReader = NULL; - if (This->pin.peer) + if (This->pin.pin.peer) hr = VFW_E_ALREADY_CONNECTED; else if (IPin_QueryAccept(iface, pmt) != S_OK) hr = VFW_E_TYPE_NOT_ACCEPTED; @@ -1066,22 +1059,22 @@ static HRESULT WINAPI QTInPin_Disconnect(IPin *iface) { HRESULT hr; QTInPin *This = impl_from_IPin(iface); - QTSplitter *filter = impl_from_strmbase_filter(This->pin.filter); + QTSplitter *filter = impl_from_strmbase_filter(This->pin.pin.filter); FILTER_STATE state; TRACE("()\n"); hr = IBaseFilter_GetState(&filter->filter.IBaseFilter_iface, INFINITE, &state); EnterCriticalSection(&filter->filter.csFilter); - if (This->pin.peer) + if (This->pin.pin.peer) { - QTSplitter *Parser = impl_from_strmbase_filter(This->pin.filter); + QTSplitter *Parser = impl_from_strmbase_filter(This->pin.pin.filter); if (SUCCEEDED(hr) && state == State_Stopped) { IMemAllocator_Decommit(This->pAlloc); - IPin_Disconnect(This->pin.peer); - IPin_Release(This->pin.peer); - This->pin.peer = NULL; + IPin_Disconnect(This->pin.pin.peer); + IPin_Release(This->pin.pin.peer); + This->pin.pin.peer = NULL; hr = QT_RemoveOutputPins(Parser); } else
1
0
0
0
Ken Thomases : configure: Remove no-longer-needed check for mach-o/dyld_images.h header file.
by Alexandre Julliard
13 Dec '19
13 Dec '19
Module: wine Branch: master Commit: 5fd22854070fa6c2e77f3dcf2a67b9032dbac979 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5fd22854070fa6c2e77f3dcf…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Thu Dec 12 19:43:20 2019 -0600 configure: Remove no-longer-needed check for mach-o/dyld_images.h header file. Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 19 ------------------- configure.ac | 8 -------- include/config.h.in | 3 --- 3 files changed, 30 deletions(-) diff --git a/configure b/configure index 032ba6811c..aca74c16ad 100755 --- a/configure +++ b/configure @@ -7690,25 +7690,6 @@ fi done -for ac_header in mach-o/dyld_images.h -do : - ac_fn_c_check_header_compile "$LINENO" "mach-o/dyld_images.h" "ac_cv_header_mach_o_dyld_images_h" "#ifdef HAVE_STDBOOL_H - # include <stdbool.h> - #endif - #ifdef HAVE_STDINT_H - # include <stdint.h> - #endif -" -if test "x$ac_cv_header_mach_o_dyld_images_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MACH_O_DYLD_IMAGES_H 1 -_ACEOF - -fi - -done - - for ac_header in resolv.h do : ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "#include <sys/types.h> diff --git a/configure.ac b/configure.ac index 7fc85841ca..2117e500f9 100644 --- a/configure.ac +++ b/configure.ac @@ -648,14 +648,6 @@ AC_CHECK_HEADERS([linux/ipx.h linux/irda.h linux/rtnetlink.h],,, # include <linux/types.h> #endif]) -AC_CHECK_HEADERS([mach-o/dyld_images.h],,, - [#ifdef HAVE_STDBOOL_H - # include <stdbool.h> - #endif - #ifdef HAVE_STDINT_H - # include <stdint.h> - #endif]) - AC_CHECK_HEADERS([resolv.h],,, [#include <sys/types.h> #ifdef HAVE_SYS_SOCKET_H diff --git a/include/config.h.in b/include/config.h.in index 63396e9250..1d0b216b6a 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -563,9 +563,6 @@ /* Define to 1 if you have the <mach/mach.h> header file. */ #undef HAVE_MACH_MACH_H -/* Define to 1 if you have the <mach-o/dyld_images.h> header file. */ -#undef HAVE_MACH_O_DYLD_IMAGES_H - /* Define to 1 if you have the <mach-o/loader.h> header file. */ #undef HAVE_MACH_O_LOADER_H
1
0
0
0
Ken Thomases : dbghelp: Fix reading the target's dyld image info, based on its CPU architecture.
by Alexandre Julliard
13 Dec '19
13 Dec '19
Module: wine Branch: master Commit: 4b9defe09a24e77547cde4e8211f701a4984681b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4b9defe09a24e77547cde4e8…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Thu Dec 12 19:43:19 2019 -0600 dbghelp: Fix reading the target's dyld image info, based on its CPU architecture. Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/macho_module.c | 134 ++++++++++++++++++++++++++++++++------------ 1 file changed, 97 insertions(+), 37 deletions(-) diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c index 8eda11ab91..f957439d43 100644 --- a/dlls/dbghelp/macho_module.c +++ b/dlls/dbghelp/macho_module.c @@ -60,23 +60,39 @@ #include <mach-o/nlist.h> #include <mach-o/dyld.h> -#ifdef HAVE_MACH_O_DYLD_IMAGES_H -#include <mach-o/dyld_images.h> -#else -struct dyld_image_info { - const struct mach_header *imageLoadAddress; - const char *imageFilePath; - uintptr_t imageFileModDate; +struct dyld_image_info32 { + uint32_t /* const struct mach_header* */ imageLoadAddress; + uint32_t /* const char* */ imageFilePath; + uint32_t /* uintptr_t */ imageFileModDate; }; -struct dyld_all_image_infos { - uint32_t version; - uint32_t infoArrayCount; - const struct dyld_image_info *infoArray; - void* notification; - int processDetachedFromSharedRegion; +struct dyld_all_image_infos32 { + uint32_t version; + uint32_t infoArrayCount; + uint32_t /* const struct dyld_image_info* */ infoArray; +}; + +struct dyld_image_info64 { + uint64_t /* const struct mach_header* */ imageLoadAddress; + uint64_t /* const char* */ imageFilePath; + uint64_t /* uintptr_t */ imageFileModDate; +}; + +struct dyld_all_image_infos64 { + uint32_t version; + uint32_t infoArrayCount; + uint64_t /* const struct dyld_image_info* */ infoArray; +}; + +union wine_image_info { + struct dyld_image_info32 info32; + struct dyld_image_info64 info64; +}; + +union wine_all_image_infos { + struct dyld_all_image_infos32 infos32; + struct dyld_all_image_infos64 infos64; }; -#endif #ifdef WORDS_BIGENDIAN #define swap_ulong_be_to_host(n) (n) @@ -1649,8 +1665,8 @@ static BOOL macho_enum_modules_internal(const struct process* pcs, const WCHAR* main_name, enum_modules_cb cb, void* user) { - struct dyld_all_image_infos image_infos; - struct dyld_image_info* info_array = NULL; + union wine_all_image_infos image_infos; + union wine_image_info* info_array = NULL; unsigned long len; int i; char bufstr[256]; @@ -1660,31 +1676,55 @@ static BOOL macho_enum_modules_internal(const struct process* pcs, TRACE("(%p/%p, %s, %p, %p)\n", pcs, pcs->handle, debugstr_w(main_name), cb, user); + if (pcs->is_64bit) + len = sizeof(image_infos.infos64); + else + len = sizeof(image_infos.infos32); if (!pcs->dbg_hdr_addr || !ReadProcessMemory(pcs->handle, (void*)pcs->dbg_hdr_addr, - &image_infos, sizeof(image_infos), NULL) || - !image_infos.infoArray) + &image_infos, len, NULL)) goto done; - TRACE("Process has %u image infos at %p\n", image_infos.infoArrayCount, image_infos.infoArray); + if (!pcs->is_64bit) + { + struct dyld_all_image_infos32 temp = image_infos.infos32; + image_infos.infos64.infoArrayCount = temp.infoArrayCount; + image_infos.infos64.infoArray = temp.infoArray; + } + if (!image_infos.infos64.infoArray) + goto done; + TRACE("Process has %u image infos at %p\n", image_infos.infos64.infoArrayCount, (void*)image_infos.infos64.infoArray); - len = image_infos.infoArrayCount * sizeof(info_array[0]); + if (pcs->is_64bit) + len = sizeof(info_array->info64); + else + len = sizeof(info_array->info32); + len *= image_infos.infos64.infoArrayCount; info_array = HeapAlloc(GetProcessHeap(), 0, len); if (!info_array || - !ReadProcessMemory(pcs->handle, image_infos.infoArray, + !ReadProcessMemory(pcs->handle, (void*)image_infos.infos64.infoArray, info_array, len, NULL)) goto done; TRACE("... read image infos\n"); - for (i = 0; i < image_infos.infoArrayCount; i++) + for (i = 0; i < image_infos.infos64.infoArrayCount; i++) { - if (info_array[i].imageFilePath != NULL && - ReadProcessMemory(pcs->handle, info_array[i].imageFilePath, bufstr, sizeof(bufstr), NULL)) + struct dyld_image_info64 info; + if (pcs->is_64bit) + info = info_array[i].info64; + else + { + struct dyld_image_info32 *info32 = &info_array->info32 + i; + info.imageLoadAddress = info32->imageLoadAddress; + info.imageFilePath = info32->imageFilePath; + } + if (info.imageFilePath && + ReadProcessMemory(pcs->handle, (void*)info.imageFilePath, bufstr, sizeof(bufstr), NULL)) { bufstr[sizeof(bufstr) - 1] = '\0'; TRACE("[%d] image file %s\n", i, debugstr_a(bufstr)); MultiByteToWideChar(CP_UNIXCP, 0, bufstr, -1, bufstrW, ARRAY_SIZE(bufstrW)); if (main_name && !bufstrW[0]) strcpyW(bufstrW, main_name); - if (!cb(bufstrW, (unsigned long)info_array[i].imageLoadAddress, user)) break; + if (!cb(bufstrW, info.imageLoadAddress, user)) break; } } @@ -1764,27 +1804,47 @@ static BOOL macho_search_loader(struct process* pcs, struct macho_info* macho_in WCHAR *loader = get_wine_loader_name(pcs); BOOL ret = FALSE; ULONG_PTR dyld_image_info_address; - struct dyld_all_image_infos image_infos; - struct dyld_image_info image_info; + union wine_all_image_infos image_infos; + union wine_image_info image_info; uint32_t len; char path[PATH_MAX]; BOOL got_path = FALSE; + if (pcs->is_64bit) + len = sizeof(image_infos.infos64); + else + len = sizeof(image_infos.infos32); dyld_image_info_address = get_dyld_image_info_address(pcs); if (dyld_image_info_address && - ReadProcessMemory(pcs->handle, (void*)dyld_image_info_address, &image_infos, sizeof(image_infos), NULL) && - image_infos.infoArray && image_infos.infoArrayCount && - ReadProcessMemory(pcs->handle, image_infos.infoArray, &image_info, sizeof(image_info), NULL) && - image_info.imageFilePath) + ReadProcessMemory(pcs->handle, (void*)dyld_image_info_address, &image_infos, len, NULL)) { - for (len = sizeof(path); len > 0; len /= 2) + if (pcs->is_64bit) + len = sizeof(image_info.info64); + else { - if (ReadProcessMemory(pcs->handle, image_info.imageFilePath, path, len, NULL)) + struct dyld_all_image_infos32 temp = image_infos.infos32; + image_infos.infos64.infoArrayCount = temp.infoArrayCount; + image_infos.infos64.infoArray = temp.infoArray; + len = sizeof(image_info.info32); + } + if (image_infos.infos64.infoArray && image_infos.infos64.infoArrayCount && + ReadProcessMemory(pcs->handle, (void*)image_infos.infos64.infoArray, &image_info, len, NULL)) + { + if (!pcs->is_64bit) { - path[len - 1] = 0; - got_path = TRUE; - TRACE("got executable path from target's dyld image info: %s\n", debugstr_a(path)); - break; + struct dyld_image_info32 temp = image_info.info32; + image_info.info64.imageLoadAddress = temp.imageLoadAddress; + image_info.info64.imageFilePath = temp.imageFilePath; + } + for (len = sizeof(path); image_info.info64.imageFilePath && len > 0; len /= 2) + { + if (ReadProcessMemory(pcs->handle, (void*)image_info.info64.imageFilePath, path, len, NULL)) + { + path[len - 1] = 0; + got_path = TRUE; + TRACE("got executable path from target's dyld image info: %s\n", debugstr_a(path)); + break; + } } } }
1
0
0
0
Ken Thomases : dbghelp: Fix reading the address of the target's dyld image info from its PEB.
by Alexandre Julliard
13 Dec '19
13 Dec '19
Module: wine Branch: master Commit: 28a25b052d21a9e2e4fc3c7790711b290d44a488 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=28a25b052d21a9e2e4fc3c77…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Thu Dec 12 19:43:18 2019 -0600 dbghelp: Fix reading the address of the target's dyld image info from its PEB. Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/macho_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c index 9d83b006b7..8eda11ab91 100644 --- a/dlls/dbghelp/macho_module.c +++ b/dlls/dbghelp/macho_module.c @@ -1366,7 +1366,7 @@ static ULONG_PTR get_dyld_image_info_address(struct process* pcs) if (status == STATUS_SUCCESS) { /* Read dyld image info address from PEB */ - if (!pcs->is_64bit) + if (pcs->is_64bit) ret = ReadProcessMemory(pcs->handle, &pbi.PebBaseAddress->Reserved[0], &dyld_image_info_address, sizeof(dyld_image_info_address), NULL); else
1
0
0
0
Michael Stefaniuc : dmloader: Simplify tracing of DMUS_CONTAINED_OBJF_KEEP flag.
by Alexandre Julliard
13 Dec '19
13 Dec '19
Module: wine Branch: master Commit: ee639a55e634bef5aea871d38813cd41efa85e4c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ee639a55e634bef5aea871d3…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Fri Dec 13 00:47:18 2019 +0100 dmloader: Simplify tracing of DMUS_CONTAINED_OBJF_KEEP flag. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmloader/debug.c | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/dlls/dmloader/debug.c b/dlls/dmloader/debug.c index 30e3fd69cc..1be92e72af 100644 --- a/dlls/dmloader/debug.c +++ b/dlls/dmloader/debug.c @@ -43,33 +43,6 @@ const char *resolve_STREAM_SEEK (DWORD flag) { } } -/* generic flag-dumping function */ -static const char* debugstr_flags (DWORD flags, const flag_info* names, size_t num_names){ - static char buffer[128] = "", *ptr = &buffer[0]; - unsigned int i; - int size = sizeof(buffer); - - for (i=0; i < num_names; i++) { - if ((flags & names[i].val)) { - int cnt = snprintf(ptr, size, "%s ", names[i].name); - if (cnt < 0 || cnt >= size) break; - size -= cnt; - ptr += cnt; - } - } - - ptr = &buffer[0]; - return ptr; -} - -/* dump DMUS_CONTAINED_OBJF flags */ -static const char *debugstr_DMUS_CONTAINED_OBJF_FLAGS (DWORD flagmask) { - static const flag_info flags[] = { - FE(DMUS_CONTAINED_OBJF_KEEP) - }; - return debugstr_flags(flagmask, flags, ARRAY_SIZE(flags)); -} - const char *debugstr_DMUS_IO_CONTAINER_HEADER (LPDMUS_IO_CONTAINER_HEADER pHeader) { if (pHeader) { char buffer[1024], *ptr = buffer; @@ -90,7 +63,8 @@ const char *debugstr_DMUS_IO_CONTAINED_OBJECT_HEADER (LPDMUS_IO_CONTAINED_OBJECT ptr += sprintf(ptr, "DMUS_IO_CONTAINED_OBJECT_HEADER (%p):", pHeader); ptr += sprintf(ptr, "\n - guidClassID = %s", debugstr_dmguid(&pHeader->guidClassID)); - ptr += sprintf(ptr, "\n - dwFlags = %s", debugstr_DMUS_CONTAINED_OBJF_FLAGS (pHeader->dwFlags)); + ptr += sprintf(ptr, "\n - dwFlags = %#x%s", pHeader->dwFlags, + pHeader->dwFlags & DMUS_CONTAINED_OBJF_KEEP ? " (DMUS_CONTAINED_OBJF_KEEP)" : ""); ptr += sprintf(ptr, "\n - ckid = %s", debugstr_fourcc (pHeader->ckid)); ptr += sprintf(ptr, "\n - fccType = %s", debugstr_fourcc (pHeader->fccType));
1
0
0
0
Michael Stefaniuc : dmloader: Simplify tracing of the DMUS_CONTAINER_NOLOADS flag.
by Alexandre Julliard
13 Dec '19
13 Dec '19
Module: wine Branch: master Commit: 1ca7f9a36fac0ac49f3629b47d70b103273ded35 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1ca7f9a36fac0ac49f3629b4…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Fri Dec 13 00:47:17 2019 +0100 dmloader: Simplify tracing of the DMUS_CONTAINER_NOLOADS flag. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmloader/debug.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/dlls/dmloader/debug.c b/dlls/dmloader/debug.c index 398ce690d1..30e3fd69cc 100644 --- a/dlls/dmloader/debug.c +++ b/dlls/dmloader/debug.c @@ -62,14 +62,6 @@ static const char* debugstr_flags (DWORD flags, const flag_info* names, size_t n return ptr; } -/* dump DMUS_CONTAINER flags */ -static const char *debugstr_DMUS_CONTAINER_FLAGS (DWORD flagmask) { - static const flag_info flags[] = { - FE(DMUS_CONTAINER_NOLOADS) - }; - return debugstr_flags(flagmask, flags, ARRAY_SIZE(flags)); -} - /* dump DMUS_CONTAINED_OBJF flags */ static const char *debugstr_DMUS_CONTAINED_OBJF_FLAGS (DWORD flagmask) { static const flag_info flags[] = { @@ -81,10 +73,11 @@ static const char *debugstr_DMUS_CONTAINED_OBJF_FLAGS (DWORD flagmask) { const char *debugstr_DMUS_IO_CONTAINER_HEADER (LPDMUS_IO_CONTAINER_HEADER pHeader) { if (pHeader) { char buffer[1024], *ptr = buffer; - + ptr += sprintf(ptr, "DMUS_IO_CONTAINER_HEADER (%p):", pHeader); - ptr += sprintf(ptr, "\n - dwFlags = %s", debugstr_DMUS_CONTAINER_FLAGS(pHeader->dwFlags)); - + ptr += sprintf(ptr, "\n - dwFlags = %#x%s", pHeader->dwFlags, + pHeader->dwFlags & DMUS_CONTAINER_NOLOADS ? " (DMUS_CONTAINER_NOLOADS)" : ""); + return wine_dbg_sprintf("%s", buffer); } else { return wine_dbg_sprintf("(NULL)");
1
0
0
0
Michael Stefaniuc : dmloader: Get rid of single use debugstr_dmreturn().
by Alexandre Julliard
13 Dec '19
13 Dec '19
Module: wine Branch: master Commit: 8320b40077dbd504e5fa3431d7f4a45d0caa2ce6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8320b40077dbd504e5fa3431…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Fri Dec 13 00:47:16 2019 +0100 dmloader: Get rid of single use debugstr_dmreturn(). Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmloader/debug.c | 148 ------------------------------------------------- dlls/dmloader/debug.h | 2 - dlls/dmloader/loader.c | 2 +- 3 files changed, 1 insertion(+), 151 deletions(-) diff --git a/dlls/dmloader/debug.c b/dlls/dmloader/debug.c index 0d274394aa..398ce690d1 100644 --- a/dlls/dmloader/debug.c +++ b/dlls/dmloader/debug.c @@ -43,154 +43,6 @@ const char *resolve_STREAM_SEEK (DWORD flag) { } } -/* returns name of given error code */ -const char *debugstr_dmreturn (DWORD code) { - static const flag_info codes[] = { - FE(S_OK), - FE(S_FALSE), - FE(DMUS_S_PARTIALLOAD), - FE(DMUS_S_PARTIALDOWNLOAD), - FE(DMUS_S_REQUEUE), - FE(DMUS_S_FREE), - FE(DMUS_S_END), - FE(DMUS_S_STRING_TRUNCATED), - FE(DMUS_S_LAST_TOOL), - FE(DMUS_S_OVER_CHORD), - FE(DMUS_S_UP_OCTAVE), - FE(DMUS_S_DOWN_OCTAVE), - FE(DMUS_S_NOBUFFERCONTROL), - FE(DMUS_S_GARBAGE_COLLECTED), - FE(E_NOTIMPL), - FE(E_NOINTERFACE), - FE(E_POINTER), - FE(CLASS_E_NOAGGREGATION), - FE(CLASS_E_CLASSNOTAVAILABLE), - FE(REGDB_E_CLASSNOTREG), - FE(E_OUTOFMEMORY), - FE(E_FAIL), - FE(E_INVALIDARG), - FE(DMUS_E_DRIVER_FAILED), - FE(DMUS_E_PORTS_OPEN), - FE(DMUS_E_DEVICE_IN_USE), - FE(DMUS_E_INSUFFICIENTBUFFER), - FE(DMUS_E_BUFFERNOTSET), - FE(DMUS_E_BUFFERNOTAVAILABLE), - FE(DMUS_E_NOTADLSCOL), - FE(DMUS_E_INVALIDOFFSET), - FE(DMUS_E_ALREADY_LOADED), - FE(DMUS_E_INVALIDPOS), - FE(DMUS_E_INVALIDPATCH), - FE(DMUS_E_CANNOTSEEK), - FE(DMUS_E_CANNOTWRITE), - FE(DMUS_E_CHUNKNOTFOUND), - FE(DMUS_E_INVALID_DOWNLOADID), - FE(DMUS_E_NOT_DOWNLOADED_TO_PORT), - FE(DMUS_E_ALREADY_DOWNLOADED), - FE(DMUS_E_UNKNOWN_PROPERTY), - FE(DMUS_E_SET_UNSUPPORTED), - FE(DMUS_E_GET_UNSUPPORTED), - FE(DMUS_E_NOTMONO), - FE(DMUS_E_BADARTICULATION), - FE(DMUS_E_BADINSTRUMENT), - FE(DMUS_E_BADWAVELINK), - FE(DMUS_E_NOARTICULATION), - FE(DMUS_E_NOTPCM), - FE(DMUS_E_BADWAVE), - FE(DMUS_E_BADOFFSETTABLE), - FE(DMUS_E_UNKNOWNDOWNLOAD), - FE(DMUS_E_NOSYNTHSINK), - FE(DMUS_E_ALREADYOPEN), - FE(DMUS_E_ALREADYCLOSED), - FE(DMUS_E_SYNTHNOTCONFIGURED), - FE(DMUS_E_SYNTHACTIVE), - FE(DMUS_E_CANNOTREAD), - FE(DMUS_E_DMUSIC_RELEASED), - FE(DMUS_E_BUFFER_EMPTY), - FE(DMUS_E_BUFFER_FULL), - FE(DMUS_E_PORT_NOT_CAPTURE), - FE(DMUS_E_PORT_NOT_RENDER), - FE(DMUS_E_DSOUND_NOT_SET), - FE(DMUS_E_ALREADY_ACTIVATED), - FE(DMUS_E_INVALIDBUFFER), - FE(DMUS_E_WAVEFORMATNOTSUPPORTED), - FE(DMUS_E_SYNTHINACTIVE), - FE(DMUS_E_DSOUND_ALREADY_SET), - FE(DMUS_E_INVALID_EVENT), - FE(DMUS_E_UNSUPPORTED_STREAM), - FE(DMUS_E_ALREADY_INITED), - FE(DMUS_E_INVALID_BAND), - FE(DMUS_E_TRACK_HDR_NOT_FIRST_CK), - FE(DMUS_E_TOOL_HDR_NOT_FIRST_CK), - FE(DMUS_E_INVALID_TRACK_HDR), - FE(DMUS_E_INVALID_TOOL_HDR), - FE(DMUS_E_ALL_TOOLS_FAILED), - FE(DMUS_E_ALL_TRACKS_FAILED), - FE(DMUS_E_NOT_FOUND), - FE(DMUS_E_NOT_INIT), - FE(DMUS_E_TYPE_DISABLED), - FE(DMUS_E_TYPE_UNSUPPORTED), - FE(DMUS_E_TIME_PAST), - FE(DMUS_E_TRACK_NOT_FOUND), - FE(DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT), - FE(DMUS_E_NO_MASTER_CLOCK), - FE(DMUS_E_LOADER_NOCLASSID), - FE(DMUS_E_LOADER_BADPATH), - FE(DMUS_E_LOADER_FAILEDOPEN), - FE(DMUS_E_LOADER_FORMATNOTSUPPORTED), - FE(DMUS_E_LOADER_FAILEDCREATE), - FE(DMUS_E_LOADER_OBJECTNOTFOUND), - FE(DMUS_E_LOADER_NOFILENAME), - FE(DMUS_E_INVALIDFILE), - FE(DMUS_E_ALREADY_EXISTS), - FE(DMUS_E_OUT_OF_RANGE), - FE(DMUS_E_SEGMENT_INIT_FAILED), - FE(DMUS_E_ALREADY_SENT), - FE(DMUS_E_CANNOT_FREE), - FE(DMUS_E_CANNOT_OPEN_PORT), - FE(DMUS_E_CANNOT_CONVERT), - FE(DMUS_E_DESCEND_CHUNK_FAIL), - FE(DMUS_E_NOT_LOADED), - FE(DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE), - FE(DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE), - FE(DMUS_E_SCRIPT_ERROR_IN_SCRIPT), - FE(DMUS_E_SCRIPT_CANTLOAD_OLEAUT32), - FE(DMUS_E_SCRIPT_LOADSCRIPT_ERROR), - FE(DMUS_E_SCRIPT_INVALID_FILE), - FE(DMUS_E_INVALID_SCRIPTTRACK), - FE(DMUS_E_SCRIPT_VARIABLE_NOT_FOUND), - FE(DMUS_E_SCRIPT_ROUTINE_NOT_FOUND), - FE(DMUS_E_SCRIPT_CONTENT_READONLY), - FE(DMUS_E_SCRIPT_NOT_A_REFERENCE), - FE(DMUS_E_SCRIPT_VALUE_NOT_SUPPORTED), - FE(DMUS_E_INVALID_SEGMENTTRIGGERTRACK), - FE(DMUS_E_INVALID_LYRICSTRACK), - FE(DMUS_E_INVALID_PARAMCONTROLTRACK), - FE(DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR), - FE(DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR), - FE(DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE), - FE(DMUS_E_AUDIOPATHS_NOT_VALID), - FE(DMUS_E_AUDIOPATHS_IN_USE), - FE(DMUS_E_NO_AUDIOPATH_CONFIG), - FE(DMUS_E_AUDIOPATH_INACTIVE), - FE(DMUS_E_AUDIOPATH_NOBUFFER), - FE(DMUS_E_AUDIOPATH_NOPORT), - FE(DMUS_E_NO_AUDIOPATH), - FE(DMUS_E_INVALIDCHUNK), - FE(DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER), - FE(DMUS_E_INVALID_CONTAINER_OBJECT) - }; - - unsigned int i; - for (i = 0; i < ARRAY_SIZE(codes); i++) { - if (code == codes[i].val) - return codes[i].name; - } - - /* if we didn't find it, return value */ - return wine_dbg_sprintf("0x%08X", code); -} - - /* generic flag-dumping function */ static const char* debugstr_flags (DWORD flags, const flag_info* names, size_t num_names){ static char buffer[128] = "", *ptr = &buffer[0]; diff --git a/dlls/dmloader/debug.h b/dlls/dmloader/debug.h index fec35cfbff..43f48e832c 100644 --- a/dlls/dmloader/debug.h +++ b/dlls/dmloader/debug.h @@ -39,8 +39,6 @@ typedef struct { extern BOOL IS_VALID_DMFORM (FOURCC chunkID) DECLSPEC_HIDDEN; /* translate STREAM_SEEK flag to string */ extern const char *resolve_STREAM_SEEK (DWORD flag) DECLSPEC_HIDDEN; -/* returns name of given error code */ -extern const char *debugstr_dmreturn (DWORD code) DECLSPEC_HIDDEN; extern const char *debugstr_DMUS_IO_CONTAINER_HEADER (LPDMUS_IO_CONTAINER_HEADER pHeader) DECLSPEC_HIDDEN; extern const char *debugstr_DMUS_IO_CONTAINED_OBJECT_HEADER (LPDMUS_IO_CONTAINED_OBJECT_HEADER pHeader) DECLSPEC_HIDDEN; diff --git a/dlls/dmloader/loader.c b/dlls/dmloader/loader.c index 60dd6f844b..a267d2d6b2 100644 --- a/dlls/dmloader/loader.c +++ b/dlls/dmloader/loader.c @@ -396,7 +396,7 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_GetObject(IDirectMusicLoader8 *ifac /* load */ result = IPersistStream_Load (pPersistStream, pStream); if (result != S_OK) { - WARN(": failed to (completely) load object (%s)\n", debugstr_dmreturn(result)); + WARN(": failed to (completely) load object (%08x)\n", result); return result; } /* get descriptor */
1
0
0
0
Michael Stefaniuc : dswave: Use the debug functions provided by dmobject.[ch].
by Alexandre Julliard
13 Dec '19
13 Dec '19
Module: wine Branch: master Commit: 3ef5436074296610c35de8d5706c5620486fc295 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3ef5436074296610c35de8d5…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Fri Dec 13 00:29:07 2019 +0100 dswave: Use the debug functions provided by dmobject.[ch]. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dswave/dmobject.c | 247 ++++++++++++++++++++++++++++++++++++++- dlls/dswave/dmobject.h | 14 ++- dlls/dswave/dswave.c | 3 +- dlls/dswave/dswave_main.c | 271 +------------------------------------------ dlls/dswave/dswave_private.h | 21 ---- 5 files changed, 256 insertions(+), 300 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=3ef5436074296610c35d…
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
64
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
Results per page:
10
25
50
100
200