From c194453d626e089a309609bb1bd3306ba4d6fdd1 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Thu, 26 Nov 2015 22:53:27 +0000 Subject: [PATCH] [STRMBASE] Sync with Wine Staging 1.7.55. CORE-10536 svn path=/trunk/; revision=70126 --- reactos/lib/3rdparty/strmbase/CMakeLists.txt | 3 +++ reactos/lib/3rdparty/strmbase/audio.c | 2 +- reactos/lib/3rdparty/strmbase/dispatch.c | 4 +--- reactos/lib/3rdparty/strmbase/dllfunc.c | 3 +-- reactos/lib/3rdparty/strmbase/filter.c | 3 +-- reactos/lib/3rdparty/strmbase/outputqueue.c | 5 ++--- reactos/lib/3rdparty/strmbase/pin.c | 13 +++++-------- reactos/lib/3rdparty/strmbase/qualitycontrol.c | 4 ++-- reactos/lib/3rdparty/strmbase/renderer.c | 8 ++++---- reactos/lib/3rdparty/strmbase/strmbase_private.h | 2 +- reactos/lib/3rdparty/strmbase/transform.c | 2 +- reactos/lib/3rdparty/strmbase/video.c | 2 +- reactos/lib/3rdparty/strmbase/window.c | 2 +- reactos/media/doc/README.WINE | 2 +- 14 files changed, 25 insertions(+), 30 deletions(-) diff --git a/reactos/lib/3rdparty/strmbase/CMakeLists.txt b/reactos/lib/3rdparty/strmbase/CMakeLists.txt index 3c1ecc4839d..9b19530e627 100644 --- a/reactos/lib/3rdparty/strmbase/CMakeLists.txt +++ b/reactos/lib/3rdparty/strmbase/CMakeLists.txt @@ -1,4 +1,7 @@ +remove_definitions(-D_WIN32_WINNT=0x502 -DWINVER=0x502) +add_definitions(-D_WIN32_WINNT=0x600 -DWINVER=0x600) + include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) add_definitions(-D__WINESRC__) diff --git a/reactos/lib/3rdparty/strmbase/audio.c b/reactos/lib/3rdparty/strmbase/audio.c index a2718c08c42..6ad64610f07 100644 --- a/reactos/lib/3rdparty/strmbase/audio.c +++ b/reactos/lib/3rdparty/strmbase/audio.c @@ -62,8 +62,8 @@ HRESULT WINAPI BasicAudioImpl_GetIDsOfNames(IBasicAudio *iface, REFIID riid, LPO HRESULT WINAPI BasicAudioImpl_Invoke(IBasicAudio *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr) { BasicAudio *This = impl_from_IBasicAudio(iface); - HRESULT hr = S_OK; ITypeInfo *pTypeInfo; + HRESULT hr; hr = BaseDispatchImpl_GetTypeInfo(&This->baseDispatch, riid, 1, lcid, &pTypeInfo); if (SUCCEEDED(hr)) diff --git a/reactos/lib/3rdparty/strmbase/dispatch.c b/reactos/lib/3rdparty/strmbase/dispatch.c index a9ed1591494..cd0287c94dc 100644 --- a/reactos/lib/3rdparty/strmbase/dispatch.c +++ b/reactos/lib/3rdparty/strmbase/dispatch.c @@ -24,16 +24,14 @@ HRESULT WINAPI BaseDispatch_Init(BaseDispatch *This, REFIID riid) { - HRESULT hr = E_FAIL; ITypeLib *pTypeLib; + HRESULT hr; This->pTypeInfo = NULL; hr = LoadRegTypeLib(&LIBID_QuartzTypeLib, 1, 0, LOCALE_SYSTEM_DEFAULT, &pTypeLib); if (SUCCEEDED(hr)) { hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, riid, &This->pTypeInfo); - - if (pTypeLib) ITypeLib_Release(pTypeLib); } return hr; diff --git a/reactos/lib/3rdparty/strmbase/dllfunc.c b/reactos/lib/3rdparty/strmbase/dllfunc.c index bb8316e21e2..5d52173000c 100644 --- a/reactos/lib/3rdparty/strmbase/dllfunc.c +++ b/reactos/lib/3rdparty/strmbase/dllfunc.c @@ -36,7 +36,6 @@ static LONG server_locks = 0; /* * defines and constants */ -#define MAX_KEY_LEN 260 static const WCHAR clsid_keyname[] = {'C','L','S','I','D',0 }; static const WCHAR ips32_keyname[] = {'I','n','P','r','o','c','S','e','r','v','e','r','3','2',0}; @@ -110,7 +109,7 @@ static HRESULT SetupRegisterAllClasses(const FactoryTemplate * pList, int num, pList->m_Name, szFileName, ips32_keyname, tmodel_both); else - hr = SHDeleteKeyW(hkey, szCLSID); + hr = RegDeleteTreeW(hkey, szCLSID); } } RegCloseKey(hkey); diff --git a/reactos/lib/3rdparty/strmbase/filter.c b/reactos/lib/3rdparty/strmbase/filter.c index 09d3b5bd3d3..3ef67b5b0c4 100644 --- a/reactos/lib/3rdparty/strmbase/filter.c +++ b/reactos/lib/3rdparty/strmbase/filter.c @@ -149,7 +149,6 @@ HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO * HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter * iface, IFilterGraph *pGraph, LPCWSTR pName ) { - HRESULT hr = S_OK; BaseFilter *This = impl_from_IBaseFilter(iface); TRACE("(%p)->(%p, %s)\n", This, pGraph, debugstr_w(pName)); @@ -164,7 +163,7 @@ HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter * iface, IFilterGraph } LeaveCriticalSection(&This->csFilter); - return hr; + return S_OK; } HRESULT WINAPI BaseFilterImpl_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo) diff --git a/reactos/lib/3rdparty/strmbase/outputqueue.c b/reactos/lib/3rdparty/strmbase/outputqueue.c index 64392ccb088..0e2cb5833bd 100644 --- a/reactos/lib/3rdparty/strmbase/outputqueue.c +++ b/reactos/lib/3rdparty/strmbase/outputqueue.c @@ -59,7 +59,6 @@ HRESULT WINAPI OutputQueue_Construct( OutputQueue **ppOutputQueue ) { - HRESULT hr = S_OK; BOOL threaded = FALSE; DWORD tid; @@ -92,7 +91,7 @@ HRESULT WINAPI OutputQueue_Construct( EnterCriticalSection(&This->csQueue); if (bAuto && pInputPin->pMemInputPin) - threaded = IMemInputPin_ReceiveCanBlock(pInputPin->pMemInputPin); + threaded = IMemInputPin_ReceiveCanBlock(pInputPin->pMemInputPin) == S_OK; else threaded = bQueue; @@ -107,7 +106,7 @@ HRESULT WINAPI OutputQueue_Construct( } LeaveCriticalSection(&This->csQueue); - return hr; + return S_OK; } HRESULT WINAPI OutputQueue_Destroy(OutputQueue *pOutputQueue) diff --git a/reactos/lib/3rdparty/strmbase/pin.c b/reactos/lib/3rdparty/strmbase/pin.c index abeac0b3f17..835214b5642 100644 --- a/reactos/lib/3rdparty/strmbase/pin.c +++ b/reactos/lib/3rdparty/strmbase/pin.c @@ -565,9 +565,9 @@ HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(BaseOutputPin *This, IMediaSa /* replaces OutputPin_SendSample */ HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin *This, IMediaSample * pSample) { - HRESULT hr = S_OK; IMemInputPin * pMemConnected = NULL; PIN_INFO pinInfo; + HRESULT hr; EnterCriticalSection(This->pin.pCritSec); { @@ -605,7 +605,7 @@ HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin *This, IMediaSample * pSa /* replaces OutputPin_CommitAllocator */ HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin *This) { - HRESULT hr = S_OK; + HRESULT hr; TRACE("(%p)->()\n", This); @@ -625,7 +625,7 @@ HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin *This) /* replaces OutputPin_DecommitAllocator */ HRESULT WINAPI BaseOutputPinImpl_Inactive(BaseOutputPin *This) { - HRESULT hr = S_OK; + HRESULT hr; TRACE("(%p)->()\n", This); @@ -865,12 +865,9 @@ ULONG WINAPI BaseInputPinImpl_Release(IPin * iface) TRACE("(%p)->() Release from %d\n", iface, refCount + 1); if (!refCount) - { BaseInputPin_Destroy(This); - return 0; - } - else - return refCount; + + return refCount; } HRESULT WINAPI BaseInputPinImpl_Connect(IPin * iface, IPin * pConnector, const AM_MEDIA_TYPE * pmt) diff --git a/reactos/lib/3rdparty/strmbase/qualitycontrol.c b/reactos/lib/3rdparty/strmbase/qualitycontrol.c index 623964ade19..4c2475c84e0 100644 --- a/reactos/lib/3rdparty/strmbase/qualitycontrol.c +++ b/reactos/lib/3rdparty/strmbase/qualitycontrol.c @@ -38,9 +38,9 @@ HRESULT QualityControlImpl_Create(IPin *input, IBaseFilter *self, QualityControl return S_OK; } -HRESULT QualityControlImpl_Destroy(QualityControlImpl *This) +void QualityControlImpl_Destroy(QualityControlImpl *This) { - return HeapFree(GetProcessHeap(),0,This); + HeapFree(GetProcessHeap(),0,This); } HRESULT WINAPI QualityControlImpl_QueryInterface(IQualityControl *iface, REFIID riid, void **ppv) { diff --git a/reactos/lib/3rdparty/strmbase/renderer.c b/reactos/lib/3rdparty/strmbase/renderer.c index 21ea48df0d3..a89ba5f1bba 100644 --- a/reactos/lib/3rdparty/strmbase/renderer.c +++ b/reactos/lib/3rdparty/strmbase/renderer.c @@ -50,7 +50,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_ReceiveConnection(IPin * iface, IPin { BaseInputPin *This = impl_BaseInputPin_from_IPin(iface); BaseRenderer *renderer = impl_from_IBaseFilter(This->pin.pinInfo.pFilter); - HRESULT hr = S_OK; + HRESULT hr; TRACE("(%p/%p)->(%p, %p)\n", This, renderer, pReceivePin, pmt); @@ -89,7 +89,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_Disconnect(IPin * iface) static HRESULT WINAPI BaseRenderer_InputPin_EndOfStream(IPin * iface) { - HRESULT hr = S_OK; + HRESULT hr; BaseInputPin* This = impl_BaseInputPin_from_IPin(iface); BaseRenderer *pFilter = impl_from_IBaseFilter(This->pin.pinInfo.pFilter); @@ -116,7 +116,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_BeginFlush(IPin * iface) { BaseInputPin* This = impl_BaseInputPin_from_IPin(iface); BaseRenderer *pFilter = impl_from_IBaseFilter(This->pin.pinInfo.pFilter); - HRESULT hr = S_OK; + HRESULT hr; TRACE("(%p/%p)->()\n", This, iface); @@ -141,7 +141,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndFlush(IPin * iface) { BaseInputPin* This = impl_BaseInputPin_from_IPin(iface); BaseRenderer *pFilter = impl_from_IBaseFilter(This->pin.pinInfo.pFilter); - HRESULT hr = S_OK; + HRESULT hr; TRACE("(%p/%p)->()\n", This, pFilter); diff --git a/reactos/lib/3rdparty/strmbase/strmbase_private.h b/reactos/lib/3rdparty/strmbase/strmbase_private.h index cf4750f9ae9..2438877daec 100644 --- a/reactos/lib/3rdparty/strmbase/strmbase_private.h +++ b/reactos/lib/3rdparty/strmbase/strmbase_private.h @@ -63,7 +63,7 @@ typedef struct QualityControlImpl { } QualityControlImpl; HRESULT QualityControlImpl_Create(IPin *input, IBaseFilter *self, QualityControlImpl **ppv); -HRESULT QualityControlImpl_Destroy(QualityControlImpl *This); +void QualityControlImpl_Destroy(QualityControlImpl *This); HRESULT WINAPI QualityControlImpl_QueryInterface(IQualityControl *iface, REFIID riid, void **ppv); ULONG WINAPI QualityControlImpl_AddRef(IQualityControl *iface); ULONG WINAPI QualityControlImpl_Release(IQualityControl *iface); diff --git a/reactos/lib/3rdparty/strmbase/transform.c b/reactos/lib/3rdparty/strmbase/transform.c index 2b08497bca0..ba6c4ebc330 100644 --- a/reactos/lib/3rdparty/strmbase/transform.c +++ b/reactos/lib/3rdparty/strmbase/transform.c @@ -75,7 +75,7 @@ static HRESULT WINAPI TransformFilter_Input_CheckMediaType(BasePin *iface, const static HRESULT WINAPI TransformFilter_Input_Receive(BaseInputPin *This, IMediaSample *pInSample) { - HRESULT hr = S_FALSE; + HRESULT hr; TransformFilter * pTransform; TRACE("%p\n", This); pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter); diff --git a/reactos/lib/3rdparty/strmbase/video.c b/reactos/lib/3rdparty/strmbase/video.c index 376c73a6f8c..91d5a995300 100644 --- a/reactos/lib/3rdparty/strmbase/video.c +++ b/reactos/lib/3rdparty/strmbase/video.c @@ -67,8 +67,8 @@ HRESULT WINAPI BaseControlVideoImpl_GetIDsOfNames(IBasicVideo *iface, REFIID rii HRESULT WINAPI BaseControlVideoImpl_Invoke(IBasicVideo *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr) { BaseControlVideo *This = impl_from_IBasicVideo(iface); - HRESULT hr = S_OK; ITypeInfo *pTypeInfo; + HRESULT hr; hr = BaseDispatchImpl_GetTypeInfo(&This->baseDispatch, riid, 1, lcid, &pTypeInfo); if (SUCCEEDED(hr)) diff --git a/reactos/lib/3rdparty/strmbase/window.c b/reactos/lib/3rdparty/strmbase/window.c index c948e8a04d5..91606dee976 100644 --- a/reactos/lib/3rdparty/strmbase/window.c +++ b/reactos/lib/3rdparty/strmbase/window.c @@ -240,8 +240,8 @@ HRESULT WINAPI BaseControlWindowImpl_GetIDsOfNames(IVideoWindow *iface, REFIID r HRESULT WINAPI BaseControlWindowImpl_Invoke(IVideoWindow *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr) { BaseControlWindow* This = impl_from_IVideoWindow(iface); - HRESULT hr = S_OK; ITypeInfo *pTypeInfo; + HRESULT hr; hr = BaseDispatchImpl_GetTypeInfo(&This->baseDispatch, riid, 1, lcid, &pTypeInfo); if (SUCCEEDED(hr)) diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 432650cc913..cae8afa6bde 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -250,7 +250,7 @@ In addition the following libs, dlls and source files are mostly based on code p from Winehq CVS. If you are looking to update something in these files check Wine current sources first as it may already be fixed. -reactos/lib/3rdparty/strmbase # Synced to WineStaging-1.7.47 +reactos/lib/3rdparty/strmbase # Synced to WineStaging-1.7.55 reactos/lib/rtl/actctx.c # Partly synced with WineStaging-1.7.37 reactos/lib/rtl/timerqueue.c # Partly synced with WineStaging-1.7.55 -- 2.17.1