[QUARTZ] Sync with Wine Staging 3.9. CORE-14656
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 27 May 2018 03:00:39 +0000 (04:00 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 27 May 2018 03:00:39 +0000 (04:00 +0100)
dll/directx/wine/quartz/dsoundrender.c
dll/directx/wine/quartz/filesource.c
dll/directx/wine/quartz/filtermapper.c
dll/directx/wine/quartz/parser.c
media/doc/README.WINE

index 7902955..086352e 100644 (file)
@@ -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);
index 4290ac3..0413eb4 100644 (file)
@@ -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
index 2dd316d..358c40e 100644 (file)
@@ -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;
index 4b968a3..7b550b0 100644 (file)
@@ -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,
index f26e114..5da4269 100644 (file)
@@ -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