https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f267af2ac1a960f6af1c3…
commit f267af2ac1a960f6af1c3e6d656ea3a1dadb2f26
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sun May 27 04:00:39 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sun May 27 04:00:39 2018 +0100
[QUARTZ] Sync with Wine Staging 3.9. CORE-14656
---
dll/directx/wine/quartz/dsoundrender.c | 8 ++++----
dll/directx/wine/quartz/filesource.c | 11 +++++------
dll/directx/wine/quartz/filtermapper.c | 7 +++++--
dll/directx/wine/quartz/parser.c | 10 +++++-----
media/doc/README.WINE | 2 +-
5 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/dll/directx/wine/quartz/dsoundrender.c
b/dll/directx/wine/quartz/dsoundrender.c
index 7902955481..086352edba 100644
--- a/dll/directx/wine/quartz/dsoundrender.c
+++ b/dll/directx/wine/quartz/dsoundrender.c
@@ -491,7 +491,7 @@ static HRESULT WINAPI DSoundRender_CompleteConnect(BaseRenderer *
iface, IPin *
DSBCAPS_GETCURRENTPOSITION2;
buf_desc.dwBufferBytes = This->buf_size;
buf_desc.lpwfxFormat = format;
- hr = IDirectSound_CreateSoundBuffer(This->dsound, &buf_desc,
&This->dsbuffer, NULL);
+ hr = IDirectSound8_CreateSoundBuffer(This->dsound, &buf_desc,
&This->dsbuffer, NULL);
This->writepos = This->buf_size;
if (FAILED(hr))
ERR("Can't create sound buffer (%x)\n", hr);
@@ -645,14 +645,14 @@ HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv)
if (FAILED(hr))
ERR("Cannot create Direct Sound object (%x)\n", hr);
else
- hr = IDirectSound_SetCooperativeLevel(pDSoundRender->dsound,
GetDesktopWindow(), DSSCL_PRIORITY);
+ hr = IDirectSound8_SetCooperativeLevel(pDSoundRender->dsound,
GetDesktopWindow(), DSSCL_PRIORITY);
if (SUCCEEDED(hr)) {
IDirectSoundBuffer *buf;
DSBUFFERDESC buf_desc;
memset(&buf_desc,0,sizeof(DSBUFFERDESC));
buf_desc.dwSize = sizeof(DSBUFFERDESC);
buf_desc.dwFlags = DSBCAPS_PRIMARYBUFFER;
- hr = IDirectSound_CreateSoundBuffer(pDSoundRender->dsound, &buf_desc,
&buf, NULL);
+ hr = IDirectSound8_CreateSoundBuffer(pDSoundRender->dsound, &buf_desc,
&buf, NULL);
if (SUCCEEDED(hr)) {
IDirectSoundBuffer_Play(buf, 0, 0, DSBPLAY_LOOPING);
IDirectSoundBuffer_Release(buf);
@@ -736,7 +736,7 @@ static ULONG WINAPI DSoundRender_Release(IBaseFilter * iface)
IDirectSoundBuffer_Release(This->dsbuffer);
This->dsbuffer = NULL;
if (This->dsound)
- IDirectSound_Release(This->dsound);
+ IDirectSound8_Release(This->dsound);
This->dsound = NULL;
BasicAudio_Destroy(&This->basicAudio);
diff --git a/dll/directx/wine/quartz/filesource.c b/dll/directx/wine/quartz/filesource.c
index 4290ac351d..0413eb45ed 100644
--- a/dll/directx/wine/quartz/filesource.c
+++ b/dll/directx/wine/quartz/filesource.c
@@ -783,12 +783,11 @@ static inline FileAsyncReader *impl_from_IAsyncReader(IAsyncReader
*iface)
return CONTAINING_RECORD(iface, FileAsyncReader, IAsyncReader_iface);
}
-static HRESULT WINAPI FileAsyncReaderPin_QueryAccept(IPin *iface, const AM_MEDIA_TYPE
*pmt)
+static HRESULT WINAPI FileAsyncReaderPin_CheckMediaType(BasePin *pin, const AM_MEDIA_TYPE
*pmt)
{
- FileAsyncReader *This = impl_from_IPin(iface);
- AM_MEDIA_TYPE *pmt_filter =
impl_from_IBaseFilter(This->pin.pin.pinInfo.pFilter)->pmt;
+ AM_MEDIA_TYPE *pmt_filter = impl_from_IBaseFilter(pin->pinInfo.pFilter)->pmt;
- FIXME("(%p, %p)\n", iface, pmt);
+ FIXME("(%p, %p)\n", pin, pmt);
if (IsEqualGUID(&pmt->majortype, &pmt_filter->majortype) &&
IsEqualGUID(&pmt->subtype, &pmt_filter->subtype) &&
@@ -874,7 +873,7 @@ static const IPinVtbl FileAsyncReaderPin_Vtbl =
BasePinImpl_QueryPinInfo,
BasePinImpl_QueryDirection,
BasePinImpl_QueryId,
- FileAsyncReaderPin_QueryAccept,
+ BasePinImpl_QueryAccept,
BasePinImpl_EnumMediaTypes,
BasePinImpl_QueryInternalConnections,
BaseOutputPinImpl_EndOfStream,
@@ -933,7 +932,7 @@ static HRESULT WINAPI
FileAsyncReaderPin_DecideBufferSize(BaseOutputPin *iface,
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = {
{
- NULL,
+ FileAsyncReaderPin_CheckMediaType,
FileAsyncReaderPin_AttemptConnection,
BasePinImpl_GetMediaTypeVersion,
FileAsyncReaderPin_GetMediaType
diff --git a/dll/directx/wine/quartz/filtermapper.c
b/dll/directx/wine/quartz/filtermapper.c
index 2dd316d877..358c40e096 100644
--- a/dll/directx/wine/quartz/filtermapper.c
+++ b/dll/directx/wine/quartz/filtermapper.c
@@ -1524,22 +1524,25 @@ static HRESULT WINAPI FilterMapper_UnregisterFilter(IFilterMapper
* iface, CLSID
strcatW(wszKeyName, wszClsid);
lRet = RegOpenKeyExW(HKEY_CLASSES_ROOT, wszKeyName, 0, KEY_WRITE, &hKey);
+ if (lRet == ERROR_FILE_NOT_FOUND)
+ goto done;
hr = HRESULT_FROM_WIN32(lRet);
}
if (SUCCEEDED(hr))
{
lRet = RegDeleteValueW(hKey, wszMeritName);
- if (lRet != ERROR_SUCCESS)
+ if (lRet != ERROR_SUCCESS && lRet != ERROR_FILE_NOT_FOUND)
hr = HRESULT_FROM_WIN32(lRet);
lRet = RegDeleteTreeW(hKey, wszPins);
- if (lRet != ERROR_SUCCESS)
+ if (lRet != ERROR_SUCCESS && lRet != ERROR_FILE_NOT_FOUND)
hr = HRESULT_FROM_WIN32(lRet);
RegCloseKey(hKey);
}
+done:
CoTaskMemFree(wszClsid);
return hr;
diff --git a/dll/directx/wine/quartz/parser.c b/dll/directx/wine/quartz/parser.c
index 4b968a398c..7b550b0ff6 100644
--- a/dll/directx/wine/quartz/parser.c
+++ b/dll/directx/wine/quartz/parser.c
@@ -44,6 +44,7 @@ static HRESULT WINAPI Parser_ChangeStart(IMediaSeeking *iface);
static HRESULT WINAPI Parser_ChangeStop(IMediaSeeking *iface);
static HRESULT WINAPI Parser_ChangeRate(IMediaSeeking *iface);
static HRESULT WINAPI Parser_OutputPin_DecideBufferSize(BaseOutputPin *iface,
IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest);
+static HRESULT WINAPI Parser_OutputPin_CheckMediaType(BasePin *pin, const AM_MEDIA_TYPE
*pmt);
static HRESULT WINAPI Parser_OutputPin_GetMediaType(BasePin *iface, int iPosition,
AM_MEDIA_TYPE *pmt);
static HRESULT WINAPI Parser_OutputPin_DecideAllocator(BaseOutputPin *This, IMemInputPin
*pPin, IMemAllocator **pAlloc);
static HRESULT WINAPI Parser_OutputPin_BreakConnect(BaseOutputPin *This);
@@ -432,7 +433,7 @@ HRESULT WINAPI Parser_QueryVendorInfo(IBaseFilter * iface, LPWSTR
*pVendorInfo)
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = {
{
- NULL,
+ Parser_OutputPin_CheckMediaType,
BaseOutputPinImpl_AttemptConnection,
BasePinImpl_GetMediaTypeVersion,
Parser_OutputPin_GetMediaType
@@ -699,11 +700,10 @@ static HRESULT WINAPI Parser_OutputPin_Connect(IPin * iface, IPin *
pReceivePin,
return BaseOutputPinImpl_Connect(iface, pReceivePin, pmt);
}
-static HRESULT WINAPI Parser_OutputPin_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *
pmt)
+static HRESULT WINAPI Parser_OutputPin_CheckMediaType(BasePin *pin, const AM_MEDIA_TYPE
*pmt)
{
- Parser_OutputPin *This = unsafe_impl_Parser_OutputPin_from_IPin(iface);
+ Parser_OutputPin *This = (Parser_OutputPin *)pin;
- TRACE("()\n");
dump_AM_MEDIA_TYPE(pmt);
return (memcmp(This->pmt, pmt, sizeof(AM_MEDIA_TYPE)) == 0);
@@ -722,7 +722,7 @@ static const IPinVtbl Parser_OutputPin_Vtbl =
BasePinImpl_QueryPinInfo,
BasePinImpl_QueryDirection,
BasePinImpl_QueryId,
- Parser_OutputPin_QueryAccept,
+ BasePinImpl_QueryAccept,
BasePinImpl_EnumMediaTypes,
BasePinImpl_QueryInternalConnections,
BaseOutputPinImpl_EndOfStream,
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index f26e114734..5da4269676 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -39,7 +39,7 @@ reactos/dll/directx/wine/dsound # Synced to Wine-1.3.29
reactos/dll/directx/wine/dxdiagn # Synced to WineStaging-3.3
reactos/dll/directx/wine/msdmo # Synced to WineStaging-3.9
reactos/dll/directx/wine/qedit # Synced to WineStaging-3.3
-reactos/dll/directx/wine/quartz # Synced to WineStaging-3.3
+reactos/dll/directx/wine/quartz # Synced to WineStaging-3.9
reactos/dll/directx/wine/wined3d # Synced to WineStaging-3.9
reactos/dll/win32/activeds # Synced to WineStaging-3.3