From feb91195ff12074276ea3b83047d4c8f2c70d738 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 21 Oct 2021 09:41:51 +1100 Subject: [PATCH] Rebase against f712a98d12d091c5437159a291857dfb9f0cea7c. --- ...amer-Get-rid-of-the-WMReader-typedef.patch | 1945 ----------------- ...ove-the-async-reader-implementation-.patch | 168 -- ...amer-Get-rid-of-the-WMSyncReader-typ.patch | 579 ----- ...ove-the-sync-reader-implementation-t.patch | 161 -- ...amer-Translate-GST_AUDIO_CHANNEL_POS.patch | 30 - ...amer-Trace-the-unfiltered-caps-in-si.patch | 37 - ...amer-Avoid-seeking-past-the-end-of-a.patch | 33 - ...amer-Avoid-passing-a-NULL-buffer-to-.patch | 52 - ...amer-Use-array_reserve-to-reallocate.patch | 122 -- ...amer-Handle-zero-length-reads-in-src.patch | 44 - ...amer-Convert-the-Unix-library-to-the.patch | 1389 ------------ ...amer-Return-void-from-wg_parser_stre.patch | 91 - ...amer-Move-Unix-library-definitions-i.patch | 382 ---- ...amer-Remove-the-no-longer-used-start.patch | 27 - ...amer-Set-unlimited-buffering-using-a.patch | 180 -- ...amer-Initialize-GStreamer-in-wg_pars.patch | 88 - ...amer-Use-a-single-wg_parser_create-e.patch | 192 -- ...amer-Fix-return-code-in-init_gst-fai.patch | 29 - ...amer-Allocate-source-media-buffers-i.patch | 224 -- ...amer-Duplicate-source-shutdown-path-.patch | 221 -- ...amer-Properly-clean-up-from-failure-.patch | 140 -- ...amer-Factor-out-more-of-the-init_gst.patch | 160 -- patches/mfplat-reverts/definition | 2 - patches/mfplat-streaming-support/definition | 2 +- ...xml3-Implement-FreeThreadedXMLHTTP60.patch | 35 +- ...t-HashLinks-field-in-LDR-module-data.patch | 41 +- ...-support-for-junction-point-creation.patch | 26 +- ...NtAlertThreadByThreadId-and-NtWaitFo.patch | 42 +- ...dll-Support-x86_64-syscall-emulation.patch | 36 +- patches/patchinstall.sh | 106 +- staging/upstream-commit | 2 +- 31 files changed, 88 insertions(+), 6498 deletions(-) delete mode 100644 patches/mfplat-reverts/0001-Revert-winegstreamer-Get-rid-of-the-WMReader-typedef.patch delete mode 100644 patches/mfplat-reverts/0002-Revert-wmvcore-Move-the-async-reader-implementation-.patch delete mode 100644 patches/mfplat-reverts/0003-Revert-winegstreamer-Get-rid-of-the-WMSyncReader-typ.patch delete mode 100644 patches/mfplat-reverts/0004-Revert-wmvcore-Move-the-sync-reader-implementation-t.patch delete mode 100644 patches/mfplat-reverts/0005-Revert-winegstreamer-Translate-GST_AUDIO_CHANNEL_POS.patch delete mode 100644 patches/mfplat-reverts/0006-Revert-winegstreamer-Trace-the-unfiltered-caps-in-si.patch delete mode 100644 patches/mfplat-reverts/0007-Revert-winegstreamer-Avoid-seeking-past-the-end-of-a.patch delete mode 100644 patches/mfplat-reverts/0008-Revert-winegstreamer-Avoid-passing-a-NULL-buffer-to-.patch delete mode 100644 patches/mfplat-reverts/0009-Revert-winegstreamer-Use-array_reserve-to-reallocate.patch delete mode 100644 patches/mfplat-reverts/0010-Revert-winegstreamer-Handle-zero-length-reads-in-src.patch delete mode 100644 patches/mfplat-reverts/0011-Revert-winegstreamer-Convert-the-Unix-library-to-the.patch delete mode 100644 patches/mfplat-reverts/0012-Revert-winegstreamer-Return-void-from-wg_parser_stre.patch delete mode 100644 patches/mfplat-reverts/0013-Revert-winegstreamer-Move-Unix-library-definitions-i.patch delete mode 100644 patches/mfplat-reverts/0014-Revert-winegstreamer-Remove-the-no-longer-used-start.patch delete mode 100644 patches/mfplat-reverts/0015-Revert-winegstreamer-Set-unlimited-buffering-using-a.patch delete mode 100644 patches/mfplat-reverts/0016-Revert-winegstreamer-Initialize-GStreamer-in-wg_pars.patch delete mode 100644 patches/mfplat-reverts/0017-Revert-winegstreamer-Use-a-single-wg_parser_create-e.patch delete mode 100644 patches/mfplat-reverts/0018-Revert-winegstreamer-Fix-return-code-in-init_gst-fai.patch delete mode 100644 patches/mfplat-reverts/0019-Revert-winegstreamer-Allocate-source-media-buffers-i.patch delete mode 100644 patches/mfplat-reverts/0020-Revert-winegstreamer-Duplicate-source-shutdown-path-.patch delete mode 100644 patches/mfplat-reverts/0021-Revert-winegstreamer-Properly-clean-up-from-failure-.patch delete mode 100644 patches/mfplat-reverts/0022-Revert-winegstreamer-Factor-out-more-of-the-init_gst.patch delete mode 100644 patches/mfplat-reverts/definition diff --git a/patches/mfplat-reverts/0001-Revert-winegstreamer-Get-rid-of-the-WMReader-typedef.patch b/patches/mfplat-reverts/0001-Revert-winegstreamer-Get-rid-of-the-WMReader-typedef.patch deleted file mode 100644 index 8c4faf0b..00000000 --- a/patches/mfplat-reverts/0001-Revert-winegstreamer-Get-rid-of-the-WMReader-typedef.patch +++ /dev/null @@ -1,1945 +0,0 @@ -From 587ce9ff24747b30b2a48020a8671d6fd142b110 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sat, 9 Oct 2021 13:47:39 +1100 -Subject: [PATCH 01/22] Revert "winegstreamer: Get rid of the WMReader - typedef." - -This reverts commit 2652416be7b3914a98474faa562274c363f1dce8. ---- - dlls/winegstreamer/wm_asyncreader.c | 497 ++++++++++++++-------------- - 1 file changed, 248 insertions(+), 249 deletions(-) - -diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c -index b4ef4851c33..d3fd1624f24 100644 ---- a/dlls/winegstreamer/wm_asyncreader.c -+++ b/dlls/winegstreamer/wm_asyncreader.c -@@ -21,8 +21,7 @@ - - WINE_DEFAULT_DEBUG_CHANNEL(wmvcore); - --struct async_reader --{ -+typedef struct { - IWMReader IWMReader_iface; - IWMReaderAdvanced6 IWMReaderAdvanced6_iface; - IWMReaderAccelerator IWMReaderAccelerator_iface; -@@ -37,16 +36,16 @@ struct async_reader - IWMProfile3 IWMProfile3_iface; - IWMPacketSize2 IWMPacketSize2_iface; - LONG ref; --}; -+} WMReader; - --static struct async_reader *impl_from_IWMReader(IWMReader *iface) -+static inline WMReader *impl_from_IWMReader(IWMReader *iface) - { -- return CONTAINING_RECORD(iface, struct async_reader, IWMReader_iface); -+ return CONTAINING_RECORD(iface, WMReader, IWMReader_iface); - } - - static HRESULT WINAPI WMReader_QueryInterface(IWMReader *iface, REFIID riid, void **ppv) - { -- struct async_reader *This = impl_from_IWMReader(iface); -+ WMReader *This = impl_from_IWMReader(iface); - - if(IsEqualGUID(riid, &IID_IUnknown)) { - TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); -@@ -135,7 +134,7 @@ static HRESULT WINAPI WMReader_QueryInterface(IWMReader *iface, REFIID riid, voi - - static ULONG WINAPI WMReader_AddRef(IWMReader *iface) - { -- struct async_reader *This = impl_from_IWMReader(iface); -+ WMReader *This = impl_from_IWMReader(iface); - LONG ref = InterlockedIncrement(&This->ref); - - TRACE("(%p) ref=%d\n", This, ref); -@@ -145,7 +144,7 @@ static ULONG WINAPI WMReader_AddRef(IWMReader *iface) - - static ULONG WINAPI WMReader_Release(IWMReader *iface) - { -- struct async_reader *This = impl_from_IWMReader(iface); -+ WMReader *This = impl_from_IWMReader(iface); - LONG ref = InterlockedDecrement(&This->ref); - - TRACE("(%p) ref=%d\n", This, ref); -@@ -158,21 +157,21 @@ static ULONG WINAPI WMReader_Release(IWMReader *iface) - - static HRESULT WINAPI WMReader_Open(IWMReader *iface, const WCHAR *url, IWMReaderCallback *callback, void *context) - { -- struct async_reader *This = impl_from_IWMReader(iface); -+ WMReader *This = impl_from_IWMReader(iface); - FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(url), callback, context); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReader_Close(IWMReader *iface) - { -- struct async_reader *This = impl_from_IWMReader(iface); -+ WMReader *This = impl_from_IWMReader(iface); - FIXME("(%p)\n", This); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReader_GetOutputCount(IWMReader *iface, DWORD *outputs) - { -- struct async_reader *This = impl_from_IWMReader(iface); -+ WMReader *This = impl_from_IWMReader(iface); - FIXME("(%p)->(%p)\n", This, outputs); - - if(!outputs) -@@ -184,56 +183,56 @@ static HRESULT WINAPI WMReader_GetOutputCount(IWMReader *iface, DWORD *outputs) - - static HRESULT WINAPI WMReader_GetOutputProps(IWMReader *iface, DWORD output_num, IWMOutputMediaProps **output) - { -- struct async_reader *This = impl_from_IWMReader(iface); -+ WMReader *This = impl_from_IWMReader(iface); - FIXME("(%p)->(%u %p)\n", This, output_num, output); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReader_SetOutputProps(IWMReader *iface, DWORD output_num, IWMOutputMediaProps *output) - { -- struct async_reader *This = impl_from_IWMReader(iface); -+ WMReader *This = impl_from_IWMReader(iface); - FIXME("(%p)->(%u %p)\n", This, output_num, output); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD output_num, DWORD *formats) - { -- struct async_reader *This = impl_from_IWMReader(iface); -+ WMReader *This = impl_from_IWMReader(iface); - FIXME("(%p)->(%u %p)\n", This, output_num, formats); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output_num, DWORD format_num, IWMOutputMediaProps **props) - { -- struct async_reader *This = impl_from_IWMReader(iface); -+ WMReader *This = impl_from_IWMReader(iface); - FIXME("(%p)->(%u %u %p)\n", This, output_num, format_num, props); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReader_Start(IWMReader *iface, QWORD start, QWORD duration, float rate, void *context) - { -- struct async_reader *This = impl_from_IWMReader(iface); -+ WMReader *This = impl_from_IWMReader(iface); - FIXME("(%p)->(%s %s %f %p)\n", This, wine_dbgstr_longlong(start), wine_dbgstr_longlong(duration), rate, context); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReader_Stop(IWMReader *iface) - { -- struct async_reader *This = impl_from_IWMReader(iface); -+ WMReader *This = impl_from_IWMReader(iface); - FIXME("(%p)\n", This); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReader_Pause(IWMReader *iface) - { -- struct async_reader *This = impl_from_IWMReader(iface); -+ WMReader *This = impl_from_IWMReader(iface); - FIXME("(%p)\n", This); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReader_Resume(IWMReader *iface) - { -- struct async_reader *This = impl_from_IWMReader(iface); -+ WMReader *This = impl_from_IWMReader(iface); - FIXME("(%p)\n", This); - return E_NOTIMPL; - } -@@ -255,60 +254,60 @@ static const IWMReaderVtbl WMReaderVtbl = { - WMReader_Resume - }; - --static struct async_reader *impl_from_IWMReaderAdvanced6(IWMReaderAdvanced6 *iface) -+static inline WMReader *impl_from_IWMReaderAdvanced6(IWMReaderAdvanced6 *iface) - { -- return CONTAINING_RECORD(iface, struct async_reader, IWMReaderAdvanced6_iface); -+ return CONTAINING_RECORD(iface, WMReader, IWMReaderAdvanced6_iface); - } - - static HRESULT WINAPI WMReaderAdvanced_QueryInterface(IWMReaderAdvanced6 *iface, REFIID riid, void **ppv) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv); - } - - static ULONG WINAPI WMReaderAdvanced_AddRef(IWMReaderAdvanced6 *iface) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - return IWMReader_AddRef(&This->IWMReader_iface); - } - - static ULONG WINAPI WMReaderAdvanced_Release(IWMReaderAdvanced6 *iface) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - return IWMReader_Release(&This->IWMReader_iface); - } - - static HRESULT WINAPI WMReaderAdvanced_SetUserProvidedClock(IWMReaderAdvanced6 *iface, BOOL user_clock) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%x)\n", This, user_clock); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced_GetUserProvidedClock(IWMReaderAdvanced6 *iface, BOOL *user_clock) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p)\n", This, user_clock); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced_DeliverTime(IWMReaderAdvanced6 *iface, QWORD time) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%s)\n", This, wine_dbgstr_longlong(time)); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced_SetManualStreamSelection(IWMReaderAdvanced6 *iface, BOOL selection) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%x)\n", This, selection); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced_GetManualStreamSelection(IWMReaderAdvanced6 *iface, BOOL *selection) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p)\n", This, selection); - return E_NOTIMPL; - } -@@ -316,7 +315,7 @@ static HRESULT WINAPI WMReaderAdvanced_GetManualStreamSelection(IWMReaderAdvance - static HRESULT WINAPI WMReaderAdvanced_SetStreamsSelected(IWMReaderAdvanced6 *iface, WORD stream_count, - WORD *stream_numbers, WMT_STREAM_SELECTION *selections) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %p %p)\n", This, stream_count, stream_numbers, selections); - return E_NOTIMPL; - } -@@ -324,21 +323,21 @@ static HRESULT WINAPI WMReaderAdvanced_SetStreamsSelected(IWMReaderAdvanced6 *if - static HRESULT WINAPI WMReaderAdvanced_GetStreamSelected(IWMReaderAdvanced6 *iface, WORD stream_num, - WMT_STREAM_SELECTION *selection) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %p)\n", This, stream_num, selection); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced_SetReceiveSelectionCallbacks(IWMReaderAdvanced6 *iface, BOOL get_callbacks) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%x)\n", This, get_callbacks); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced_GetReceiveSelectionCallbacks(IWMReaderAdvanced6 *iface, BOOL *get_callbacks) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p)\n", This, get_callbacks); - return E_NOTIMPL; - } -@@ -346,7 +345,7 @@ static HRESULT WINAPI WMReaderAdvanced_GetReceiveSelectionCallbacks(IWMReaderAdv - static HRESULT WINAPI WMReaderAdvanced_SetReceiveStreamSamples(IWMReaderAdvanced6 *iface, WORD stream_num, - BOOL receive_stream_samples) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %x)\n", This, stream_num, receive_stream_samples); - return E_NOTIMPL; - } -@@ -354,91 +353,91 @@ static HRESULT WINAPI WMReaderAdvanced_SetReceiveStreamSamples(IWMReaderAdvanced - static HRESULT WINAPI WMReaderAdvanced_GetReceiveStreamSamples(IWMReaderAdvanced6 *iface, WORD stream_num, - BOOL *receive_stream_samples) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %p)\n", This, stream_num, receive_stream_samples); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced_SetAllocateForOutput(IWMReaderAdvanced6 *iface, DWORD output_num, BOOL allocate) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %x)\n", This, output_num, allocate); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced_GetAllocateForOutput(IWMReaderAdvanced6 *iface, DWORD output_num, BOOL *allocate) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %p)\n", This, output_num, allocate); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced_SetAllocateForStream(IWMReaderAdvanced6 *iface, WORD output_num, BOOL allocate) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %x)\n", This, output_num, allocate); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced_GetAllocateForStream(IWMReaderAdvanced6 *iface, WORD output_num, BOOL *allocate) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %p)\n", This, output_num, allocate); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced_GetStatistics(IWMReaderAdvanced6 *iface, WM_READER_STATISTICS *statistics) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p)\n", This, statistics); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced_SetClientInfo(IWMReaderAdvanced6 *iface, WM_READER_CLIENTINFO *client_info) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p)\n", This, client_info); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced_GetMaxOutputSampleSize(IWMReaderAdvanced6 *iface, DWORD output, DWORD *max) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %p)\n", This, output, max); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced_GetMaxStreamSampleSize(IWMReaderAdvanced6 *iface, WORD stream, DWORD *max) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %p)\n", This, stream, max); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced_NotifyLateDelivery(IWMReaderAdvanced6 *iface, QWORD lateness) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%s)\n", This, wine_dbgstr_longlong(lateness)); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced2_SetPlayMode(IWMReaderAdvanced6 *iface, WMT_PLAY_MODE mode) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d)\n", This, mode); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced2_GetPlayMode(IWMReaderAdvanced6 *iface, WMT_PLAY_MODE *mode) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p)\n", This, mode); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced2_GetBufferProgress(IWMReaderAdvanced6 *iface, DWORD *percent, QWORD *buffering) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p %p)\n", This, percent, buffering); - return E_NOTIMPL; - } -@@ -446,28 +445,28 @@ static HRESULT WINAPI WMReaderAdvanced2_GetBufferProgress(IWMReaderAdvanced6 *if - static HRESULT WINAPI WMReaderAdvanced2_GetDownloadProgress(IWMReaderAdvanced6 *iface, DWORD *percent, - QWORD *bytes_downloaded, QWORD *download) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p %p %p)\n", This, percent, bytes_downloaded, download); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced2_GetSaveAsProgress(IWMReaderAdvanced6 *iface, DWORD *percent) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p)\n", This, percent); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced2_SaveFileAs(IWMReaderAdvanced6 *iface, const WCHAR *filename) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(filename)); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced2_GetProtocolName(IWMReaderAdvanced6 *iface, WCHAR *protocol, DWORD *protocol_len) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p %p)\n", This, protocol, protocol_len); - return E_NOTIMPL; - } -@@ -475,7 +474,7 @@ static HRESULT WINAPI WMReaderAdvanced2_GetProtocolName(IWMReaderAdvanced6 *ifac - static HRESULT WINAPI WMReaderAdvanced2_StartAtMarker(IWMReaderAdvanced6 *iface, WORD marker_index, - QWORD duration, float rate, void *context) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %s %f %p)\n", This, marker_index, wine_dbgstr_longlong(duration), rate, context); - return E_NOTIMPL; - } -@@ -483,7 +482,7 @@ static HRESULT WINAPI WMReaderAdvanced2_StartAtMarker(IWMReaderAdvanced6 *iface, - static HRESULT WINAPI WMReaderAdvanced2_GetOutputSetting(IWMReaderAdvanced6 *iface, DWORD output_num, - const WCHAR *name, WMT_ATTR_DATATYPE *type, BYTE *value, WORD *length) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %s %p %p %p)\n", This, output_num, debugstr_w(name), type, value, length); - return E_NOTIMPL; - } -@@ -491,35 +490,35 @@ static HRESULT WINAPI WMReaderAdvanced2_GetOutputSetting(IWMReaderAdvanced6 *ifa - static HRESULT WINAPI WMReaderAdvanced2_SetOutputSetting(IWMReaderAdvanced6 *iface, DWORD output_num, - const WCHAR *name, WMT_ATTR_DATATYPE type, const BYTE *value, WORD length) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %s %d %p %d)\n", This, output_num, debugstr_w(name), type, value, length); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced2_Preroll(IWMReaderAdvanced6 *iface, QWORD start, QWORD duration, float rate) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%s %s %f)\n", This, wine_dbgstr_longlong(start), wine_dbgstr_longlong(duration), rate); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced2_SetLogClientID(IWMReaderAdvanced6 *iface, BOOL log_client_id) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%x)\n", This, log_client_id); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced2_GetLogClientID(IWMReaderAdvanced6 *iface, BOOL *log_client_id) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p)\n", This, log_client_id); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced2_StopBuffering(IWMReaderAdvanced6 *iface) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)\n", This); - return E_NOTIMPL; - } -@@ -527,14 +526,14 @@ static HRESULT WINAPI WMReaderAdvanced2_StopBuffering(IWMReaderAdvanced6 *iface) - static HRESULT WINAPI WMReaderAdvanced2_OpenStream(IWMReaderAdvanced6 *iface, IStream *stream, - IWMReaderCallback *callback, void *context) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p %p %p)\n", This, stream, callback, context); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced3_StopNetStreaming(IWMReaderAdvanced6 *iface) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)\n", This); - return E_NOTIMPL; - } -@@ -542,14 +541,14 @@ static HRESULT WINAPI WMReaderAdvanced3_StopNetStreaming(IWMReaderAdvanced6 *ifa - static HRESULT WINAPI WMReaderAdvanced3_StartAtPosition(IWMReaderAdvanced6 *iface, WORD stream_num, - void *offset_start, void *duration, WMT_OFFSET_FORMAT format, float rate, void *context) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %p %p %d %f %p)\n", This, stream_num, offset_start, duration, format, rate, context); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced4_GetLanguageCount(IWMReaderAdvanced6 *iface, DWORD output_num, WORD *language_count) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %p)\n", This, output_num, language_count); - return E_NOTIMPL; - } -@@ -557,21 +556,21 @@ static HRESULT WINAPI WMReaderAdvanced4_GetLanguageCount(IWMReaderAdvanced6 *ifa - static HRESULT WINAPI WMReaderAdvanced4_GetLanguage(IWMReaderAdvanced6 *iface, DWORD output_num, - WORD language, WCHAR *language_string, WORD *language_string_len) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %x %p %p)\n", This, output_num, language, language_string, language_string_len); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced4_GetMaxSpeedFactor(IWMReaderAdvanced6 *iface, double *factor) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p)\n", This, factor); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced4_IsUsingFastCache(IWMReaderAdvanced6 *iface, BOOL *using_fast_cache) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p)\n", This, using_fast_cache); - return E_NOTIMPL; - } -@@ -579,42 +578,42 @@ static HRESULT WINAPI WMReaderAdvanced4_IsUsingFastCache(IWMReaderAdvanced6 *ifa - static HRESULT WINAPI WMReaderAdvanced4_AddLogParam(IWMReaderAdvanced6 *iface, const WCHAR *namespace, - const WCHAR *name, const WCHAR *value) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(namespace), debugstr_w(name), debugstr_w(value)); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced4_SendLogParams(IWMReaderAdvanced6 *iface) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)\n", This); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced4_CanSaveFileAs(IWMReaderAdvanced6 *iface, BOOL *can_save) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p)\n", This, can_save); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced4_CancelSaveFileAs(IWMReaderAdvanced6 *iface) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)\n", This); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced4_GetURL(IWMReaderAdvanced6 *iface, WCHAR *url, DWORD *url_len) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p %p)\n", This, url, url_len); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMReaderAdvanced5_SetPlayerHook(IWMReaderAdvanced6 *iface, DWORD output_num, IWMPlayerHook *hook) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%d %p)\n", This, output_num, hook); - return E_NOTIMPL; - } -@@ -622,7 +621,7 @@ static HRESULT WINAPI WMReaderAdvanced5_SetPlayerHook(IWMReaderAdvanced6 *iface, - static HRESULT WINAPI WMReaderAdvanced6_SetProtectStreamSamples(IWMReaderAdvanced6 *iface, BYTE *cert, - DWORD cert_size, DWORD cert_type, DWORD flags, BYTE *initialization_vector, DWORD *initialization_vector_size) - { -- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); -+ WMReader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%p %d %d %x %p %p)\n", This, cert, cert_size, cert_type, flags, initialization_vector, - initialization_vector_size); - return E_NOTIMPL; -@@ -682,32 +681,32 @@ static const IWMReaderAdvanced6Vtbl WMReaderAdvanced6Vtbl = { - WMReaderAdvanced6_SetProtectStreamSamples - }; - --static struct async_reader *impl_from_IWMReaderAccelerator(IWMReaderAccelerator *iface) -+static inline WMReader *impl_from_IWMReaderAccelerator(IWMReaderAccelerator *iface) - { -- return CONTAINING_RECORD(iface, struct async_reader, IWMReaderAccelerator_iface); -+ return CONTAINING_RECORD(iface, WMReader, IWMReaderAccelerator_iface); - } - - static HRESULT WINAPI reader_accl_QueryInterface(IWMReaderAccelerator *iface, REFIID riid, void **object) - { -- struct async_reader *This = impl_from_IWMReaderAccelerator(iface); -+ WMReader *This = impl_from_IWMReaderAccelerator(iface); - return IWMReader_QueryInterface(&This->IWMReader_iface, riid, object); - } - - static ULONG WINAPI reader_accl_AddRef(IWMReaderAccelerator *iface) - { -- struct async_reader *This = impl_from_IWMReaderAccelerator(iface); -+ WMReader *This = impl_from_IWMReaderAccelerator(iface); - return IWMReader_AddRef(&This->IWMReader_iface); - } - - static ULONG WINAPI reader_accl_Release(IWMReaderAccelerator *iface) - { -- struct async_reader *This = impl_from_IWMReaderAccelerator(iface); -+ WMReader *This = impl_from_IWMReaderAccelerator(iface); - return IWMReader_Release(&This->IWMReader_iface); - } - - static HRESULT WINAPI reader_accl_GetCodecInterface(IWMReaderAccelerator *iface, DWORD output, REFIID riid, void **codec) - { -- struct async_reader *This = impl_from_IWMReaderAccelerator(iface); -+ WMReader *This = impl_from_IWMReaderAccelerator(iface); - - FIXME("%p, %d, %s, %p\n", This, output, debugstr_guid(riid), codec); - -@@ -716,7 +715,7 @@ static HRESULT WINAPI reader_accl_GetCodecInterface(IWMReaderAccelerator *iface, - - static HRESULT WINAPI reader_accl_Notify(IWMReaderAccelerator *iface, DWORD output, WM_MEDIA_TYPE *subtype) - { -- struct async_reader *This = impl_from_IWMReaderAccelerator(iface); -+ WMReader *This = impl_from_IWMReaderAccelerator(iface); - - FIXME("%p, %d, %p\n", This, output, subtype); - -@@ -731,39 +730,39 @@ static const IWMReaderAcceleratorVtbl WMReaderAcceleratorVtbl = { - reader_accl_Notify - }; - --static struct async_reader *impl_from_IWMReaderNetworkConfig2(IWMReaderNetworkConfig2 *iface) -+static inline WMReader *impl_from_IWMReaderNetworkConfig2(IWMReaderNetworkConfig2 *iface) - { -- return CONTAINING_RECORD(iface, struct async_reader, IWMReaderNetworkConfig2_iface); -+ return CONTAINING_RECORD(iface, WMReader, IWMReaderNetworkConfig2_iface); - } - - static HRESULT WINAPI networkconfig_QueryInterface(IWMReaderNetworkConfig2 *iface, REFIID riid, void **ppv) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv); - } - - static ULONG WINAPI networkconfig_AddRef(IWMReaderNetworkConfig2 *iface) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - return IWMReader_AddRef(&This->IWMReader_iface); - } - - static ULONG WINAPI networkconfig_Release(IWMReaderNetworkConfig2 *iface) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - return IWMReader_Release(&This->IWMReader_iface); - } - - static HRESULT WINAPI networkconfig_GetBufferingTime(IWMReaderNetworkConfig2 *iface, QWORD *buffering_time) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p\n", This, buffering_time); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_SetBufferingTime(IWMReaderNetworkConfig2 *iface, QWORD buffering_time) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %s\n", This, wine_dbgstr_longlong(buffering_time)); - return E_NOTIMPL; - } -@@ -771,7 +770,7 @@ static HRESULT WINAPI networkconfig_SetBufferingTime(IWMReaderNetworkConfig2 *if - static HRESULT WINAPI networkconfig_GetUDPPortRanges(IWMReaderNetworkConfig2 *iface, WM_PORT_NUMBER_RANGE *array, - DWORD *ranges) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p, %p\n", This, array, ranges); - return E_NOTIMPL; - } -@@ -779,7 +778,7 @@ static HRESULT WINAPI networkconfig_GetUDPPortRanges(IWMReaderNetworkConfig2 *if - static HRESULT WINAPI networkconfig_SetUDPPortRanges(IWMReaderNetworkConfig2 *iface, WM_PORT_NUMBER_RANGE *array, - DWORD ranges) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p, %u\n", This, array, ranges); - return E_NOTIMPL; - } -@@ -787,7 +786,7 @@ static HRESULT WINAPI networkconfig_SetUDPPortRanges(IWMReaderNetworkConfig2 *if - static HRESULT WINAPI networkconfig_GetProxySettings(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol, - WMT_PROXY_SETTINGS *proxy) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %s, %p\n", This, debugstr_w(protocol), proxy); - return E_NOTIMPL; - } -@@ -795,7 +794,7 @@ static HRESULT WINAPI networkconfig_GetProxySettings(IWMReaderNetworkConfig2 *if - static HRESULT WINAPI networkconfig_SetProxySettings(IWMReaderNetworkConfig2 *iface, LPCWSTR protocol, - WMT_PROXY_SETTINGS proxy) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %s, %d\n", This, debugstr_w(protocol), proxy); - return E_NOTIMPL; - } -@@ -803,7 +802,7 @@ static HRESULT WINAPI networkconfig_SetProxySettings(IWMReaderNetworkConfig2 *if - static HRESULT WINAPI networkconfig_GetProxyHostName(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol, - WCHAR *hostname, DWORD *size) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %s, %p, %p\n", This, debugstr_w(protocol), hostname, size); - return E_NOTIMPL; - } -@@ -811,7 +810,7 @@ static HRESULT WINAPI networkconfig_GetProxyHostName(IWMReaderNetworkConfig2 *if - static HRESULT WINAPI networkconfig_SetProxyHostName(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol, - const WCHAR *hostname) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %s, %s\n", This, debugstr_w(protocol), debugstr_w(hostname)); - return E_NOTIMPL; - } -@@ -819,7 +818,7 @@ static HRESULT WINAPI networkconfig_SetProxyHostName(IWMReaderNetworkConfig2 *if - static HRESULT WINAPI networkconfig_GetProxyPort(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol, - DWORD *port) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %s, %p\n", This, debugstr_w(protocol), port); - return E_NOTIMPL; - } -@@ -827,7 +826,7 @@ static HRESULT WINAPI networkconfig_GetProxyPort(IWMReaderNetworkConfig2 *iface, - static HRESULT WINAPI networkconfig_SetProxyPort(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol, - DWORD port) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %s, %u\n", This, debugstr_w(protocol), port); - return E_NOTIMPL; - } -@@ -835,7 +834,7 @@ static HRESULT WINAPI networkconfig_SetProxyPort(IWMReaderNetworkConfig2 *iface, - static HRESULT WINAPI networkconfig_GetProxyExceptionList(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol, - WCHAR *exceptions, DWORD *count) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %s, %p, %p\n", This, debugstr_w(protocol), exceptions, count); - return E_NOTIMPL; - } -@@ -843,7 +842,7 @@ static HRESULT WINAPI networkconfig_GetProxyExceptionList(IWMReaderNetworkConfig - static HRESULT WINAPI networkconfig_SetProxyExceptionList(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol, - const WCHAR *exceptions) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %s, %s\n", This, debugstr_w(protocol), debugstr_w(exceptions)); - return E_NOTIMPL; - } -@@ -851,7 +850,7 @@ static HRESULT WINAPI networkconfig_SetProxyExceptionList(IWMReaderNetworkConfig - static HRESULT WINAPI networkconfig_GetProxyBypassForLocal(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol, - BOOL *bypass) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %s, %p\n", This, debugstr_w(protocol), bypass); - return E_NOTIMPL; - } -@@ -859,7 +858,7 @@ static HRESULT WINAPI networkconfig_GetProxyBypassForLocal(IWMReaderNetworkConfi - static HRESULT WINAPI networkconfig_SetProxyBypassForLocal(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol, - BOOL bypass) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %s, %d\n", This, debugstr_w(protocol), bypass); - return E_NOTIMPL; - } -@@ -867,7 +866,7 @@ static HRESULT WINAPI networkconfig_SetProxyBypassForLocal(IWMReaderNetworkConfi - static HRESULT WINAPI networkconfig_GetForceRerunAutoProxyDetection(IWMReaderNetworkConfig2 *iface, - BOOL *detection) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p\n", This, detection); - return E_NOTIMPL; - } -@@ -875,91 +874,91 @@ static HRESULT WINAPI networkconfig_GetForceRerunAutoProxyDetection(IWMReaderNet - static HRESULT WINAPI networkconfig_SetForceRerunAutoProxyDetection(IWMReaderNetworkConfig2 *iface, - BOOL detection) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %d\n", This, detection); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_GetEnableMulticast(IWMReaderNetworkConfig2 *iface, BOOL *multicast) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p\n", This, multicast); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_SetEnableMulticast(IWMReaderNetworkConfig2 *iface, BOOL multicast) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %d\n", This, multicast); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_GetEnableHTTP(IWMReaderNetworkConfig2 *iface, BOOL *enable) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p\n", This, enable); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_SetEnableHTTP(IWMReaderNetworkConfig2 *iface, BOOL enable) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %d\n", This, enable); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_GetEnableUDP(IWMReaderNetworkConfig2 *iface, BOOL *enable) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p\n", This, enable); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_SetEnableUDP(IWMReaderNetworkConfig2 *iface, BOOL enable) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %d\n", This, enable); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_GetEnableTCP(IWMReaderNetworkConfig2 *iface, BOOL *enable) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p\n", This, enable); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_SetEnableTCP(IWMReaderNetworkConfig2 *iface, BOOL enable) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %d\n", This, enable); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_ResetProtocolRollover(IWMReaderNetworkConfig2 *iface) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p\n", This); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_GetConnectionBandwidth(IWMReaderNetworkConfig2 *iface, DWORD *bandwidth) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p\n", This, bandwidth); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_SetConnectionBandwidth(IWMReaderNetworkConfig2 *iface, DWORD bandwidth) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %u\n", This, bandwidth); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_GetNumProtocolsSupported(IWMReaderNetworkConfig2 *iface, DWORD *protocols) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p\n", This, protocols); - return E_NOTIMPL; - } -@@ -967,14 +966,14 @@ static HRESULT WINAPI networkconfig_GetNumProtocolsSupported(IWMReaderNetworkCon - static HRESULT WINAPI networkconfig_GetSupportedProtocolName(IWMReaderNetworkConfig2 *iface, DWORD protocol_num, - WCHAR *protocol, DWORD *size) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %u, %p %p\n", This, protocol_num, protocol, size); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_AddLoggingUrl(IWMReaderNetworkConfig2 *iface, const WCHAR *url) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %s\n", This, debugstr_w(url)); - return E_NOTIMPL; - } -@@ -982,49 +981,49 @@ static HRESULT WINAPI networkconfig_AddLoggingUrl(IWMReaderNetworkConfig2 *iface - static HRESULT WINAPI networkconfig_GetLoggingUrl(IWMReaderNetworkConfig2 *iface, DWORD index, WCHAR *url, - DWORD *size) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %u, %p, %p\n", This, index, url, size); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_GetLoggingUrlCount(IWMReaderNetworkConfig2 *iface, DWORD *count) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p\n", This, count); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_ResetLoggingUrlList(IWMReaderNetworkConfig2 *iface) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p\n", This); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_GetEnableContentCaching(IWMReaderNetworkConfig2 *iface, BOOL *enable) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p\n", This, enable); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_SetEnableContentCaching(IWMReaderNetworkConfig2 *iface, BOOL enable) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %d\n", This, enable); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_GetEnableFastCache(IWMReaderNetworkConfig2 *iface, BOOL *enable) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p\n", This, enable); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_SetEnableFastCache(IWMReaderNetworkConfig2 *iface, BOOL enable) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %d\n", This, enable); - return E_NOTIMPL; - } -@@ -1032,7 +1031,7 @@ static HRESULT WINAPI networkconfig_SetEnableFastCache(IWMReaderNetworkConfig2 * - static HRESULT WINAPI networkconfig_GetAcceleratedStreamingDuration(IWMReaderNetworkConfig2 *iface, - QWORD *duration) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p\n", This, duration); - return E_NOTIMPL; - } -@@ -1040,56 +1039,56 @@ static HRESULT WINAPI networkconfig_GetAcceleratedStreamingDuration(IWMReaderNet - static HRESULT WINAPI networkconfig_SetAcceleratedStreamingDuration(IWMReaderNetworkConfig2 *iface, - QWORD duration) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %s\n", This, wine_dbgstr_longlong(duration)); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_GetAutoReconnectLimit(IWMReaderNetworkConfig2 *iface, DWORD *limit) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p\n", This, limit); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_SetAutoReconnectLimit(IWMReaderNetworkConfig2 *iface, DWORD limit) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %u\n", This, limit); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_GetEnableResends(IWMReaderNetworkConfig2 *iface, BOOL *enable) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p\n", This, enable); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_SetEnableResends(IWMReaderNetworkConfig2 *iface, BOOL enable) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %u\n", This, enable); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_GetEnableThinning(IWMReaderNetworkConfig2 *iface, BOOL *enable) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p\n", This, enable); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_SetEnableThinning(IWMReaderNetworkConfig2 *iface, BOOL enable) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %u\n", This, enable); - return E_NOTIMPL; - } - - static HRESULT WINAPI networkconfig_GetMaxNetPacketSize(IWMReaderNetworkConfig2 *iface, DWORD *packet_size) - { -- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface); -+ WMReader *This = impl_from_IWMReaderNetworkConfig2(iface); - FIXME("%p, %p\n", This, packet_size); - return E_NOTIMPL; - } -@@ -1147,46 +1146,46 @@ static const IWMReaderNetworkConfig2Vtbl WMReaderNetworkConfig2Vtbl = - networkconfig_GetMaxNetPacketSize - }; - --static struct async_reader *impl_from_IWMReaderStreamClock(IWMReaderStreamClock *iface) -+static inline WMReader *impl_from_IWMReaderStreamClock(IWMReaderStreamClock *iface) - { -- return CONTAINING_RECORD(iface, struct async_reader, IWMReaderStreamClock_iface); -+ return CONTAINING_RECORD(iface, WMReader, IWMReaderStreamClock_iface); - } - - static HRESULT WINAPI readclock_QueryInterface(IWMReaderStreamClock *iface, REFIID riid, void **ppv) - { -- struct async_reader *This = impl_from_IWMReaderStreamClock(iface); -+ WMReader *This = impl_from_IWMReaderStreamClock(iface); - return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv); - } - - static ULONG WINAPI readclock_AddRef(IWMReaderStreamClock *iface) - { -- struct async_reader *This = impl_from_IWMReaderStreamClock(iface); -+ WMReader *This = impl_from_IWMReaderStreamClock(iface); - return IWMReader_AddRef(&This->IWMReader_iface); - } - - static ULONG WINAPI readclock_Release(IWMReaderStreamClock *iface) - { -- struct async_reader *This = impl_from_IWMReaderStreamClock(iface); -+ WMReader *This = impl_from_IWMReaderStreamClock(iface); - return IWMReader_Release(&This->IWMReader_iface); - } - - static HRESULT WINAPI readclock_GetTime(IWMReaderStreamClock *iface, QWORD *now) - { -- struct async_reader *This = impl_from_IWMReaderStreamClock(iface); -+ WMReader *This = impl_from_IWMReaderStreamClock(iface); - FIXME("%p, %p\n", This, now); - return E_NOTIMPL; - } - - static HRESULT WINAPI readclock_SetTimer(IWMReaderStreamClock *iface, QWORD when, void *param, DWORD *id) - { -- struct async_reader *This = impl_from_IWMReaderStreamClock(iface); -+ WMReader *This = impl_from_IWMReaderStreamClock(iface); - FIXME("%p, %s, %p, %p\n", This, wine_dbgstr_longlong(when), param, id); - return E_NOTIMPL; - } - - static HRESULT WINAPI readclock_KillTimer(IWMReaderStreamClock *iface, DWORD id) - { -- struct async_reader *This = impl_from_IWMReaderStreamClock(iface); -+ WMReader *This = impl_from_IWMReaderStreamClock(iface); - FIXME("%p, %d\n", This, id); - return E_NOTIMPL; - } -@@ -1201,32 +1200,32 @@ static const IWMReaderStreamClockVtbl WMReaderStreamClockVtbl = - readclock_KillTimer - }; - --static struct async_reader *impl_from_IWMReaderTypeNegotiation(IWMReaderTypeNegotiation *iface) -+static inline WMReader *impl_from_IWMReaderTypeNegotiation(IWMReaderTypeNegotiation *iface) - { -- return CONTAINING_RECORD(iface, struct async_reader, IWMReaderTypeNegotiation_iface); -+ return CONTAINING_RECORD(iface, WMReader, IWMReaderTypeNegotiation_iface); - } - - static HRESULT WINAPI negotiation_QueryInterface(IWMReaderTypeNegotiation *iface, REFIID riid, void **ppv) - { -- struct async_reader *This = impl_from_IWMReaderTypeNegotiation(iface); -+ WMReader *This = impl_from_IWMReaderTypeNegotiation(iface); - return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv); - } - - static ULONG WINAPI negotiation_AddRef(IWMReaderTypeNegotiation *iface) - { -- struct async_reader *This = impl_from_IWMReaderTypeNegotiation(iface); -+ WMReader *This = impl_from_IWMReaderTypeNegotiation(iface); - return IWMReader_AddRef(&This->IWMReader_iface); - } - - static ULONG WINAPI negotiation_Release(IWMReaderTypeNegotiation *iface) - { -- struct async_reader *This = impl_from_IWMReaderTypeNegotiation(iface); -+ WMReader *This = impl_from_IWMReaderTypeNegotiation(iface); - return IWMReader_Release(&This->IWMReader_iface); - } - - static HRESULT WINAPI negotiation_TryOutputProps(IWMReaderTypeNegotiation *iface, DWORD output, IWMOutputMediaProps *props) - { -- struct async_reader *This = impl_from_IWMReaderTypeNegotiation(iface); -+ WMReader *This = impl_from_IWMReaderTypeNegotiation(iface); - FIXME("%p, %d, %p\n", This, output, props); - return E_NOTIMPL; - } -@@ -1239,32 +1238,32 @@ static const IWMReaderTypeNegotiationVtbl WMReaderTypeNegotiationVtbl = - negotiation_TryOutputProps - }; - --static struct async_reader *impl_from_IWMReaderTimecode(IWMReaderTimecode *iface) -+static inline WMReader *impl_from_IWMReaderTimecode(IWMReaderTimecode *iface) - { -- return CONTAINING_RECORD(iface, struct async_reader, IWMReaderTimecode_iface); -+ return CONTAINING_RECORD(iface, WMReader, IWMReaderTimecode_iface); - } - - static HRESULT WINAPI timecode_QueryInterface(IWMReaderTimecode *iface, REFIID riid, void **ppv) - { -- struct async_reader *This = impl_from_IWMReaderTimecode(iface); -+ WMReader *This = impl_from_IWMReaderTimecode(iface); - return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv); - } - - static ULONG WINAPI timecode_AddRef(IWMReaderTimecode *iface) - { -- struct async_reader *This = impl_from_IWMReaderTimecode(iface); -+ WMReader *This = impl_from_IWMReaderTimecode(iface); - return IWMReader_AddRef(&This->IWMReader_iface); - } - - static ULONG WINAPI timecode_Release(IWMReaderTimecode *iface) - { -- struct async_reader *This = impl_from_IWMReaderTimecode(iface); -+ WMReader *This = impl_from_IWMReaderTimecode(iface); - return IWMReader_Release(&This->IWMReader_iface); - } - - static HRESULT WINAPI timecode_GetTimecodeRangeCount(IWMReaderTimecode *iface, WORD num, WORD *count) - { -- struct async_reader *This = impl_from_IWMReaderTimecode(iface); -+ WMReader *This = impl_from_IWMReaderTimecode(iface); - FIXME("%p, %d, %p\n", This, num, count); - return E_NOTIMPL; - } -@@ -1272,7 +1271,7 @@ static HRESULT WINAPI timecode_GetTimecodeRangeCount(IWMReaderTimecode *iface, W - static HRESULT WINAPI timecode_GetTimecodeRangeBounds(IWMReaderTimecode *iface, WORD stream, WORD range, - DWORD *start_timecode, DWORD *end_timecode) - { -- struct async_reader *This = impl_from_IWMReaderTimecode(iface); -+ WMReader *This = impl_from_IWMReaderTimecode(iface); - FIXME("%p, %d, %d, %p, %p\n", This, stream, range, start_timecode, end_timecode); - return E_NOTIMPL; - } -@@ -1287,54 +1286,54 @@ static const IWMReaderTimecodeVtbl WMReaderTimecodeVtbl = - }; - - --static struct async_reader *impl_from_IWMReaderPlaylistBurn(IWMReaderPlaylistBurn *iface) -+static inline WMReader *impl_from_IWMReaderPlaylistBurn(IWMReaderPlaylistBurn *iface) - { -- return CONTAINING_RECORD(iface, struct async_reader, IWMReaderPlaylistBurn_iface); -+ return CONTAINING_RECORD(iface, WMReader, IWMReaderPlaylistBurn_iface); - } - - static HRESULT WINAPI playlist_QueryInterface(IWMReaderPlaylistBurn *iface, REFIID riid, void **ppv) - { -- struct async_reader *This = impl_from_IWMReaderPlaylistBurn(iface); -+ WMReader *This = impl_from_IWMReaderPlaylistBurn(iface); - return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv); - } - - static ULONG WINAPI playlist_AddRef(IWMReaderPlaylistBurn *iface) - { -- struct async_reader *This = impl_from_IWMReaderPlaylistBurn(iface); -+ WMReader *This = impl_from_IWMReaderPlaylistBurn(iface); - return IWMReader_AddRef(&This->IWMReader_iface); - } - - static ULONG WINAPI playlist_Release(IWMReaderPlaylistBurn *iface) - { -- struct async_reader *This = impl_from_IWMReaderPlaylistBurn(iface); -+ WMReader *This = impl_from_IWMReaderPlaylistBurn(iface); - return IWMReader_Release(&This->IWMReader_iface); - } - - static HRESULT WINAPI playlist_InitPlaylistBurn(IWMReaderPlaylistBurn *iface, DWORD count, - LPCWSTR_WMSDK_TYPE_SAFE *filenames, IWMStatusCallback *callback, void *context) - { -- struct async_reader *This = impl_from_IWMReaderPlaylistBurn(iface); -+ WMReader *This = impl_from_IWMReaderPlaylistBurn(iface); - FIXME("%p, %d, %p, %p, %p\n", This, count, filenames, callback, context); - return E_NOTIMPL; - } - - static HRESULT WINAPI playlist_GetInitResults(IWMReaderPlaylistBurn *iface, DWORD count, HRESULT *stat) - { -- struct async_reader *This = impl_from_IWMReaderPlaylistBurn(iface); -+ WMReader *This = impl_from_IWMReaderPlaylistBurn(iface); - FIXME("%p, %d, %p\n", This, count, stat); - return E_NOTIMPL; - } - - static HRESULT WINAPI playlist_Cancel(IWMReaderPlaylistBurn *iface) - { -- struct async_reader *This = impl_from_IWMReaderPlaylistBurn(iface); -+ WMReader *This = impl_from_IWMReaderPlaylistBurn(iface); - FIXME("%p\n", This); - return E_NOTIMPL; - } - - static HRESULT WINAPI playlist_EndPlaylistBurn(IWMReaderPlaylistBurn *iface, HRESULT result) - { -- struct async_reader *This = impl_from_IWMReaderPlaylistBurn(iface); -+ WMReader *This = impl_from_IWMReaderPlaylistBurn(iface); - FIXME("%p, 0x%08x\n", This, result); - return E_NOTIMPL; - } -@@ -1350,32 +1349,32 @@ static const IWMReaderPlaylistBurnVtbl WMReaderPlaylistBurnVtbl = - playlist_EndPlaylistBurn - }; - --static struct async_reader *impl_from_IWMHeaderInfo3(IWMHeaderInfo3 *iface) -+static inline WMReader *impl_from_IWMHeaderInfo3(IWMHeaderInfo3 *iface) - { -- return CONTAINING_RECORD(iface, struct async_reader, IWMHeaderInfo3_iface); -+ return CONTAINING_RECORD(iface, WMReader, IWMHeaderInfo3_iface); - } - - static HRESULT WINAPI headerinfo_QueryInterface(IWMHeaderInfo3 *iface, REFIID riid, void **ppv) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv); - } - - static ULONG WINAPI headerinfo_AddRef(IWMHeaderInfo3 *iface) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - return IWMReader_AddRef(&This->IWMReader_iface); - } - - static ULONG WINAPI headerinfo_Release(IWMHeaderInfo3 *iface) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - return IWMReader_Release(&This->IWMReader_iface); - } - - static HRESULT WINAPI headerinfo_GetAttributeCount(IWMHeaderInfo3 *iface, WORD stream_num, WORD *attributes) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %d, %p\n", This, stream_num, attributes); - return E_NOTIMPL; - } -@@ -1383,7 +1382,7 @@ static HRESULT WINAPI headerinfo_GetAttributeCount(IWMHeaderInfo3 *iface, WORD s - static HRESULT WINAPI headerinfo_GetAttributeByIndex(IWMHeaderInfo3 *iface, WORD index, WORD *stream_num, - WCHAR *name, WORD *name_len, WMT_ATTR_DATATYPE *type, BYTE *value, WORD *length) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %d, %p, %p, %p, %p, %p, %p\n", This, index, stream_num, name, name_len, type, - value, length); - return E_NOTIMPL; -@@ -1392,7 +1391,7 @@ static HRESULT WINAPI headerinfo_GetAttributeByIndex(IWMHeaderInfo3 *iface, WORD - static HRESULT WINAPI headerinfo_GetAttributeByName(IWMHeaderInfo3 *iface, WORD *stream_num, LPCWSTR name, - WMT_ATTR_DATATYPE *type, BYTE *value, WORD *length) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %p, %s, %p, %p, %p\n", This, stream_num, debugstr_w(name), type, value, length); - return E_NOTIMPL; - } -@@ -1400,14 +1399,14 @@ static HRESULT WINAPI headerinfo_GetAttributeByName(IWMHeaderInfo3 *iface, WORD - static HRESULT WINAPI headerinfo_SetAttribute(IWMHeaderInfo3 *iface, WORD stream_num, LPCWSTR name, - WMT_ATTR_DATATYPE type, const BYTE *value, WORD length) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %d, %s, %d, %p, %d\n", This, stream_num, debugstr_w(name), type, value, length); - return E_NOTIMPL; - } - - static HRESULT WINAPI headerinfo_GetMarkerCount(IWMHeaderInfo3 *iface, WORD *markers) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %p\n", This, markers); - return E_NOTIMPL; - } -@@ -1415,7 +1414,7 @@ static HRESULT WINAPI headerinfo_GetMarkerCount(IWMHeaderInfo3 *iface, WORD *mar - static HRESULT WINAPI headerinfo_GetMarker(IWMHeaderInfo3 *iface, WORD index, WCHAR *marker_name, - WORD *marker_len, QWORD *marker_time) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %d, %p, %p, %p\n", This, index, marker_name, marker_len, marker_time); - return E_NOTIMPL; - } -@@ -1423,21 +1422,21 @@ static HRESULT WINAPI headerinfo_GetMarker(IWMHeaderInfo3 *iface, WORD index, WC - static HRESULT WINAPI headerinfo_AddMarker(IWMHeaderInfo3 *iface, LPCWSTR_WMSDK_TYPE_SAFE marker_name, - QWORD marker_time) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %p, %s\n", This, marker_name, wine_dbgstr_longlong(marker_time)); - return E_NOTIMPL; - } - - static HRESULT WINAPI headerinfo_RemoveMarker(IWMHeaderInfo3 *iface, WORD index) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %d\n", This, index); - return E_NOTIMPL; - } - - static HRESULT WINAPI headerinfo_GetScriptCount(IWMHeaderInfo3 *iface, WORD *scripts) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %p\n", This, scripts); - return E_NOTIMPL; - } -@@ -1445,7 +1444,7 @@ static HRESULT WINAPI headerinfo_GetScriptCount(IWMHeaderInfo3 *iface, WORD *scr - static HRESULT WINAPI headerinfo_GetScript(IWMHeaderInfo3 *iface, WORD index, WCHAR *type, - WORD *type_len, WCHAR *command, WORD *command_len, QWORD *script_time) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %d, %p, %p, %p, %p, %p\n", This, index, type, type_len, command, command_len, script_time); - return E_NOTIMPL; - } -@@ -1453,21 +1452,21 @@ static HRESULT WINAPI headerinfo_GetScript(IWMHeaderInfo3 *iface, WORD index, WC - static HRESULT WINAPI headerinfo_AddScript(IWMHeaderInfo3 *iface, LPCWSTR_WMSDK_TYPE_SAFE type, - LPCWSTR_WMSDK_TYPE_SAFE command, QWORD script_time) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %s, %s, %s\n", This, debugstr_w(type), debugstr_w(command), wine_dbgstr_longlong(script_time)); - return E_NOTIMPL; - } - - static HRESULT WINAPI headerinfo_RemoveScript(IWMHeaderInfo3 *iface, WORD index) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %d\n", This, index); - return E_NOTIMPL; - } - - static HRESULT WINAPI headerinfo_GetCodecInfoCount(IWMHeaderInfo3 *iface, DWORD *codec_infos) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %p\n", This, codec_infos); - return E_NOTIMPL; - } -@@ -1476,7 +1475,7 @@ static HRESULT WINAPI headerinfo_GetCodecInfo(IWMHeaderInfo3 *iface, DWORD index - WCHAR *name, WORD *description_len, WCHAR *description, WMT_CODEC_INFO_TYPE *codec_type, - WORD *codec_info_cnt, BYTE *codec_info) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %d, %p, %p, %p, %p, %p, %p, %p\n", This, index, name_len, name, description_len, - description, codec_type, codec_info_cnt, codec_info); - return E_NOTIMPL; -@@ -1484,7 +1483,7 @@ static HRESULT WINAPI headerinfo_GetCodecInfo(IWMHeaderInfo3 *iface, DWORD index - - static HRESULT WINAPI headerinfo_GetAttributeCountEx(IWMHeaderInfo3 *iface, WORD stream_num, WORD *attributes) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %d, %p\n", This, stream_num, attributes); - return E_NOTIMPL; - } -@@ -1492,7 +1491,7 @@ static HRESULT WINAPI headerinfo_GetAttributeCountEx(IWMHeaderInfo3 *iface, WORD - static HRESULT WINAPI headerinfo_GetAttributeIndices(IWMHeaderInfo3 *iface, WORD stream_num, LPCWSTR name, - WORD *lang_index, WORD *indices, WORD *count) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %d, %s, %p, %p, %p\n", This, stream_num, debugstr_w(name), lang_index, indices, count); - return E_NOTIMPL; - } -@@ -1501,7 +1500,7 @@ static HRESULT WINAPI headerinfo_GetAttributeByIndexEx(IWMHeaderInfo3 *iface, WO - WORD index, LPWSTR name, WORD *name_len, WMT_ATTR_DATATYPE *type, WORD *lang_index, - BYTE *value, DWORD *data_len) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %d, %d, %s, %p, %p, %p, %p, %p\n", This, stream_num, index, debugstr_w(name), name_len, - type, lang_index, value, data_len); - return E_NOTIMPL; -@@ -1510,7 +1509,7 @@ static HRESULT WINAPI headerinfo_GetAttributeByIndexEx(IWMHeaderInfo3 *iface, WO - static HRESULT WINAPI headerinfo_ModifyAttribute(IWMHeaderInfo3 *iface, WORD stream_num, - WORD index, WMT_ATTR_DATATYPE type, WORD lang_index, const BYTE *value, DWORD length) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %d, %d, %d, %d, %p, %d\n", This, stream_num, index, type, lang_index, value, length); - return E_NOTIMPL; - } -@@ -1518,7 +1517,7 @@ static HRESULT WINAPI headerinfo_ModifyAttribute(IWMHeaderInfo3 *iface, WORD str - static HRESULT WINAPI headerinfo_AddAttribute(IWMHeaderInfo3 *iface, WORD stream_num, LPCWSTR name, - WORD *index, WMT_ATTR_DATATYPE type, WORD lang_index, const BYTE *value, DWORD length) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %d, %s, %p, %d, %d, %p, %d\n", This, stream_num, debugstr_w(name), index, - type, lang_index, value, length); - return E_NOTIMPL; -@@ -1526,7 +1525,7 @@ static HRESULT WINAPI headerinfo_AddAttribute(IWMHeaderInfo3 *iface, WORD stream - - static HRESULT WINAPI headerinfo_DeleteAttribute(IWMHeaderInfo3 *iface, WORD stream_num, WORD index) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %d, %d\n", This, stream_num, index); - return E_NOTIMPL; - } -@@ -1535,7 +1534,7 @@ static HRESULT WINAPI headerinfo_AddCodecInfo(IWMHeaderInfo3 *iface, LPCWSTR_WMS - LPCWSTR_WMSDK_TYPE_SAFE description, WMT_CODEC_INFO_TYPE codec_type, WORD codec_info_cnt, - BYTE *codec_info) - { -- struct async_reader *This = impl_from_IWMHeaderInfo3(iface); -+ WMReader *This = impl_from_IWMHeaderInfo3(iface); - FIXME("%p, %p, %p, %d, %d, %p\n", This, name, description, codec_type, codec_info_cnt, - codec_info); - return E_NOTIMPL; -@@ -1570,32 +1569,32 @@ static const IWMHeaderInfo3Vtbl WMHeaderInfo3Vtbl = - }; - - --static struct async_reader *impl_from_IWMLanguageList(IWMLanguageList *iface) -+static inline WMReader *impl_from_IWMLanguageList(IWMLanguageList *iface) - { -- return CONTAINING_RECORD(iface, struct async_reader, IWMLanguageList_iface); -+ return CONTAINING_RECORD(iface, WMReader, IWMLanguageList_iface); - } - - static HRESULT WINAPI langlist_QueryInterface(IWMLanguageList *iface, REFIID riid, void **ppv) - { -- struct async_reader *This = impl_from_IWMLanguageList(iface); -+ WMReader *This = impl_from_IWMLanguageList(iface); - return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv); - } - - static ULONG WINAPI langlist_AddRef(IWMLanguageList *iface) - { -- struct async_reader *This = impl_from_IWMLanguageList(iface); -+ WMReader *This = impl_from_IWMLanguageList(iface); - return IWMReader_AddRef(&This->IWMReader_iface); - } - - static ULONG WINAPI langlist_Release(IWMLanguageList *iface) - { -- struct async_reader *This = impl_from_IWMLanguageList(iface); -+ WMReader *This = impl_from_IWMLanguageList(iface); - return IWMReader_Release(&This->IWMReader_iface); - } - - static HRESULT WINAPI langlist_GetLanguageCount(IWMLanguageList *iface, WORD *count) - { -- struct async_reader *This = impl_from_IWMLanguageList(iface); -+ WMReader *This = impl_from_IWMLanguageList(iface); - FIXME("%p, %p\n", This, count); - return E_NOTIMPL; - } -@@ -1603,7 +1602,7 @@ static HRESULT WINAPI langlist_GetLanguageCount(IWMLanguageList *iface, WORD *co - static HRESULT WINAPI langlist_GetLanguageDetails(IWMLanguageList *iface, WORD index, - WCHAR *language, WORD *length) - { -- struct async_reader *This = impl_from_IWMLanguageList(iface); -+ WMReader *This = impl_from_IWMLanguageList(iface); - FIXME("%p, %d, %p, %p\n", This, index, language, length); - return E_NOTIMPL; - } -@@ -1611,7 +1610,7 @@ static HRESULT WINAPI langlist_GetLanguageDetails(IWMLanguageList *iface, WORD i - static HRESULT WINAPI langlist_AddLanguageByRFC1766String(IWMLanguageList *iface, LPCWSTR_WMSDK_TYPE_SAFE language, - WORD *index) - { -- struct async_reader *This = impl_from_IWMLanguageList(iface); -+ WMReader *This = impl_from_IWMLanguageList(iface); - FIXME("%p, %p, %p\n", This, language, index); - return E_NOTIMPL; - } -@@ -1626,32 +1625,32 @@ static const IWMLanguageListVtbl WMLanguageListVtbl = - langlist_AddLanguageByRFC1766String - }; - --static struct async_reader *impl_from_IReferenceClock(IReferenceClock *iface) -+static inline WMReader *impl_from_IReferenceClock(IReferenceClock *iface) - { -- return CONTAINING_RECORD(iface, struct async_reader, IReferenceClock_iface); -+ return CONTAINING_RECORD(iface, WMReader, IReferenceClock_iface); - } - - static HRESULT WINAPI refclock_QueryInterface(IReferenceClock *iface, REFIID riid, void **ppv) - { -- struct async_reader *This = impl_from_IReferenceClock(iface); -+ WMReader *This = impl_from_IReferenceClock(iface); - return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv); - } - - static ULONG WINAPI refclock_AddRef(IReferenceClock *iface) - { -- struct async_reader *This = impl_from_IReferenceClock(iface); -+ WMReader *This = impl_from_IReferenceClock(iface); - return IWMReader_AddRef(&This->IWMReader_iface); - } - - static ULONG WINAPI refclock_Release(IReferenceClock *iface) - { -- struct async_reader *This = impl_from_IReferenceClock(iface); -+ WMReader *This = impl_from_IReferenceClock(iface); - return IWMReader_Release(&This->IWMReader_iface); - } - - static HRESULT WINAPI refclock_GetTime(IReferenceClock *iface, REFERENCE_TIME *time) - { -- struct async_reader *This = impl_from_IReferenceClock(iface); -+ WMReader *This = impl_from_IReferenceClock(iface); - FIXME("%p, %p\n", This, time); - return E_NOTIMPL; - } -@@ -1659,7 +1658,7 @@ static HRESULT WINAPI refclock_GetTime(IReferenceClock *iface, REFERENCE_TIME *t - static HRESULT WINAPI refclock_AdviseTime(IReferenceClock *iface, REFERENCE_TIME basetime, - REFERENCE_TIME streamtime, HEVENT event, DWORD_PTR *cookie) - { -- struct async_reader *This = impl_from_IReferenceClock(iface); -+ WMReader *This = impl_from_IReferenceClock(iface); - FIXME("%p, %s, %s, %lu, %p\n", This, wine_dbgstr_longlong(basetime), - wine_dbgstr_longlong(streamtime), event, cookie); - return E_NOTIMPL; -@@ -1668,7 +1667,7 @@ static HRESULT WINAPI refclock_AdviseTime(IReferenceClock *iface, REFERENCE_TIME - static HRESULT WINAPI refclock_AdvisePeriodic(IReferenceClock *iface, REFERENCE_TIME starttime, - REFERENCE_TIME period, HSEMAPHORE semaphore, DWORD_PTR *cookie) - { -- struct async_reader *This = impl_from_IReferenceClock(iface); -+ WMReader *This = impl_from_IReferenceClock(iface); - FIXME("%p, %s, %s, %lu, %p\n", This, wine_dbgstr_longlong(starttime), - wine_dbgstr_longlong(period), semaphore, cookie); - return E_NOTIMPL; -@@ -1676,7 +1675,7 @@ static HRESULT WINAPI refclock_AdvisePeriodic(IReferenceClock *iface, REFERENCE_ - - static HRESULT WINAPI refclock_Unadvise(IReferenceClock *iface, DWORD_PTR cookie) - { -- struct async_reader *This = impl_from_IReferenceClock(iface); -+ WMReader *This = impl_from_IReferenceClock(iface); - FIXME("%p, %lu\n", This, cookie); - return E_NOTIMPL; - } -@@ -1692,67 +1691,67 @@ static const IReferenceClockVtbl ReferenceClockVtbl = - refclock_Unadvise - }; - --static struct async_reader *impl_from_IWMProfile3(IWMProfile3 *iface) -+static inline WMReader *impl_from_IWMProfile3(IWMProfile3 *iface) - { -- return CONTAINING_RECORD(iface, struct async_reader, IWMProfile3_iface); -+ return CONTAINING_RECORD(iface, WMReader, IWMProfile3_iface); - } - - static HRESULT WINAPI profile3_QueryInterface(IWMProfile3 *iface, REFIID riid, void **ppv) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv); - } - - static ULONG WINAPI profile3_AddRef(IWMProfile3 *iface) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - return IWMReader_AddRef(&This->IWMReader_iface); - } - - static ULONG WINAPI profile3_Release(IWMProfile3 *iface) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - return IWMReader_Release(&This->IWMReader_iface); - } - - static HRESULT WINAPI profile3_GetVersion(IWMProfile3 *iface, WMT_VERSION *version) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, version); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_GetName(IWMProfile3 *iface, WCHAR *name, DWORD *length) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p, %p\n", This, name, length); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_SetName(IWMProfile3 *iface, const WCHAR *name) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %s\n", This, debugstr_w(name)); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_GetDescription(IWMProfile3 *iface, WCHAR *description, DWORD *length) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p, %p\n", This, description, length); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_SetDescription(IWMProfile3 *iface, const WCHAR *description) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %s\n", This, debugstr_w(description)); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_GetStreamCount(IWMProfile3 *iface, DWORD *count) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, count); - - if (!count) -@@ -1764,175 +1763,175 @@ static HRESULT WINAPI profile3_GetStreamCount(IWMProfile3 *iface, DWORD *count) - - static HRESULT WINAPI profile3_GetStream(IWMProfile3 *iface, DWORD index, IWMStreamConfig **config) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %d, %p\n", This, index, config); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_GetStreamByNumber(IWMProfile3 *iface, WORD stream, IWMStreamConfig **config) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %d, %p\n", This, stream, config); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_RemoveStream(IWMProfile3 *iface, IWMStreamConfig *config) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, config); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_RemoveStreamByNumber(IWMProfile3 *iface, WORD stream) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %d\n", This, stream); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_AddStream(IWMProfile3 *iface, IWMStreamConfig *config) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, config); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_ReconfigStream(IWMProfile3 *iface, IWMStreamConfig *config) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, config); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_CreateNewStream(IWMProfile3 *iface, REFGUID type, IWMStreamConfig **config) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %s, %p\n", This, debugstr_guid(type), config); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_GetMutualExclusionCount(IWMProfile3 *iface, DWORD *count) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, count); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_GetMutualExclusion(IWMProfile3 *iface, DWORD index, IWMMutualExclusion **mutual) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %d, %p\n", This, index, mutual); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_RemoveMutualExclusion(IWMProfile3 *iface, IWMMutualExclusion *mutual) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, mutual); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_AddMutualExclusion(IWMProfile3 *iface, IWMMutualExclusion *mutual) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, mutual); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_CreateNewMutualExclusion(IWMProfile3 *iface, IWMMutualExclusion **mutual) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, mutual); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_GetProfileID(IWMProfile3 *iface, GUID *guid) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, guid); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_GetStorageFormat(IWMProfile3 *iface, WMT_STORAGE_FORMAT *storage) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, storage); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_SetStorageFormat(IWMProfile3 *iface, WMT_STORAGE_FORMAT storage) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %d\n", This, storage); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_GetBandwidthSharingCount(IWMProfile3 *iface, DWORD *count) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, count); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_GetBandwidthSharing(IWMProfile3 *iface, DWORD index, IWMBandwidthSharing **bandwidth) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %d, %p\n", This, index, bandwidth); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_RemoveBandwidthSharing( IWMProfile3 *iface, IWMBandwidthSharing *bandwidth) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, bandwidth); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_AddBandwidthSharing(IWMProfile3 *iface, IWMBandwidthSharing *bandwidth) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, bandwidth); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_CreateNewBandwidthSharing( IWMProfile3 *iface, IWMBandwidthSharing **bandwidth) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, bandwidth); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_GetStreamPrioritization(IWMProfile3 *iface, IWMStreamPrioritization **stream) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, stream); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_SetStreamPrioritization(IWMProfile3 *iface, IWMStreamPrioritization *stream) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, stream); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_RemoveStreamPrioritization(IWMProfile3 *iface) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p\n", This); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_CreateNewStreamPrioritization(IWMProfile3 *iface, IWMStreamPrioritization **stream) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, stream); - return E_NOTIMPL; - } - - static HRESULT WINAPI profile3_GetExpectedPacketCount(IWMProfile3 *iface, QWORD duration, QWORD *packets) - { -- struct async_reader *This = impl_from_IWMProfile3(iface); -+ WMReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %s, %p\n", This, wine_dbgstr_longlong(duration), packets); - return E_NOTIMPL; - } -@@ -1975,53 +1974,53 @@ static const IWMProfile3Vtbl WMProfile3Vtbl = - profile3_GetExpectedPacketCount - }; - --static struct async_reader *impl_from_IWMPacketSize2(IWMPacketSize2 *iface) -+static inline WMReader *impl_from_IWMPacketSize2(IWMPacketSize2 *iface) - { -- return CONTAINING_RECORD(iface, struct async_reader, IWMPacketSize2_iface); -+ return CONTAINING_RECORD(iface, WMReader, IWMPacketSize2_iface); - } - - static HRESULT WINAPI packetsize_QueryInterface(IWMPacketSize2 *iface, REFIID riid, void **ppv) - { -- struct async_reader *This = impl_from_IWMPacketSize2(iface); -+ WMReader *This = impl_from_IWMPacketSize2(iface); - return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv); - } - - static ULONG WINAPI packetsize_AddRef(IWMPacketSize2 *iface) - { -- struct async_reader *This = impl_from_IWMPacketSize2(iface); -+ WMReader *This = impl_from_IWMPacketSize2(iface); - return IWMReader_AddRef(&This->IWMReader_iface); - } - - static ULONG WINAPI packetsize_Release(IWMPacketSize2 *iface) - { -- struct async_reader *This = impl_from_IWMPacketSize2(iface); -+ WMReader *This = impl_from_IWMPacketSize2(iface); - return IWMReader_Release(&This->IWMReader_iface); - } - - static HRESULT WINAPI packetsize_GetMaxPacketSize(IWMPacketSize2 *iface, DWORD *size) - { -- struct async_reader *This = impl_from_IWMPacketSize2(iface); -+ WMReader *This = impl_from_IWMPacketSize2(iface); - FIXME("%p, %p\n", This, size); - return E_NOTIMPL; - } - - static HRESULT WINAPI packetsize_SetMaxPacketSize(IWMPacketSize2 *iface, DWORD size) - { -- struct async_reader *This = impl_from_IWMPacketSize2(iface); -+ WMReader *This = impl_from_IWMPacketSize2(iface); - FIXME("%p, %d\n", This, size); - return E_NOTIMPL; - } - - static HRESULT WINAPI packetsize_GetMinPacketSize(IWMPacketSize2 *iface, DWORD *size) - { -- struct async_reader *This = impl_from_IWMPacketSize2(iface); -+ WMReader *This = impl_from_IWMPacketSize2(iface); - FIXME("%p, %p\n", This, size); - return E_NOTIMPL; - } - - static HRESULT WINAPI packetsize_SetMinPacketSize(IWMPacketSize2 *iface, DWORD size) - { -- struct async_reader *This = impl_from_IWMPacketSize2(iface); -+ WMReader *This = impl_from_IWMPacketSize2(iface); - FIXME("%p, %d\n", This, size); - return E_NOTIMPL; - } -@@ -2039,7 +2038,7 @@ static const IWMPacketSize2Vtbl WMPacketSize2Vtbl = - - HRESULT WINAPI winegstreamer_create_wm_async_reader(IWMReader **reader) - { -- struct async_reader *object; -+ WMReader *object; - - TRACE("reader %p.\n", reader); - --- -2.33.0 - diff --git a/patches/mfplat-reverts/0002-Revert-wmvcore-Move-the-async-reader-implementation-.patch b/patches/mfplat-reverts/0002-Revert-wmvcore-Move-the-async-reader-implementation-.patch deleted file mode 100644 index 9d4726e0..00000000 --- a/patches/mfplat-reverts/0002-Revert-wmvcore-Move-the-async-reader-implementation-.patch +++ /dev/null @@ -1,168 +0,0 @@ -From 2c3d9dfc09ee64767347574e0bd6e8f5511a6a54 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sat, 9 Oct 2021 13:47:39 +1100 -Subject: [PATCH 02/22] Revert "wmvcore: Move the async reader implementation - to winegstreamer." - -This reverts commit bf7c05d87a65b7b9999d71fc0df602e3dfa2fafa. ---- - dlls/winegstreamer/Makefile.in | 1 - - dlls/winegstreamer/winegstreamer.spec | 1 - - dlls/wmvcore/Makefile.in | 1 + - .../wm_asyncreader.c => wmvcore/reader.c} | 54 +++++++++++-------- - dlls/wmvcore/wmvcore_main.c | 15 ------ - 5 files changed, 32 insertions(+), 40 deletions(-) - rename dlls/{winegstreamer/wm_asyncreader.c => wmvcore/reader.c} (98%) - -diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in -index 17311cd663c..671e3bcb7ba 100644 ---- a/dlls/winegstreamer/Makefile.in -+++ b/dlls/winegstreamer/Makefile.in -@@ -13,7 +13,6 @@ C_SRCS = \ - mfplat.c \ - quartz_parser.c \ - wg_parser.c \ -- wm_asyncreader.c \ - wm_syncreader.c - - IDL_SRCS = \ -diff --git a/dlls/winegstreamer/winegstreamer.spec b/dlls/winegstreamer/winegstreamer.spec -index bc6a390f8b1..bd9f53a7445 100644 ---- a/dlls/winegstreamer/winegstreamer.spec -+++ b/dlls/winegstreamer/winegstreamer.spec -@@ -2,5 +2,4 @@ - @ stdcall -private DllGetClassObject(ptr ptr ptr) - @ stdcall -private DllRegisterServer() - @ stdcall -private DllUnregisterServer() --@ stdcall winegstreamer_create_wm_async_reader(ptr) - @ stdcall winegstreamer_create_wm_sync_reader(ptr) -diff --git a/dlls/wmvcore/Makefile.in b/dlls/wmvcore/Makefile.in -index 6aed828abae..d0b230dd7c0 100644 ---- a/dlls/wmvcore/Makefile.in -+++ b/dlls/wmvcore/Makefile.in -@@ -6,6 +6,7 @@ DELAYIMPORTS = winegstreamer - EXTRADLLFLAGS = -Wb,--prefer-native - - C_SRCS = \ -+ reader.c \ - wmvcore_main.c \ - writer.c - -diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/wmvcore/reader.c -similarity index 98% -rename from dlls/winegstreamer/wm_asyncreader.c -rename to dlls/wmvcore/reader.c -index d3fd1624f24..12ba8099ab1 100644 ---- a/dlls/winegstreamer/wm_asyncreader.c -+++ b/dlls/wmvcore/reader.c -@@ -16,8 +16,11 @@ - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - --#include "gst_private.h" -+#include "wmvcore.h" -+ - #include "wmsdk.h" -+#include "wine/debug.h" -+#include "wine/heap.h" - - WINE_DEFAULT_DEBUG_CHANNEL(wmvcore); - -@@ -150,7 +153,7 @@ static ULONG WINAPI WMReader_Release(IWMReader *iface) - TRACE("(%p) ref=%d\n", This, ref); - - if(!ref) -- free(This); -+ heap_free(This); - - return ref; - } -@@ -2036,31 +2039,36 @@ static const IWMPacketSize2Vtbl WMPacketSize2Vtbl = - packetsize_SetMinPacketSize - }; - --HRESULT WINAPI winegstreamer_create_wm_async_reader(IWMReader **reader) -+HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **ret_reader) - { -- WMReader *object; -+ WMReader *reader; - -- TRACE("reader %p.\n", reader); -+ TRACE("(%p, %x, %p)\n", reserved, rights, ret_reader); - -- if (!(object = calloc(1, sizeof(*object)))) -+ reader = heap_alloc(sizeof(*reader)); -+ if(!reader) - return E_OUTOFMEMORY; - -- object->IReferenceClock_iface.lpVtbl = &ReferenceClockVtbl; -- object->IWMHeaderInfo3_iface.lpVtbl = &WMHeaderInfo3Vtbl; -- object->IWMLanguageList_iface.lpVtbl = &WMLanguageListVtbl; -- object->IWMPacketSize2_iface.lpVtbl = &WMPacketSize2Vtbl; -- object->IWMProfile3_iface.lpVtbl = &WMProfile3Vtbl; -- object->IWMReader_iface.lpVtbl = &WMReaderVtbl; -- object->IWMReaderAdvanced6_iface.lpVtbl = &WMReaderAdvanced6Vtbl; -- object->IWMReaderAccelerator_iface.lpVtbl = &WMReaderAcceleratorVtbl; -- object->IWMReaderNetworkConfig2_iface.lpVtbl = &WMReaderNetworkConfig2Vtbl; -- object->IWMReaderPlaylistBurn_iface.lpVtbl = &WMReaderPlaylistBurnVtbl; -- object->IWMReaderStreamClock_iface.lpVtbl = &WMReaderStreamClockVtbl; -- object->IWMReaderTimecode_iface.lpVtbl = &WMReaderTimecodeVtbl; -- object->IWMReaderTypeNegotiation_iface.lpVtbl = &WMReaderTypeNegotiationVtbl; -- object->ref = 1; -- -- TRACE("Created async reader %p.\n", object); -- *reader = (IWMReader *)&object->IWMReader_iface; -+ reader->IWMReader_iface.lpVtbl = &WMReaderVtbl; -+ reader->IWMReaderAdvanced6_iface.lpVtbl = &WMReaderAdvanced6Vtbl; -+ reader->IWMReaderAccelerator_iface.lpVtbl = &WMReaderAcceleratorVtbl; -+ reader->IWMReaderNetworkConfig2_iface.lpVtbl = &WMReaderNetworkConfig2Vtbl; -+ reader->IWMReaderStreamClock_iface.lpVtbl = &WMReaderStreamClockVtbl; -+ reader->IWMReaderTypeNegotiation_iface.lpVtbl = &WMReaderTypeNegotiationVtbl; -+ reader->IWMReaderTimecode_iface.lpVtbl = &WMReaderTimecodeVtbl; -+ reader->IWMReaderPlaylistBurn_iface.lpVtbl = &WMReaderPlaylistBurnVtbl; -+ reader->IWMHeaderInfo3_iface.lpVtbl = &WMHeaderInfo3Vtbl; -+ reader->IWMLanguageList_iface.lpVtbl = &WMLanguageListVtbl; -+ reader->IReferenceClock_iface.lpVtbl = &ReferenceClockVtbl; -+ reader->IWMProfile3_iface.lpVtbl = &WMProfile3Vtbl; -+ reader->IWMPacketSize2_iface.lpVtbl = &WMPacketSize2Vtbl; -+ reader->ref = 1; -+ -+ *ret_reader = &reader->IWMReader_iface; - return S_OK; - } -+ -+HRESULT WINAPI WMCreateReaderPriv(IWMReader **ret_reader) -+{ -+ return WMCreateReader(NULL, 0, ret_reader); -+} -diff --git a/dlls/wmvcore/wmvcore_main.c b/dlls/wmvcore/wmvcore_main.c -index ff837921286..8d4d4251369 100644 ---- a/dlls/wmvcore/wmvcore_main.c -+++ b/dlls/wmvcore/wmvcore_main.c -@@ -25,23 +25,8 @@ - - WINE_DEFAULT_DEBUG_CHANNEL(wmvcore); - --HRESULT WINAPI winegstreamer_create_wm_async_reader(IWMReader **reader); - HRESULT WINAPI winegstreamer_create_wm_sync_reader(IWMSyncReader **reader); - --HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **reader) --{ -- TRACE("reserved %p, rights %#x, reader %p.\n", reserved, rights, reader); -- -- return winegstreamer_create_wm_async_reader(reader); --} -- --HRESULT WINAPI WMCreateReaderPriv(IWMReader **reader) --{ -- TRACE("reader %p.\n", reader); -- -- return winegstreamer_create_wm_async_reader(reader); --} -- - HRESULT WINAPI WMCreateSyncReader(IUnknown *reserved, DWORD rights, IWMSyncReader **reader) - { - TRACE("reserved %p, rights %#x, reader %p.\n", reserved, rights, reader); --- -2.33.0 - diff --git a/patches/mfplat-reverts/0003-Revert-winegstreamer-Get-rid-of-the-WMSyncReader-typ.patch b/patches/mfplat-reverts/0003-Revert-winegstreamer-Get-rid-of-the-WMSyncReader-typ.patch deleted file mode 100644 index ae374c71..00000000 --- a/patches/mfplat-reverts/0003-Revert-winegstreamer-Get-rid-of-the-WMSyncReader-typ.patch +++ /dev/null @@ -1,579 +0,0 @@ -From 92f0e4d02787c066c9b58a661981723f26c8e123 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sat, 9 Oct 2021 13:47:41 +1100 -Subject: [PATCH 03/22] Revert "winegstreamer: Get rid of the WMSyncReader - typedef." - -This reverts commit ba3fa4254b3c336b171c9d47de677c2d9b277cdc. ---- - dlls/winegstreamer/wm_syncreader.c | 143 ++++++++++++++--------------- - 1 file changed, 71 insertions(+), 72 deletions(-) - -diff --git a/dlls/winegstreamer/wm_syncreader.c b/dlls/winegstreamer/wm_syncreader.c -index 1d65820aa02..75b8e021148 100644 ---- a/dlls/winegstreamer/wm_syncreader.c -+++ b/dlls/winegstreamer/wm_syncreader.c -@@ -22,21 +22,20 @@ - - WINE_DEFAULT_DEBUG_CHANNEL(wmvcore); - --struct sync_reader --{ -+typedef struct { - IWMProfile3 IWMProfile3_iface; - IWMSyncReader2 IWMSyncReader2_iface; - LONG ref; --}; -+} WMSyncReader; - --static struct sync_reader *impl_from_IWMSyncReader2(IWMSyncReader2 *iface) -+static inline WMSyncReader *impl_from_IWMSyncReader2(IWMSyncReader2 *iface) - { -- return CONTAINING_RECORD(iface, struct sync_reader, IWMSyncReader2_iface); -+ return CONTAINING_RECORD(iface, WMSyncReader, IWMSyncReader2_iface); - } - - static HRESULT WINAPI WMSyncReader_QueryInterface(IWMSyncReader2 *iface, REFIID riid, void **ppv) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - - if(IsEqualGUID(riid, &IID_IUnknown)) { - TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); -@@ -68,7 +67,7 @@ static HRESULT WINAPI WMSyncReader_QueryInterface(IWMSyncReader2 *iface, REFIID - - static ULONG WINAPI WMSyncReader_AddRef(IWMSyncReader2 *iface) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - LONG ref = InterlockedIncrement(&This->ref); - - TRACE("(%p) ref=%d\n", This, ref); -@@ -78,7 +77,7 @@ static ULONG WINAPI WMSyncReader_AddRef(IWMSyncReader2 *iface) - - static ULONG WINAPI WMSyncReader_Release(IWMSyncReader2 *iface) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - LONG ref = InterlockedDecrement(&This->ref); - - TRACE("(%p) ref=%d\n", This, ref); -@@ -91,21 +90,21 @@ static ULONG WINAPI WMSyncReader_Release(IWMSyncReader2 *iface) - - static HRESULT WINAPI WMSyncReader_Close(IWMSyncReader2 *iface) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p): stub!\n", This); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMSyncReader_GetMaxOutputSampleSize(IWMSyncReader2 *iface, DWORD output, DWORD *max) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%d %p): stub!\n", This, output, max); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMSyncReader_GetMaxStreamSampleSize(IWMSyncReader2 *iface, WORD stream, DWORD *max) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%d %p): stub!\n", This, stream, max); - return E_NOTIMPL; - } -@@ -113,7 +112,7 @@ static HRESULT WINAPI WMSyncReader_GetMaxStreamSampleSize(IWMSyncReader2 *iface, - static HRESULT WINAPI WMSyncReader_GetNextSample(IWMSyncReader2 *iface, WORD stream, INSSBuffer **sample, - QWORD *sample_time, QWORD *sample_duration, DWORD *flags, DWORD *output_num, WORD *stream_num) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%d %p %p %p %p %p %p): stub!\n", This, stream, sample, sample_time, - sample_duration, flags, output_num, stream_num); - return E_NOTIMPL; -@@ -121,7 +120,7 @@ static HRESULT WINAPI WMSyncReader_GetNextSample(IWMSyncReader2 *iface, WORD str - - static HRESULT WINAPI WMSyncReader_GetOutputCount(IWMSyncReader2 *iface, DWORD *outputs) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%p): stub!\n", This, outputs); - return E_NOTIMPL; - } -@@ -129,28 +128,28 @@ static HRESULT WINAPI WMSyncReader_GetOutputCount(IWMSyncReader2 *iface, DWORD * - static HRESULT WINAPI WMSyncReader_GetOutputFormat(IWMSyncReader2 *iface, DWORD output_num, DWORD format_num, - IWMOutputMediaProps **props) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%u %u %p): stub!\n", This, output_num, format_num, props); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMSyncReader_GetOutputFormatCount(IWMSyncReader2 *iface, DWORD output_num, DWORD *formats) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%u %p): stub!\n", This, output_num, formats); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMSyncReader_GetOutputNumberForStream(IWMSyncReader2 *iface, WORD stream_num, DWORD *output_num) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%u %p): stub!\n", This, stream_num, output_num); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMSyncReader_GetOutputProps(IWMSyncReader2 *iface, DWORD output_num, IWMOutputMediaProps **output) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%u %p): stub!\n", This, output_num, output); - return E_NOTIMPL; - } -@@ -158,49 +157,49 @@ static HRESULT WINAPI WMSyncReader_GetOutputProps(IWMSyncReader2 *iface, DWORD o - static HRESULT WINAPI WMSyncReader_GetOutputSetting(IWMSyncReader2 *iface, DWORD output_num, const WCHAR *name, - WMT_ATTR_DATATYPE *type, BYTE *value, WORD *length) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%u %s %p %p %p): stub!\n", This, output_num, debugstr_w(name), type, value, length); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMSyncReader_GetReadStreamSamples(IWMSyncReader2 *iface, WORD stream_num, BOOL *compressed) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%d %p): stub!\n", This, stream_num, compressed); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMSyncReader_GetStreamNumberForOutput(IWMSyncReader2 *iface, DWORD output, WORD *stream_num) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%u %p): stub!\n", This, output, stream_num); - return S_OK; - } - - static HRESULT WINAPI WMSyncReader_GetStreamSelected(IWMSyncReader2 *iface, WORD stream_num, WMT_STREAM_SELECTION *selection) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%d %p): stub!\n", This, stream_num, selection); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMSyncReader_Open(IWMSyncReader2 *iface, const WCHAR *filename) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%s): stub!\n", This, debugstr_w(filename)); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMSyncReader_OpenStream(IWMSyncReader2 *iface, IStream *stream) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%p): stub!\n", This, stream); - return S_OK; - } - - static HRESULT WINAPI WMSyncReader_SetOutputProps(IWMSyncReader2 *iface, DWORD output_num, IWMOutputMediaProps *output) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%u %p): stub!\n", This, output_num, output); - return E_NOTIMPL; - } -@@ -208,14 +207,14 @@ static HRESULT WINAPI WMSyncReader_SetOutputProps(IWMSyncReader2 *iface, DWORD o - static HRESULT WINAPI WMSyncReader_SetOutputSetting(IWMSyncReader2 *iface, DWORD output_num, const WCHAR *name, - WMT_ATTR_DATATYPE type, const BYTE *value, WORD length) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%d %s %d %p %d): stub!\n", This, output_num, debugstr_w(name), type, value, length); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMSyncReader_SetRange(IWMSyncReader2 *iface, QWORD start, LONGLONG duration) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%s %s): stub!\n", This, wine_dbgstr_longlong(start), wine_dbgstr_longlong(duration)); - return E_NOTIMPL; - } -@@ -223,14 +222,14 @@ static HRESULT WINAPI WMSyncReader_SetRange(IWMSyncReader2 *iface, QWORD start, - static HRESULT WINAPI WMSyncReader_SetRangeByFrame(IWMSyncReader2 *iface, WORD stream_num, QWORD frame_num, - LONGLONG frames) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%d %s %s): stub!\n", This, stream_num, wine_dbgstr_longlong(frame_num), wine_dbgstr_longlong(frames)); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMSyncReader_SetReadStreamSamples(IWMSyncReader2 *iface, WORD stream_num, BOOL compressed) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%u %x): stub!\n", This, stream_num, compressed); - return E_NOTIMPL; - } -@@ -238,7 +237,7 @@ static HRESULT WINAPI WMSyncReader_SetReadStreamSamples(IWMSyncReader2 *iface, W - static HRESULT WINAPI WMSyncReader_SetStreamsSelected(IWMSyncReader2 *iface, WORD stream_count, - WORD *stream_numbers, WMT_STREAM_SELECTION *selections) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%d %p %p): stub!\n", This, stream_count, stream_numbers, selections); - return S_OK; - } -@@ -246,7 +245,7 @@ static HRESULT WINAPI WMSyncReader_SetStreamsSelected(IWMSyncReader2 *iface, WOR - static HRESULT WINAPI WMSyncReader2_SetRangeByTimecode(IWMSyncReader2 *iface, WORD stream_num, - WMT_TIMECODE_EXTENSION_DATA *start, WMT_TIMECODE_EXTENSION_DATA *end) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%u %p %p): stub!\n", This, stream_num, start, end); - return E_NOTIMPL; - } -@@ -254,7 +253,7 @@ static HRESULT WINAPI WMSyncReader2_SetRangeByTimecode(IWMSyncReader2 *iface, WO - static HRESULT WINAPI WMSyncReader2_SetRangeByFrameEx(IWMSyncReader2 *iface, WORD stream_num, QWORD frame_num, - LONGLONG frames_to_read, QWORD *starttime) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%u %s %s %p): stub!\n", This, stream_num, wine_dbgstr_longlong(frame_num), - wine_dbgstr_longlong(frames_to_read), starttime); - return E_NOTIMPL; -@@ -262,28 +261,28 @@ static HRESULT WINAPI WMSyncReader2_SetRangeByFrameEx(IWMSyncReader2 *iface, WOR - - static HRESULT WINAPI WMSyncReader2_SetAllocateForOutput(IWMSyncReader2 *iface, DWORD output_num, IWMReaderAllocatorEx *allocator) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%d %p): stub!\n", This, output_num, allocator); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMSyncReader2_GetAllocateForOutput(IWMSyncReader2 *iface, DWORD output_num, IWMReaderAllocatorEx **allocator) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%d %p): stub!\n", This, output_num, allocator); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMSyncReader2_SetAllocateForStream(IWMSyncReader2 *iface, DWORD stream_num, IWMReaderAllocatorEx *allocator) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%d %p): stub!\n", This, stream_num, allocator); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMSyncReader2_GetAllocateForStream(IWMSyncReader2 *iface, DWORD stream_num, IWMReaderAllocatorEx **allocator) - { -- struct sync_reader *This = impl_from_IWMSyncReader2(iface); -+ WMSyncReader *This = impl_from_IWMSyncReader2(iface); - FIXME("(%p)->(%d %p): stub!\n", This, stream_num, allocator); - return E_NOTIMPL; - } -@@ -321,67 +320,67 @@ static const IWMSyncReader2Vtbl WMSyncReader2Vtbl = { - WMSyncReader2_GetAllocateForStream - }; - --static struct sync_reader *impl_from_IWMProfile3(IWMProfile3 *iface) -+static inline WMSyncReader *impl_from_IWMProfile3(IWMProfile3 *iface) - { -- return CONTAINING_RECORD(iface, struct sync_reader, IWMProfile3_iface); -+ return CONTAINING_RECORD(iface, WMSyncReader, IWMProfile3_iface); - } - - static HRESULT WINAPI WMProfile_QueryInterface(IWMProfile3 *iface, REFIID riid, void **ppv) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - return IWMSyncReader2_QueryInterface(&This->IWMSyncReader2_iface, riid, ppv); - } - - static ULONG WINAPI WMProfile_AddRef(IWMProfile3 *iface) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - return IWMSyncReader2_AddRef(&This->IWMSyncReader2_iface); - } - - static ULONG WINAPI WMProfile_Release(IWMProfile3 *iface) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - return IWMSyncReader2_Release(&This->IWMSyncReader2_iface); - } - - static HRESULT WINAPI WMProfile_GetVersion(IWMProfile3 *iface, WMT_VERSION *version) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, version); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile_GetName(IWMProfile3 *iface, WCHAR *name, DWORD *length) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p, %p\n", This, name, length); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile_SetName(IWMProfile3 *iface, const WCHAR *name) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %s\n", This, debugstr_w(name)); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile_GetDescription(IWMProfile3 *iface, WCHAR *description, DWORD *length) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p, %p\n", This, description, length); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile_SetDescription(IWMProfile3 *iface, const WCHAR *description) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %s\n", This, debugstr_w(description)); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile_GetStreamCount(IWMProfile3 *iface, DWORD *count) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, count); - - if (!count) -@@ -393,175 +392,175 @@ static HRESULT WINAPI WMProfile_GetStreamCount(IWMProfile3 *iface, DWORD *count) - - static HRESULT WINAPI WMProfile_GetStream(IWMProfile3 *iface, DWORD index, IWMStreamConfig **config) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %d, %p\n", This, index, config); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile_GetStreamByNumber(IWMProfile3 *iface, WORD stream, IWMStreamConfig **config) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %d, %p\n", This, stream, config); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile_RemoveStream(IWMProfile3 *iface, IWMStreamConfig *config) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, config); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile_RemoveStreamByNumber(IWMProfile3 *iface, WORD stream) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %d\n", This, stream); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile_AddStream(IWMProfile3 *iface, IWMStreamConfig *config) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, config); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile_ReconfigStream(IWMProfile3 *iface, IWMStreamConfig *config) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, config); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile_CreateNewStream(IWMProfile3 *iface, REFGUID type, IWMStreamConfig **config) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %s, %p\n", This, debugstr_guid(type), config); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile_GetMutualExclusionCount(IWMProfile3 *iface, DWORD *count) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, count); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile_GetMutualExclusion(IWMProfile3 *iface, DWORD index, IWMMutualExclusion **mutual) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %d, %p\n", This, index, mutual); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile_RemoveMutualExclusion(IWMProfile3 *iface, IWMMutualExclusion *mutual) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, mutual); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile_AddMutualExclusion(IWMProfile3 *iface, IWMMutualExclusion *mutual) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, mutual); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile_CreateNewMutualExclusion(IWMProfile3 *iface, IWMMutualExclusion **mutual) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, mutual); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile2_GetProfileID(IWMProfile3 *iface, GUID *guid) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, guid); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile3_GetStorageFormat(IWMProfile3 *iface, WMT_STORAGE_FORMAT *storage) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, storage); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile3_SetStorageFormat(IWMProfile3 *iface, WMT_STORAGE_FORMAT storage) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %d\n", This, storage); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile3_GetBandwidthSharingCount(IWMProfile3 *iface, DWORD *count) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, count); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile3_GetBandwidthSharing(IWMProfile3 *iface, DWORD index, IWMBandwidthSharing **bandwidth) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %d, %p\n", This, index, bandwidth); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile3_RemoveBandwidthSharing( IWMProfile3 *iface, IWMBandwidthSharing *bandwidth) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, bandwidth); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile3_AddBandwidthSharing(IWMProfile3 *iface, IWMBandwidthSharing *bandwidth) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, bandwidth); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile3_CreateNewBandwidthSharing( IWMProfile3 *iface, IWMBandwidthSharing **bandwidth) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, bandwidth); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile3_GetStreamPrioritization(IWMProfile3 *iface, IWMStreamPrioritization **stream) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, stream); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile3_SetStreamPrioritization(IWMProfile3 *iface, IWMStreamPrioritization *stream) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, stream); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile3_RemoveStreamPrioritization(IWMProfile3 *iface) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p\n", This); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile3_CreateNewStreamPrioritization(IWMProfile3 *iface, IWMStreamPrioritization **stream) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %p\n", This, stream); - return E_NOTIMPL; - } - - static HRESULT WINAPI WMProfile3_GetExpectedPacketCount(IWMProfile3 *iface, QWORD duration, QWORD *packets) - { -- struct sync_reader *This = impl_from_IWMProfile3(iface); -+ WMSyncReader *This = impl_from_IWMProfile3(iface); - FIXME("%p, %s, %p\n", This, wine_dbgstr_longlong(duration), packets); - return E_NOTIMPL; - } -@@ -606,7 +605,7 @@ static const IWMProfile3Vtbl WMProfile3Vtbl = - - HRESULT WINAPI winegstreamer_create_wm_sync_reader(IWMSyncReader **reader) - { -- struct sync_reader *object; -+ WMSyncReader *object; - - TRACE("reader %p.\n", reader); - --- -2.33.0 - diff --git a/patches/mfplat-reverts/0004-Revert-wmvcore-Move-the-sync-reader-implementation-t.patch b/patches/mfplat-reverts/0004-Revert-wmvcore-Move-the-sync-reader-implementation-t.patch deleted file mode 100644 index fc071f17..00000000 --- a/patches/mfplat-reverts/0004-Revert-wmvcore-Move-the-sync-reader-implementation-t.patch +++ /dev/null @@ -1,161 +0,0 @@ -From 59b60c9a19de54bc0f6541395ffcf49d96437b8c Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sat, 9 Oct 2021 13:47:42 +1100 -Subject: [PATCH 04/22] Revert "wmvcore: Move the sync reader implementation to - winegstreamer." - -This reverts commit e4767ea6126fce8b419ef10a3cfce8bf43206d6f. ---- - dlls/winegstreamer/Makefile.in | 4 +-- - dlls/winegstreamer/winegstreamer.spec | 1 - - dlls/wmvcore/Makefile.in | 2 +- - .../wm_syncreader.c => wmvcore/syncreader.c} | 33 ++++++++++++------- - dlls/wmvcore/wmvcore_main.c | 16 --------- - 5 files changed, 23 insertions(+), 33 deletions(-) - rename dlls/{winegstreamer/wm_syncreader.c => wmvcore/syncreader.c} (96%) - -diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in -index 671e3bcb7ba..e35df3cf3f9 100644 ---- a/dlls/winegstreamer/Makefile.in -+++ b/dlls/winegstreamer/Makefile.in -@@ -1,6 +1,5 @@ - MODULE = winegstreamer.dll - UNIXLIB = winegstreamer.so --IMPORTLIB = winegstreamer - IMPORTS = strmbase strmiids uuid ole32 mfuuid - DELAYIMPORTS = mfplat - EXTRAINCL = $(GSTREAMER_CFLAGS) -@@ -12,8 +11,7 @@ C_SRCS = \ - media_source.c \ - mfplat.c \ - quartz_parser.c \ -- wg_parser.c \ -- wm_syncreader.c -+ wg_parser.c - - IDL_SRCS = \ - winegstreamer_classes.idl -diff --git a/dlls/winegstreamer/winegstreamer.spec b/dlls/winegstreamer/winegstreamer.spec -index bd9f53a7445..b16365d0c9f 100644 ---- a/dlls/winegstreamer/winegstreamer.spec -+++ b/dlls/winegstreamer/winegstreamer.spec -@@ -2,4 +2,3 @@ - @ stdcall -private DllGetClassObject(ptr ptr ptr) - @ stdcall -private DllRegisterServer() - @ stdcall -private DllUnregisterServer() --@ stdcall winegstreamer_create_wm_sync_reader(ptr) -diff --git a/dlls/wmvcore/Makefile.in b/dlls/wmvcore/Makefile.in -index d0b230dd7c0..15c017f86d9 100644 ---- a/dlls/wmvcore/Makefile.in -+++ b/dlls/wmvcore/Makefile.in -@@ -1,12 +1,12 @@ - MODULE = wmvcore.dll - IMPORTLIB = wmvcore - IMPORTS = kernel32 --DELAYIMPORTS = winegstreamer - - EXTRADLLFLAGS = -Wb,--prefer-native - - C_SRCS = \ - reader.c \ -+ syncreader.c \ - wmvcore_main.c \ - writer.c - -diff --git a/dlls/winegstreamer/wm_syncreader.c b/dlls/wmvcore/syncreader.c -similarity index 96% -rename from dlls/winegstreamer/wm_syncreader.c -rename to dlls/wmvcore/syncreader.c -index 75b8e021148..b245ff20d31 100644 ---- a/dlls/winegstreamer/wm_syncreader.c -+++ b/dlls/wmvcore/syncreader.c -@@ -16,9 +16,11 @@ - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - --#include "gst_private.h" --#include "initguid.h" -+#include "wmvcore.h" -+ - #include "wmsdk.h" -+#include "wine/debug.h" -+#include "wine/heap.h" - - WINE_DEFAULT_DEBUG_CHANNEL(wmvcore); - -@@ -83,7 +85,7 @@ static ULONG WINAPI WMSyncReader_Release(IWMSyncReader2 *iface) - TRACE("(%p) ref=%d\n", This, ref); - - if(!ref) -- free(This); -+ heap_free(This); - - return ref; - } -@@ -603,20 +605,27 @@ static const IWMProfile3Vtbl WMProfile3Vtbl = - WMProfile3_GetExpectedPacketCount - }; - --HRESULT WINAPI winegstreamer_create_wm_sync_reader(IWMSyncReader **reader) -+HRESULT WINAPI WMCreateSyncReader(IUnknown *pcert, DWORD rights, IWMSyncReader **syncreader) - { -- WMSyncReader *object; -+ WMSyncReader *sync; -+ -+ TRACE("(%p, %x, %p)\n", pcert, rights, syncreader); - -- TRACE("reader %p.\n", reader); -+ sync = heap_alloc(sizeof(*sync)); - -- if (!(object = calloc(1, sizeof(*object)))) -+ if (!sync) - return E_OUTOFMEMORY; - -- object->IWMProfile3_iface.lpVtbl = &WMProfile3Vtbl; -- object->IWMSyncReader2_iface.lpVtbl = &WMSyncReader2Vtbl; -- object->ref = 1; -+ sync->IWMProfile3_iface.lpVtbl = &WMProfile3Vtbl; -+ sync->IWMSyncReader2_iface.lpVtbl = &WMSyncReader2Vtbl; -+ sync->ref = 1; -+ -+ *syncreader = (IWMSyncReader *)&sync->IWMSyncReader2_iface; - -- TRACE("Created sync reader %p.\n", object); -- *reader = (IWMSyncReader *)&object->IWMSyncReader2_iface; - return S_OK; - } -+ -+HRESULT WINAPI WMCreateSyncReaderPriv(IWMSyncReader **syncreader) -+{ -+ return WMCreateSyncReader(NULL, 0, syncreader); -+} -diff --git a/dlls/wmvcore/wmvcore_main.c b/dlls/wmvcore/wmvcore_main.c -index 8d4d4251369..5f93fc68e3b 100644 ---- a/dlls/wmvcore/wmvcore_main.c -+++ b/dlls/wmvcore/wmvcore_main.c -@@ -25,22 +25,6 @@ - - WINE_DEFAULT_DEBUG_CHANNEL(wmvcore); - --HRESULT WINAPI winegstreamer_create_wm_sync_reader(IWMSyncReader **reader); -- --HRESULT WINAPI WMCreateSyncReader(IUnknown *reserved, DWORD rights, IWMSyncReader **reader) --{ -- TRACE("reserved %p, rights %#x, reader %p.\n", reserved, rights, reader); -- -- return winegstreamer_create_wm_sync_reader(reader); --} -- --HRESULT WINAPI WMCreateSyncReaderPriv(IWMSyncReader **reader) --{ -- TRACE("reader %p.\n", reader); -- -- return winegstreamer_create_wm_sync_reader(reader); --} -- - HRESULT WINAPI WMCheckURLExtension(const WCHAR *url) - { - FIXME("(%s): stub\n", wine_dbgstr_w(url)); --- -2.33.0 - diff --git a/patches/mfplat-reverts/0005-Revert-winegstreamer-Translate-GST_AUDIO_CHANNEL_POS.patch b/patches/mfplat-reverts/0005-Revert-winegstreamer-Translate-GST_AUDIO_CHANNEL_POS.patch deleted file mode 100644 index d6511e74..00000000 --- a/patches/mfplat-reverts/0005-Revert-winegstreamer-Translate-GST_AUDIO_CHANNEL_POS.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 6bde437d76c256778d706da4874a4db2a37e0e3a Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sat, 9 Oct 2021 13:47:44 +1100 -Subject: [PATCH 05/22] Revert "winegstreamer: Translate - GST_AUDIO_CHANNEL_POSITION_MONO to SPEAKER_FRONT_CENTER." - -This reverts commit 009c1d66fa202666f778d7df2bbcc522993935cf. ---- - dlls/winegstreamer/wg_parser.c | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index c3c9051a174..0c23ae6d351 100644 ---- a/dlls/winegstreamer/wg_parser.c -+++ b/dlls/winegstreamer/wg_parser.c -@@ -159,10 +159,7 @@ static uint32_t wg_channel_position_from_gst(GstAudioChannelPosition position) - SPEAKER_TOP_BACK_CENTER, - }; - -- if (position == GST_AUDIO_CHANNEL_POSITION_MONO) -- return SPEAKER_FRONT_CENTER; -- -- if (position >= 0 && position < ARRAY_SIZE(position_map)) -+ if (position < ARRAY_SIZE(position_map)) - return position_map[position]; - return 0; - } --- -2.33.0 - diff --git a/patches/mfplat-reverts/0006-Revert-winegstreamer-Trace-the-unfiltered-caps-in-si.patch b/patches/mfplat-reverts/0006-Revert-winegstreamer-Trace-the-unfiltered-caps-in-si.patch deleted file mode 100644 index 13b08d73..00000000 --- a/patches/mfplat-reverts/0006-Revert-winegstreamer-Trace-the-unfiltered-caps-in-si.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0cc0b9856041daede1d49ce5ba3bde736edd0a92 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Thu, 7 Oct 2021 09:00:38 +1100 -Subject: [PATCH 06/22] Revert "winegstreamer: Trace the unfiltered caps in - sink_query_cb()." - -This reverts commit fd6315eb8f6809b89b7449f4b9dd01453de32eda. ---- - dlls/winegstreamer/wg_parser.c | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 0c23ae6d351..9a382cb724c 100644 ---- a/dlls/winegstreamer/wg_parser.c -+++ b/dlls/winegstreamer/wg_parser.c -@@ -1006,7 +1006,6 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) - case GST_QUERY_CAPS: - { - GstCaps *caps, *filter, *temp; -- gchar *str; - - gst_query_parse_caps(query, &filter); - -@@ -1017,10 +1016,6 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) - if (!caps) - return FALSE; - -- str = gst_caps_to_string(caps); -- GST_LOG("Stream caps are \"%s\".", str); -- g_free(str); -- - if (filter) - { - temp = gst_caps_intersect(caps, filter); --- -2.33.0 - diff --git a/patches/mfplat-reverts/0007-Revert-winegstreamer-Avoid-seeking-past-the-end-of-a.patch b/patches/mfplat-reverts/0007-Revert-winegstreamer-Avoid-seeking-past-the-end-of-a.patch deleted file mode 100644 index 5760be1e..00000000 --- a/patches/mfplat-reverts/0007-Revert-winegstreamer-Avoid-seeking-past-the-end-of-a.patch +++ /dev/null @@ -1,33 +0,0 @@ -From dd5d76af94c794f9679c29bec0dc436bfaa78edc Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Thu, 7 Oct 2021 09:00:39 +1100 -Subject: [PATCH 07/22] Revert "winegstreamer: Avoid seeking past the end of an - IMFByteStream." - -This reverts commit 3efb72de5aca01d3d979ce697728e51bc3e99901. ---- - dlls/winegstreamer/media_source.c | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index 6ecd345cb73..dab85e4689d 100644 ---- a/dlls/winegstreamer/media_source.c -+++ b/dlls/winegstreamer/media_source.c -@@ -639,14 +639,6 @@ static DWORD CALLBACK read_thread(void *arg) - else if (offset + size >= file_size) - size = file_size - offset; - -- /* Some IMFByteStreams (including the standard file-based stream) return -- * an error when reading past the file size. */ -- if (!size) -- { -- wg_parser_push_data(source->wg_parser, data, 0); -- continue; -- } -- - if (!array_reserve(&data, &buffer_size, size, 1)) - { - free(data); --- -2.33.0 - diff --git a/patches/mfplat-reverts/0008-Revert-winegstreamer-Avoid-passing-a-NULL-buffer-to-.patch b/patches/mfplat-reverts/0008-Revert-winegstreamer-Avoid-passing-a-NULL-buffer-to-.patch deleted file mode 100644 index 196ae4b6..00000000 --- a/patches/mfplat-reverts/0008-Revert-winegstreamer-Avoid-passing-a-NULL-buffer-to-.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 9d20d8d508a65ef044a3d903eb2c96e9b4d08429 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Thu, 7 Oct 2021 09:00:39 +1100 -Subject: [PATCH 08/22] Revert "winegstreamer: Avoid passing a NULL buffer to - wg_parser_push_data() in the case of a zero-length read." - -This reverts commit 585acfa04188f85fb9138e57d56dd44b870dca41. ---- - dlls/winegstreamer/media_source.c | 7 ++----- - dlls/winegstreamer/quartz_parser.c | 5 +---- - 2 files changed, 3 insertions(+), 9 deletions(-) - -diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index dab85e4689d..703bdd7c57d 100644 ---- a/dlls/winegstreamer/media_source.c -+++ b/dlls/winegstreamer/media_source.c -@@ -613,12 +613,9 @@ static DWORD CALLBACK read_thread(void *arg) - { - struct media_source *source = arg; - IMFByteStream *byte_stream = source->byte_stream; -- size_t buffer_size = 4096; -+ size_t buffer_size = 0; - uint64_t file_size; -- void *data; -- -- if (!(data = malloc(buffer_size))) -- return 0; -+ void *data = NULL; - - IMFByteStream_GetLength(byte_stream, &file_size); - -diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c -index 6d79d2ef129..b6655d5da3c 100644 ---- a/dlls/winegstreamer/quartz_parser.c -+++ b/dlls/winegstreamer/quartz_parser.c -@@ -786,12 +786,9 @@ static DWORD CALLBACK read_thread(void *arg) - { - struct parser *filter = arg; - LONGLONG file_size, unused; -- size_t buffer_size = 4096; -+ size_t buffer_size = 0; - void *data = NULL; - -- if (!(data = malloc(buffer_size))) -- return 0; -- - IAsyncReader_Length(filter->reader, &file_size, &unused); - - TRACE("Starting read thread for filter %p.\n", filter); --- -2.33.0 - diff --git a/patches/mfplat-reverts/0009-Revert-winegstreamer-Use-array_reserve-to-reallocate.patch b/patches/mfplat-reverts/0009-Revert-winegstreamer-Use-array_reserve-to-reallocate.patch deleted file mode 100644 index 00bc90c0..00000000 --- a/patches/mfplat-reverts/0009-Revert-winegstreamer-Use-array_reserve-to-reallocate.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 997978816252d56a53b53d8d0a1913f78b3aad42 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Thu, 7 Oct 2021 09:00:40 +1100 -Subject: [PATCH 09/22] Revert "winegstreamer: Use array_reserve() to - reallocate read buffers." - -This reverts commit 59997c355fdc9cb5857c767b3bf16c9513b3d1f3. ---- - dlls/winegstreamer/gst_private.h | 2 -- - dlls/winegstreamer/main.c | 27 --------------------------- - dlls/winegstreamer/media_source.c | 8 ++++---- - dlls/winegstreamer/quartz_parser.c | 8 ++++---- - 4 files changed, 8 insertions(+), 37 deletions(-) - -diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index 986c8ca695d..ebe0bf6f50d 100644 ---- a/dlls/winegstreamer/gst_private.h -+++ b/dlls/winegstreamer/gst_private.h -@@ -38,8 +38,6 @@ - - #include "unixlib.h" - --bool array_reserve(void **elements, size_t *capacity, size_t count, size_t size) DECLSPEC_HIDDEN; -- - static inline const char *debugstr_time(REFERENCE_TIME time) - { - ULONGLONG abstime = time >= 0 ? time : -time; -diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c -index d6f19fb4ad1..c799aa06d1b 100644 ---- a/dlls/winegstreamer/main.c -+++ b/dlls/winegstreamer/main.c -@@ -31,33 +31,6 @@ static unixlib_handle_t unix_handle; - - WINE_DEFAULT_DEBUG_CHANNEL(quartz); - --bool array_reserve(void **elements, size_t *capacity, size_t count, size_t size) --{ -- unsigned int new_capacity, max_capacity; -- void *new_elements; -- -- if (count <= *capacity) -- return TRUE; -- -- max_capacity = ~(SIZE_T)0 / size; -- if (count > max_capacity) -- return FALSE; -- -- new_capacity = max(4, *capacity); -- while (new_capacity < count && new_capacity <= max_capacity / 2) -- new_capacity *= 2; -- if (new_capacity < count) -- new_capacity = max_capacity; -- -- if (!(new_elements = realloc(*elements, new_capacity * size))) -- return FALSE; -- -- *elements = new_elements; -- *capacity = new_capacity; -- -- return TRUE; --} -- - struct wg_parser *wg_parser_create(enum wg_parser_type type, bool unlimited_buffering) - { - struct wg_parser_create_params params = -diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index 703bdd7c57d..da898f20f66 100644 ---- a/dlls/winegstreamer/media_source.c -+++ b/dlls/winegstreamer/media_source.c -@@ -613,7 +613,7 @@ static DWORD CALLBACK read_thread(void *arg) - { - struct media_source *source = arg; - IMFByteStream *byte_stream = source->byte_stream; -- size_t buffer_size = 0; -+ uint32_t buffer_size = 0; - uint64_t file_size; - void *data = NULL; - -@@ -636,10 +636,10 @@ static DWORD CALLBACK read_thread(void *arg) - else if (offset + size >= file_size) - size = file_size - offset; - -- if (!array_reserve(&data, &buffer_size, size, 1)) -+ if (size > buffer_size) - { -- free(data); -- return 0; -+ buffer_size = size; -+ data = realloc(data, size); - } - - ret_size = 0; -diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c -index b6655d5da3c..6ae1a99a14a 100644 ---- a/dlls/winegstreamer/quartz_parser.c -+++ b/dlls/winegstreamer/quartz_parser.c -@@ -786,7 +786,7 @@ static DWORD CALLBACK read_thread(void *arg) - { - struct parser *filter = arg; - LONGLONG file_size, unused; -- size_t buffer_size = 0; -+ uint32_t buffer_size = 0; - void *data = NULL; - - IAsyncReader_Length(filter->reader, &file_size, &unused); -@@ -807,10 +807,10 @@ static DWORD CALLBACK read_thread(void *arg) - else if (offset + size >= file_size) - size = file_size - offset; - -- if (!array_reserve(&data, &buffer_size, size, 1)) -+ if (size > buffer_size) - { -- free(data); -- return 0; -+ buffer_size = size; -+ data = realloc(data, size); - } - - hr = IAsyncReader_SyncRead(filter->reader, offset, size, data); --- -2.33.0 - diff --git a/patches/mfplat-reverts/0010-Revert-winegstreamer-Handle-zero-length-reads-in-src.patch b/patches/mfplat-reverts/0010-Revert-winegstreamer-Handle-zero-length-reads-in-src.patch deleted file mode 100644 index 38b92735..00000000 --- a/patches/mfplat-reverts/0010-Revert-winegstreamer-Handle-zero-length-reads-in-src.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 6e82f802820e9ed145201091cd636f2e83d85e67 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Thu, 7 Oct 2021 09:00:41 +1100 -Subject: [PATCH 10/22] Revert "winegstreamer: Handle zero-length reads in - src_getrange_cb()." - -This reverts commit 8e9d7b031f7b0c93471cfbffe8f720c34623a273. ---- - dlls/winegstreamer/wg_parser.c | 12 +----------- - 1 file changed, 1 insertion(+), 11 deletions(-) - -diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 9a382cb724c..72dfab8f3d6 100644 ---- a/dlls/winegstreamer/wg_parser.c -+++ b/dlls/winegstreamer/wg_parser.c -@@ -1272,7 +1272,7 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent, - GstMapInfo map_info; - bool ret; - -- GST_LOG("pad %p, offset %" G_GINT64_MODIFIER "u, size %u, buffer %p.", pad, offset, size, *buffer); -+ GST_LOG("pad %p, offset %" G_GINT64_MODIFIER "u, length %u, buffer %p.", pad, offset, size, *buffer); - - if (offset == GST_BUFFER_OFFSET_NONE) - offset = parser->next_pull_offset; -@@ -1281,16 +1281,6 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent, - if (!*buffer) - *buffer = new_buffer = gst_buffer_new_and_alloc(size); - -- if (!size) -- { -- /* asfreader occasionally asks for zero bytes. gst_buffer_map() will -- * return NULL in this case. Avoid confusing the read thread by asking -- * it for zero bytes. */ -- gst_buffer_set_size(*buffer, 0); -- GST_LOG("Returning empty buffer."); -- return GST_FLOW_OK; -- } -- - gst_buffer_map(*buffer, &map_info, GST_MAP_WRITE); - - pthread_mutex_lock(&parser->mutex); --- -2.33.0 - diff --git a/patches/mfplat-reverts/0011-Revert-winegstreamer-Convert-the-Unix-library-to-the.patch b/patches/mfplat-reverts/0011-Revert-winegstreamer-Convert-the-Unix-library-to-the.patch deleted file mode 100644 index 10e9264d..00000000 --- a/patches/mfplat-reverts/0011-Revert-winegstreamer-Convert-the-Unix-library-to-the.patch +++ /dev/null @@ -1,1389 +0,0 @@ -From 29f82e04e5040e430628975484666aaecb74f311 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Wed, 6 Oct 2021 08:38:11 +1100 -Subject: [PATCH 11/22] Revert "winegstreamer: Convert the Unix library to the - __wine_unix_call interface." - -This reverts commit 4ba31162c37ea237763e650f6242535d86ffb170. ---- - dlls/winegstreamer/Makefile.in | 1 - - dlls/winegstreamer/gst_private.h | 32 +---- - dlls/winegstreamer/main.c | 197 +-------------------------- - dlls/winegstreamer/media_source.c | 44 +++--- - dlls/winegstreamer/quartz_parser.c | 72 +++++----- - dlls/winegstreamer/unixlib.h | 139 ++++--------------- - dlls/winegstreamer/wg_parser.c | 210 +++++++++++------------------ - 7 files changed, 167 insertions(+), 528 deletions(-) - -diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in -index e35df3cf3f9..13e61abee36 100644 ---- a/dlls/winegstreamer/Makefile.in -+++ b/dlls/winegstreamer/Makefile.in -@@ -1,5 +1,4 @@ - MODULE = winegstreamer.dll --UNIXLIB = winegstreamer.so - IMPORTS = strmbase strmiids uuid ole32 mfuuid - DELAYIMPORTS = mfplat - EXTRAINCL = $(GSTREAMER_CFLAGS) -diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index ebe0bf6f50d..91c646571cf 100644 ---- a/dlls/winegstreamer/gst_private.h -+++ b/dlls/winegstreamer/gst_private.h -@@ -61,37 +61,7 @@ static inline const char *debugstr_time(REFERENCE_TIME time) - - #define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000) - --struct wg_parser *wg_parser_create(enum wg_parser_type type, bool unlimited_buffering) DECLSPEC_HIDDEN; --void wg_parser_destroy(struct wg_parser *parser) DECLSPEC_HIDDEN; -- --HRESULT wg_parser_connect(struct wg_parser *parser, uint64_t file_size) DECLSPEC_HIDDEN; --void wg_parser_disconnect(struct wg_parser *parser) DECLSPEC_HIDDEN; -- --void wg_parser_begin_flush(struct wg_parser *parser) DECLSPEC_HIDDEN; --void wg_parser_end_flush(struct wg_parser *parser) DECLSPEC_HIDDEN; -- --bool wg_parser_get_next_read_offset(struct wg_parser *parser, uint64_t *offset, uint32_t *size) DECLSPEC_HIDDEN; --void wg_parser_push_data(struct wg_parser *parser, const void *data, uint32_t size) DECLSPEC_HIDDEN; -- --uint32_t wg_parser_get_stream_count(struct wg_parser *parser) DECLSPEC_HIDDEN; --struct wg_parser_stream *wg_parser_get_stream(struct wg_parser *parser, uint32_t index) DECLSPEC_HIDDEN; -- --void wg_parser_stream_get_preferred_format(struct wg_parser_stream *stream, struct wg_format *format) DECLSPEC_HIDDEN; --void wg_parser_stream_enable(struct wg_parser_stream *stream, const struct wg_format *format) DECLSPEC_HIDDEN; --void wg_parser_stream_disable(struct wg_parser_stream *stream) DECLSPEC_HIDDEN; -- --bool wg_parser_stream_get_event(struct wg_parser_stream *stream, struct wg_parser_event *event) DECLSPEC_HIDDEN; --bool wg_parser_stream_copy_buffer(struct wg_parser_stream *stream, -- void *data, uint32_t offset, uint32_t size) DECLSPEC_HIDDEN; --void wg_parser_stream_release_buffer(struct wg_parser_stream *stream) DECLSPEC_HIDDEN; --void wg_parser_stream_notify_qos(struct wg_parser_stream *stream, -- bool underflow, double proportion, int64_t diff, uint64_t timestamp) DECLSPEC_HIDDEN; -- --/* Returns the duration in 100-nanosecond units. */ --uint64_t wg_parser_stream_get_duration(struct wg_parser_stream *stream) DECLSPEC_HIDDEN; --/* start_pos and stop_pos are in 100-nanosecond units. */ --void wg_parser_stream_seek(struct wg_parser_stream *stream, double rate, -- uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags) DECLSPEC_HIDDEN; -+extern const struct unix_funcs *unix_funcs; - - HRESULT avi_splitter_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; - HRESULT decodebin_parser_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; -diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c -index c799aa06d1b..6742724948e 100644 ---- a/dlls/winegstreamer/main.c -+++ b/dlls/winegstreamer/main.c -@@ -27,209 +27,16 @@ - #include "initguid.h" - #include "gst_guids.h" - --static unixlib_handle_t unix_handle; -- - WINE_DEFAULT_DEBUG_CHANNEL(quartz); - --struct wg_parser *wg_parser_create(enum wg_parser_type type, bool unlimited_buffering) --{ -- struct wg_parser_create_params params = -- { -- .type = type, -- .unlimited_buffering = unlimited_buffering, -- }; -- -- if (__wine_unix_call(unix_handle, unix_wg_parser_create, ¶ms)) -- return NULL; -- return params.parser; --} -- --void wg_parser_destroy(struct wg_parser *parser) --{ -- __wine_unix_call(unix_handle, unix_wg_parser_destroy, parser); --} -- --HRESULT wg_parser_connect(struct wg_parser *parser, uint64_t file_size) --{ -- struct wg_parser_connect_params params = -- { -- .parser = parser, -- .file_size = file_size, -- }; -- -- return __wine_unix_call(unix_handle, unix_wg_parser_connect, ¶ms); --} -- --void wg_parser_disconnect(struct wg_parser *parser) --{ -- __wine_unix_call(unix_handle, unix_wg_parser_disconnect, parser); --} -- --void wg_parser_begin_flush(struct wg_parser *parser) --{ -- __wine_unix_call(unix_handle, unix_wg_parser_begin_flush, parser); --} -- --void wg_parser_end_flush(struct wg_parser *parser) --{ -- __wine_unix_call(unix_handle, unix_wg_parser_end_flush, parser); --} -- --bool wg_parser_get_next_read_offset(struct wg_parser *parser, uint64_t *offset, uint32_t *size) --{ -- struct wg_parser_get_next_read_offset_params params = -- { -- .parser = parser, -- }; -- -- if (__wine_unix_call(unix_handle, unix_wg_parser_get_next_read_offset, ¶ms)) -- return false; -- *offset = params.offset; -- *size = params.size; -- return true; --} -- --void wg_parser_push_data(struct wg_parser *parser, const void *data, uint32_t size) --{ -- struct wg_parser_push_data_params params = -- { -- .parser = parser, -- .data = data, -- .size = size, -- }; -- -- __wine_unix_call(unix_handle, unix_wg_parser_push_data, ¶ms); --} -- --uint32_t wg_parser_get_stream_count(struct wg_parser *parser) --{ -- struct wg_parser_get_stream_count_params params = -- { -- .parser = parser, -- }; -- -- __wine_unix_call(unix_handle, unix_wg_parser_get_stream_count, ¶ms); -- return params.count; --} -- --struct wg_parser_stream *wg_parser_get_stream(struct wg_parser *parser, uint32_t index) --{ -- struct wg_parser_get_stream_params params = -- { -- .parser = parser, -- .index = index, -- }; -- -- __wine_unix_call(unix_handle, unix_wg_parser_get_stream, ¶ms); -- return params.stream; --} -- --void wg_parser_stream_get_preferred_format(struct wg_parser_stream *stream, struct wg_format *format) --{ -- struct wg_parser_stream_get_preferred_format_params params = -- { -- .stream = stream, -- .format = format, -- }; -- -- __wine_unix_call(unix_handle, unix_wg_parser_stream_get_preferred_format, ¶ms); --} -- --void wg_parser_stream_enable(struct wg_parser_stream *stream, const struct wg_format *format) --{ -- struct wg_parser_stream_enable_params params = -- { -- .stream = stream, -- .format = format, -- }; -- -- __wine_unix_call(unix_handle, unix_wg_parser_stream_enable, ¶ms); --} -- --void wg_parser_stream_disable(struct wg_parser_stream *stream) --{ -- __wine_unix_call(unix_handle, unix_wg_parser_stream_disable, stream); --} -- --bool wg_parser_stream_get_event(struct wg_parser_stream *stream, struct wg_parser_event *event) --{ -- struct wg_parser_stream_get_event_params params = -- { -- .stream = stream, -- .event = event, -- }; -- -- return !__wine_unix_call(unix_handle, unix_wg_parser_stream_get_event, ¶ms); --} -- --bool wg_parser_stream_copy_buffer(struct wg_parser_stream *stream, -- void *data, uint32_t offset, uint32_t size) --{ -- struct wg_parser_stream_copy_buffer_params params = -- { -- .stream = stream, -- .data = data, -- .offset = offset, -- .size = size, -- }; -- -- return !__wine_unix_call(unix_handle, unix_wg_parser_stream_copy_buffer, ¶ms); --} -- --void wg_parser_stream_release_buffer(struct wg_parser_stream *stream) --{ -- __wine_unix_call(unix_handle, unix_wg_parser_stream_release_buffer, stream); --} -- --void wg_parser_stream_notify_qos(struct wg_parser_stream *stream, -- bool underflow, double proportion, int64_t diff, uint64_t timestamp) --{ -- struct wg_parser_stream_notify_qos_params params = -- { -- .stream = stream, -- .underflow = underflow, -- .proportion = proportion, -- .diff = diff, -- .timestamp = timestamp, -- }; -- -- __wine_unix_call(unix_handle, unix_wg_parser_stream_notify_qos, ¶ms); --} -- --uint64_t wg_parser_stream_get_duration(struct wg_parser_stream *stream) --{ -- struct wg_parser_stream_get_duration_params params = -- { -- .stream = stream, -- }; -- -- __wine_unix_call(unix_handle, unix_wg_parser_stream_get_duration, ¶ms); -- return params.duration; --} -- --void wg_parser_stream_seek(struct wg_parser_stream *stream, double rate, -- uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags) --{ -- struct wg_parser_stream_seek_params params = -- { -- .stream = stream, -- .rate = rate, -- .start_pos = start_pos, -- .stop_pos = stop_pos, -- .start_flags = start_flags, -- .stop_flags = stop_flags, -- }; -- -- __wine_unix_call(unix_handle, unix_wg_parser_stream_seek, ¶ms); --} -+const struct unix_funcs *unix_funcs = NULL; - - BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) - { - if (reason == DLL_PROCESS_ATTACH) - { - DisableThreadLibraryCalls(instance); -- NtQueryVirtualMemory(GetCurrentProcess(), instance, MemoryWineUnixFuncs, -- &unix_handle, sizeof(unix_handle), NULL); -+ __wine_init_unix_lib(instance, reason, NULL, &unix_funcs); - } - return TRUE; - } -diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index da898f20f66..18bffca1362 100644 ---- a/dlls/winegstreamer/media_source.c -+++ b/dlls/winegstreamer/media_source.c -@@ -357,7 +357,7 @@ static void start_pipeline(struct media_source *source, struct source_async_comm - IMFMediaTypeHandler_GetCurrentMediaType(mth, ¤t_mt); - - mf_media_type_to_wg_format(current_mt, &format); -- wg_parser_stream_enable(stream->wg_stream, &format); -+ unix_funcs->wg_parser_stream_enable(stream->wg_stream, &format); - - IMFMediaType_Release(current_mt); - IMFMediaTypeHandler_Release(mth); -@@ -385,9 +385,9 @@ static void start_pipeline(struct media_source *source, struct source_async_comm - source->state = SOURCE_RUNNING; - - if (position->vt == VT_I8) -- wg_parser_stream_seek(source->streams[0]->wg_stream, 1.0, position->hVal.QuadPart, 0, -- AM_SEEKING_AbsolutePositioning, AM_SEEKING_NoPositioning); -- wg_parser_end_flush(source->wg_parser); -+ unix_funcs->wg_parser_stream_seek(source->streams[0]->wg_stream, 1.0, -+ position->hVal.QuadPart, 0, AM_SEEKING_AbsolutePositioning, AM_SEEKING_NoPositioning); -+ unix_funcs->wg_parser_end_flush(source->wg_parser); - - for (i = 0; i < source->stream_count; i++) - flush_token_queue(source->streams[i], position->vt == VT_EMPTY); -@@ -415,7 +415,7 @@ static void stop_pipeline(struct media_source *source) - { - unsigned int i; - -- wg_parser_begin_flush(source->wg_parser); -+ unix_funcs->wg_parser_begin_flush(source->wg_parser); - - for (i = 0; i < source->stream_count; i++) - { -@@ -423,7 +423,7 @@ static void stop_pipeline(struct media_source *source) - if (stream->state != STREAM_INACTIVE) - { - IMFMediaEventQueue_QueueEventParamVar(stream->event_queue, MEStreamStopped, &GUID_NULL, S_OK, NULL); -- wg_parser_stream_disable(stream->wg_stream); -+ unix_funcs->wg_parser_stream_disable(stream->wg_stream); - } - } - -@@ -490,13 +490,13 @@ static void send_buffer(struct media_stream *stream, const struct wg_parser_even - goto out; - } - -- if (!wg_parser_stream_copy_buffer(stream->wg_stream, data, 0, event->u.buffer.size)) -+ if (!unix_funcs->wg_parser_stream_copy_buffer(stream->wg_stream, data, 0, event->u.buffer.size)) - { -- wg_parser_stream_release_buffer(stream->wg_stream); -+ unix_funcs->wg_parser_stream_release_buffer(stream->wg_stream); - IMFMediaBuffer_Unlock(buffer); - goto out; - } -- wg_parser_stream_release_buffer(stream->wg_stream); -+ unix_funcs->wg_parser_stream_release_buffer(stream->wg_stream); - - if (FAILED(hr = IMFMediaBuffer_Unlock(buffer))) - { -@@ -536,7 +536,7 @@ static void wait_on_sample(struct media_stream *stream, IUnknown *token) - - for (;;) - { -- if (!wg_parser_stream_get_event(stream->wg_stream, &event)) -+ if (!unix_funcs->wg_parser_stream_get_event(stream->wg_stream, &event)) - return; - - TRACE("Got event of type %#x.\n", event.type); -@@ -628,7 +628,7 @@ static DWORD CALLBACK read_thread(void *arg) - uint32_t size; - HRESULT hr; - -- if (!wg_parser_get_next_read_offset(source->wg_parser, &offset, &size)) -+ if (!unix_funcs->wg_parser_get_next_read_offset(source->wg_parser, &offset, &size)) - continue; - - if (offset >= file_size) -@@ -650,7 +650,7 @@ static DWORD CALLBACK read_thread(void *arg) - ERR("Failed to read %u bytes at offset %I64u, hr %#x.\n", size, offset, hr); - else if (ret_size != size) - ERR("Unexpected short read: requested %u bytes, got %u.\n", size, ret_size); -- wg_parser_push_data(source->wg_parser, SUCCEEDED(hr) ? data : NULL, ret_size); -+ unix_funcs->wg_parser_push_data(source->wg_parser, SUCCEEDED(hr) ? data : NULL, ret_size); - } - - free(data); -@@ -867,7 +867,7 @@ static HRESULT media_stream_init_desc(struct media_stream *stream) - unsigned int i; - HRESULT hr; - -- wg_parser_stream_get_preferred_format(stream->wg_stream, &format); -+ unix_funcs->wg_parser_stream_get_preferred_format(stream->wg_stream, &format); - - if (format.major_type == WG_MAJOR_TYPE_VIDEO) - { -@@ -1327,7 +1327,7 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface) - - source->state = SOURCE_SHUTDOWN; - -- wg_parser_disconnect(source->wg_parser); -+ unix_funcs->wg_parser_disconnect(source->wg_parser); - - source->read_thread_shutdown = true; - WaitForSingleObject(source->read_thread, INFINITE); -@@ -1350,7 +1350,7 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface) - IMFMediaStream_Release(&stream->IMFMediaStream_iface); - } - -- wg_parser_destroy(source->wg_parser); -+ unix_funcs->wg_parser_destroy(source->wg_parser); - - free(source->streams); - -@@ -1427,7 +1427,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ - * never deselects it). Remove buffering limits from decodebin in order to - * account for this. Note that this does leak memory, but the same memory - * leak occurs with native. */ -- if (!(parser = wg_parser_create(WG_PARSER_DECODEBIN, true))) -+ if (!(parser = unix_funcs->wg_parser_create(WG_PARSER_DECODEBIN, true))) - { - hr = E_OUTOFMEMORY; - goto fail; -@@ -1438,10 +1438,10 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ - - object->state = SOURCE_OPENING; - -- if (FAILED(hr = wg_parser_connect(parser, file_size))) -+ if (FAILED(hr = unix_funcs->wg_parser_connect(parser, file_size))) - goto fail; - -- stream_count = wg_parser_get_stream_count(parser); -+ stream_count = unix_funcs->wg_parser_get_stream_count(parser); - - if (!(object->streams = calloc(stream_count, sizeof(*object->streams)))) - { -@@ -1451,7 +1451,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ - - for (i = 0; i < stream_count; ++i) - { -- if (FAILED(hr = new_media_stream(object, wg_parser_get_stream(parser, i), i, &object->streams[i]))) -+ if (FAILED(hr = new_media_stream(object, unix_funcs->wg_parser_get_stream(parser, i), i, &object->streams[i]))) - goto fail; - - if (FAILED(hr = media_stream_init_desc(object->streams[i]))) -@@ -1487,7 +1487,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ - - for (i = 0; i < object->stream_count; i++) - total_pres_time = max(total_pres_time, -- wg_parser_stream_get_duration(object->streams[i]->wg_stream)); -+ unix_funcs->wg_parser_stream_get_duration(object->streams[i]->wg_stream)); - - if (object->stream_count) - IMFPresentationDescriptor_SetUINT64(object->pres_desc, &MF_PD_DURATION, total_pres_time); -@@ -1518,7 +1518,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ - } - free(object->streams); - if (stream_count != UINT_MAX) -- wg_parser_disconnect(object->wg_parser); -+ unix_funcs->wg_parser_disconnect(object->wg_parser); - if (object->read_thread) - { - object->read_thread_shutdown = true; -@@ -1526,7 +1526,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ - CloseHandle(object->read_thread); - } - if (object->wg_parser) -- wg_parser_destroy(object->wg_parser); -+ unix_funcs->wg_parser_destroy(object->wg_parser); - if (object->async_commands_queue) - MFUnlockWorkQueue(object->async_commands_queue); - if (object->event_queue) -diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c -index 6ae1a99a14a..5dd232ea0da 100644 ---- a/dlls/winegstreamer/quartz_parser.c -+++ b/dlls/winegstreamer/quartz_parser.c -@@ -623,7 +623,7 @@ static HRESULT send_sample(struct parser_source *pin, IMediaSample *sample, - - IMediaSample_GetPointer(sample, &ptr); - -- if (!wg_parser_stream_copy_buffer(pin->wg_stream, ptr, offset, size)) -+ if (!unix_funcs->wg_parser_stream_copy_buffer(pin->wg_stream, ptr, offset, size)) - { - /* The GStreamer pin has been flushed. */ - return S_OK; -@@ -732,7 +732,7 @@ static void send_buffer(struct parser_source *pin, const struct wg_parser_event - } - } - -- wg_parser_stream_release_buffer(pin->wg_stream); -+ unix_funcs->wg_parser_stream_release_buffer(pin->wg_stream); - } - - static DWORD CALLBACK stream_thread(void *arg) -@@ -748,7 +748,7 @@ static DWORD CALLBACK stream_thread(void *arg) - - EnterCriticalSection(&pin->flushing_cs); - -- if (!wg_parser_stream_get_event(pin->wg_stream, &event)) -+ if (!unix_funcs->wg_parser_stream_get_event(pin->wg_stream, &event)) - { - LeaveCriticalSection(&pin->flushing_cs); - continue; -@@ -799,7 +799,7 @@ static DWORD CALLBACK read_thread(void *arg) - uint32_t size; - HRESULT hr; - -- if (!wg_parser_get_next_read_offset(filter->wg_parser, &offset, &size)) -+ if (!unix_funcs->wg_parser_get_next_read_offset(filter->wg_parser, &offset, &size)) - continue; - - if (offset >= file_size) -@@ -817,7 +817,7 @@ static DWORD CALLBACK read_thread(void *arg) - if (FAILED(hr)) - ERR("Failed to read %u bytes at offset %I64u, hr %#x.\n", size, offset, hr); - -- wg_parser_push_data(filter->wg_parser, SUCCEEDED(hr) ? data : NULL, size); -+ unix_funcs->wg_parser_push_data(filter->wg_parser, SUCCEEDED(hr) ? data : NULL, size); - } - - free(data); -@@ -869,7 +869,7 @@ static void parser_destroy(struct strmbase_filter *iface) - IAsyncReader_Release(filter->reader); - filter->reader = NULL; - -- wg_parser_destroy(filter->wg_parser); -+ unix_funcs->wg_parser_destroy(filter->wg_parser); - - strmbase_sink_cleanup(&filter->sink); - strmbase_filter_cleanup(&filter->filter); -@@ -887,7 +887,7 @@ static HRESULT parser_init_stream(struct strmbase_filter *iface) - return S_OK; - - filter->streaming = true; -- wg_parser_end_flush(filter->wg_parser); -+ unix_funcs->wg_parser_end_flush(filter->wg_parser); - - /* DirectShow retains the old seek positions, but resets to them every time - * it transitions from stopped -> paused. */ -@@ -895,7 +895,7 @@ static HRESULT parser_init_stream(struct strmbase_filter *iface) - seeking = &filter->sources[0]->seek; - if (seeking->llStop) - stop_flags = AM_SEEKING_AbsolutePositioning; -- wg_parser_stream_seek(filter->sources[0]->wg_stream, seeking->dRate, -+ unix_funcs->wg_parser_stream_seek(filter->sources[0]->wg_stream, seeking->dRate, - seeking->llCurrent, seeking->llStop, AM_SEEKING_AbsolutePositioning, stop_flags); - - for (i = 0; i < filter->source_count; ++i) -@@ -923,7 +923,7 @@ static HRESULT parser_cleanup_stream(struct strmbase_filter *iface) - return S_OK; - - filter->streaming = false; -- wg_parser_begin_flush(filter->wg_parser); -+ unix_funcs->wg_parser_begin_flush(filter->wg_parser); - - for (i = 0; i < filter->source_count; ++i) - { -@@ -978,7 +978,7 @@ static HRESULT parser_sink_connect(struct strmbase_sink *iface, IPin *peer, cons - filter->sink_connected = true; - filter->read_thread = CreateThread(NULL, 0, read_thread, filter, 0, NULL); - -- if (FAILED(hr = wg_parser_connect(filter->wg_parser, file_size))) -+ if (FAILED(hr = unix_funcs->wg_parser_connect(filter->wg_parser, file_size))) - goto err; - - if (!filter->init_gst(filter)) -@@ -991,7 +991,7 @@ static HRESULT parser_sink_connect(struct strmbase_sink *iface, IPin *peer, cons - { - struct parser_source *pin = filter->sources[i]; - -- pin->seek.llDuration = pin->seek.llStop = wg_parser_stream_get_duration(pin->wg_stream); -+ pin->seek.llDuration = pin->seek.llStop = unix_funcs->wg_parser_stream_get_duration(pin->wg_stream); - pin->seek.llCurrent = 0; - } - -@@ -1026,11 +1026,11 @@ static BOOL decodebin_parser_filter_init_gst(struct parser *filter) - unsigned int i, stream_count; - WCHAR source_name[20]; - -- stream_count = wg_parser_get_stream_count(parser); -+ stream_count = unix_funcs->wg_parser_get_stream_count(parser); - for (i = 0; i < stream_count; ++i) - { - swprintf(source_name, ARRAY_SIZE(source_name), L"Stream %02u", i); -- if (!create_pin(filter, wg_parser_get_stream(parser, i), source_name)) -+ if (!create_pin(filter, unix_funcs->wg_parser_get_stream(parser, i), source_name)) - return FALSE; - } - -@@ -1069,7 +1069,7 @@ static HRESULT decodebin_parser_source_get_media_type(struct parser_source *pin, - WG_VIDEO_FORMAT_RGB15, - }; - -- wg_parser_stream_get_preferred_format(pin->wg_stream, &format); -+ unix_funcs->wg_parser_stream_get_preferred_format(pin->wg_stream, &format); - - memset(mt, 0, sizeof(AM_MEDIA_TYPE)); - -@@ -1115,7 +1115,7 @@ HRESULT decodebin_parser_create(IUnknown *outer, IUnknown **out) - if (!(object = calloc(1, sizeof(*object)))) - return E_OUTOFMEMORY; - -- if (!(object->wg_parser = wg_parser_create(WG_PARSER_DECODEBIN, false))) -+ if (!(object->wg_parser = unix_funcs->wg_parser_create(WG_PARSER_DECODEBIN, false))) - { - free(object); - return E_OUTOFMEMORY; -@@ -1205,7 +1205,7 @@ static HRESULT WINAPI GST_ChangeRate(IMediaSeeking *iface) - { - struct parser_source *pin = impl_from_IMediaSeeking(iface); - -- wg_parser_stream_seek(pin->wg_stream, pin->seek.dRate, 0, 0, -+ unix_funcs->wg_parser_stream_seek(pin->wg_stream, pin->seek.dRate, 0, 0, - AM_SEEKING_NoPositioning, AM_SEEKING_NoPositioning); - return S_OK; - } -@@ -1247,7 +1247,7 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface, - - if (!(current_flags & AM_SEEKING_NoFlush)) - { -- wg_parser_begin_flush(filter->wg_parser); -+ unix_funcs->wg_parser_begin_flush(filter->wg_parser); - - for (i = 0; i < filter->source_count; ++i) - { -@@ -1269,12 +1269,12 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface, - - SourceSeekingImpl_SetPositions(iface, current, current_flags, stop, stop_flags); - -- wg_parser_stream_seek(pin->wg_stream, pin->seek.dRate, -+ unix_funcs->wg_parser_stream_seek(pin->wg_stream, pin->seek.dRate, - pin->seek.llCurrent, pin->seek.llStop, current_flags, stop_flags); - - if (!(current_flags & AM_SEEKING_NoFlush)) - { -- wg_parser_end_flush(filter->wg_parser); -+ unix_funcs->wg_parser_end_flush(filter->wg_parser); - - for (i = 0; i < filter->source_count; ++i) - { -@@ -1383,7 +1383,7 @@ static HRESULT WINAPI GST_QualityControl_Notify(IQualityControl *iface, IBaseFil - /* GST_QOS_TYPE_OVERFLOW is also used for buffers that arrive on time, but - * DirectShow filters might use Famine, so check that there actually is an - * underrun. */ -- wg_parser_stream_notify_qos(pin->wg_stream, q.Type == Famine && q.Proportion < 1000, -+ unix_funcs->wg_parser_stream_notify_qos(pin->wg_stream, q.Type == Famine && q.Proportion < 1000, - 1000.0 / q.Proportion, diff, timestamp); - - return S_OK; -@@ -1463,7 +1463,7 @@ static HRESULT WINAPI GSTOutPin_DecideBufferSize(struct strmbase_source *iface, - - ret = amt_to_wg_format(&pin->pin.pin.mt, &format); - assert(ret); -- wg_parser_stream_enable(pin->wg_stream, &format); -+ unix_funcs->wg_parser_stream_enable(pin->wg_stream, &format); - - /* We do need to drop any buffers that might have been sent with the old - * caps, but this will be handled in parser_init_stream(). */ -@@ -1478,7 +1478,7 @@ static void source_disconnect(struct strmbase_source *iface) - { - struct parser_source *pin = impl_source_from_IPin(&iface->pin.IPin_iface); - -- wg_parser_stream_disable(pin->wg_stream); -+ unix_funcs->wg_parser_stream_disable(pin->wg_stream); - } - - static void free_source_pin(struct parser_source *pin) -@@ -1544,7 +1544,7 @@ static HRESULT GST_RemoveOutputPins(struct parser *This) - if (!This->sink_connected) - return S_OK; - -- wg_parser_disconnect(This->wg_parser); -+ unix_funcs->wg_parser_disconnect(This->wg_parser); - - /* read_thread() needs to stay alive to service any read requests GStreamer - * sends, so we can only shut it down after GStreamer stops. */ -@@ -1597,7 +1597,7 @@ static BOOL wave_parser_filter_init_gst(struct parser *filter) - { - struct wg_parser *parser = filter->wg_parser; - -- if (!create_pin(filter, wg_parser_get_stream(parser, 0), L"output")) -+ if (!create_pin(filter, unix_funcs->wg_parser_get_stream(parser, 0), L"output")) - return FALSE; - - return TRUE; -@@ -1609,7 +1609,7 @@ static HRESULT wave_parser_source_query_accept(struct parser_source *pin, const - AM_MEDIA_TYPE pad_mt; - HRESULT hr; - -- wg_parser_stream_get_preferred_format(pin->wg_stream, &format); -+ unix_funcs->wg_parser_stream_get_preferred_format(pin->wg_stream, &format); - if (!amt_from_wg_format(&pad_mt, &format)) - return E_OUTOFMEMORY; - hr = compare_media_types(mt, &pad_mt) ? S_OK : S_FALSE; -@@ -1624,7 +1624,7 @@ static HRESULT wave_parser_source_get_media_type(struct parser_source *pin, - - if (index > 0) - return VFW_S_NO_MORE_ITEMS; -- wg_parser_stream_get_preferred_format(pin->wg_stream, &format); -+ unix_funcs->wg_parser_stream_get_preferred_format(pin->wg_stream, &format); - if (!amt_from_wg_format(mt, &format)) - return E_OUTOFMEMORY; - return S_OK; -@@ -1640,7 +1640,7 @@ HRESULT wave_parser_create(IUnknown *outer, IUnknown **out) - if (!(object = calloc(1, sizeof(*object)))) - return E_OUTOFMEMORY; - -- if (!(object->wg_parser = wg_parser_create(WG_PARSER_WAVPARSE, false))) -+ if (!(object->wg_parser = unix_funcs->wg_parser_create(WG_PARSER_WAVPARSE, false))) - { - free(object); - return E_OUTOFMEMORY; -@@ -1678,11 +1678,11 @@ static BOOL avi_splitter_filter_init_gst(struct parser *filter) - uint32_t i, stream_count; - WCHAR source_name[20]; - -- stream_count = wg_parser_get_stream_count(parser); -+ stream_count = unix_funcs->wg_parser_get_stream_count(parser); - for (i = 0; i < stream_count; ++i) - { - swprintf(source_name, ARRAY_SIZE(source_name), L"Stream %02u", i); -- if (!create_pin(filter, wg_parser_get_stream(parser, i), source_name)) -+ if (!create_pin(filter, unix_funcs->wg_parser_get_stream(parser, i), source_name)) - return FALSE; - } - -@@ -1695,7 +1695,7 @@ static HRESULT avi_splitter_source_query_accept(struct parser_source *pin, const - AM_MEDIA_TYPE pad_mt; - HRESULT hr; - -- wg_parser_stream_get_preferred_format(pin->wg_stream, &format); -+ unix_funcs->wg_parser_stream_get_preferred_format(pin->wg_stream, &format); - if (!amt_from_wg_format(&pad_mt, &format)) - return E_OUTOFMEMORY; - hr = compare_media_types(mt, &pad_mt) ? S_OK : S_FALSE; -@@ -1710,7 +1710,7 @@ static HRESULT avi_splitter_source_get_media_type(struct parser_source *pin, - - if (index > 0) - return VFW_S_NO_MORE_ITEMS; -- wg_parser_stream_get_preferred_format(pin->wg_stream, &format); -+ unix_funcs->wg_parser_stream_get_preferred_format(pin->wg_stream, &format); - if (!amt_from_wg_format(mt, &format)) - return E_OUTOFMEMORY; - return S_OK; -@@ -1726,7 +1726,7 @@ HRESULT avi_splitter_create(IUnknown *outer, IUnknown **out) - if (!(object = calloc(1, sizeof(*object)))) - return E_OUTOFMEMORY; - -- if (!(object->wg_parser = wg_parser_create(WG_PARSER_AVIDEMUX, false))) -+ if (!(object->wg_parser = unix_funcs->wg_parser_create(WG_PARSER_AVIDEMUX, false))) - { - free(object); - return E_OUTOFMEMORY; -@@ -1767,7 +1767,7 @@ static BOOL mpeg_splitter_filter_init_gst(struct parser *filter) - { - struct wg_parser *parser = filter->wg_parser; - -- if (!create_pin(filter, wg_parser_get_stream(parser, 0), L"Audio")) -+ if (!create_pin(filter, unix_funcs->wg_parser_get_stream(parser, 0), L"Audio")) - return FALSE; - - return TRUE; -@@ -1779,7 +1779,7 @@ static HRESULT mpeg_splitter_source_query_accept(struct parser_source *pin, cons - AM_MEDIA_TYPE pad_mt; - HRESULT hr; - -- wg_parser_stream_get_preferred_format(pin->wg_stream, &format); -+ unix_funcs->wg_parser_stream_get_preferred_format(pin->wg_stream, &format); - if (!amt_from_wg_format(&pad_mt, &format)) - return E_OUTOFMEMORY; - hr = compare_media_types(mt, &pad_mt) ? S_OK : S_FALSE; -@@ -1794,7 +1794,7 @@ static HRESULT mpeg_splitter_source_get_media_type(struct parser_source *pin, - - if (index > 0) - return VFW_S_NO_MORE_ITEMS; -- wg_parser_stream_get_preferred_format(pin->wg_stream, &format); -+ unix_funcs->wg_parser_stream_get_preferred_format(pin->wg_stream, &format); - if (!amt_from_wg_format(mt, &format)) - return E_OUTOFMEMORY; - return S_OK; -@@ -1833,7 +1833,7 @@ HRESULT mpeg_splitter_create(IUnknown *outer, IUnknown **out) - if (!(object = calloc(1, sizeof(*object)))) - return E_OUTOFMEMORY; - -- if (!(object->wg_parser = wg_parser_create(WG_PARSER_MPEGAUDIOPARSE, false))) -+ if (!(object->wg_parser = unix_funcs->wg_parser_create(WG_PARSER_MPEGAUDIOPARSE, false))) - { - free(object); - return E_OUTOFMEMORY; -diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h -index 90101893541..dade020916a 100644 ---- a/dlls/winegstreamer/unixlib.h -+++ b/dlls/winegstreamer/unixlib.h -@@ -24,12 +24,9 @@ - #include - #include - #include "windef.h" --#include "winternl.h" - #include "wtypes.h" - #include "mmreg.h" - --#include "wine/unixlib.h" -- - struct wg_format - { - enum wg_major_type -@@ -128,123 +125,41 @@ enum wg_parser_type - WG_PARSER_WAVPARSE, - }; - --struct wg_parser_create_params --{ -- struct wg_parser *parser; -- enum wg_parser_type type; -- bool unlimited_buffering; --}; -- --struct wg_parser_connect_params --{ -- struct wg_parser *parser; -- UINT64 file_size; --}; -- --struct wg_parser_get_next_read_offset_params --{ -- struct wg_parser *parser; -- UINT32 size; -- UINT64 offset; --}; -- --struct wg_parser_push_data_params --{ -- struct wg_parser *parser; -- const void *data; -- UINT32 size; --}; -- --struct wg_parser_get_stream_count_params --{ -- struct wg_parser *parser; -- UINT32 count; --}; -- --struct wg_parser_get_stream_params --{ -- struct wg_parser *parser; -- UINT32 index; -- struct wg_parser_stream *stream; --}; -- --struct wg_parser_stream_get_preferred_format_params --{ -- struct wg_parser_stream *stream; -- struct wg_format *format; --}; -- --struct wg_parser_stream_enable_params --{ -- struct wg_parser_stream *stream; -- const struct wg_format *format; --}; -- --struct wg_parser_stream_get_event_params --{ -- struct wg_parser_stream *stream; -- struct wg_parser_event *event; --}; -- --struct wg_parser_stream_copy_buffer_params --{ -- struct wg_parser_stream *stream; -- void *data; -- UINT32 offset; -- UINT32 size; --}; -- --struct wg_parser_stream_notify_qos_params --{ -- struct wg_parser_stream *stream; -- bool underflow; -- DOUBLE proportion; -- INT64 diff; -- UINT64 timestamp; --}; -- --struct wg_parser_stream_get_duration_params --{ -- struct wg_parser_stream *stream; -- UINT64 duration; --}; -- --struct wg_parser_stream_seek_params --{ -- struct wg_parser_stream *stream; -- DOUBLE rate; -- UINT64 start_pos, stop_pos; -- DWORD start_flags, stop_flags; --}; -- --enum unix_funcs -+struct unix_funcs - { -- unix_wg_parser_create, -- unix_wg_parser_destroy, -+ struct wg_parser *(CDECL *wg_parser_create)(enum wg_parser_type type, bool unlimited_buffering); -+ void (CDECL *wg_parser_destroy)(struct wg_parser *parser); - -- unix_wg_parser_connect, -- unix_wg_parser_disconnect, -+ HRESULT (CDECL *wg_parser_connect)(struct wg_parser *parser, uint64_t file_size); -+ void (CDECL *wg_parser_disconnect)(struct wg_parser *parser); - -- unix_wg_parser_begin_flush, -- unix_wg_parser_end_flush, -+ void (CDECL *wg_parser_begin_flush)(struct wg_parser *parser); -+ void (CDECL *wg_parser_end_flush)(struct wg_parser *parser); - -- unix_wg_parser_get_next_read_offset, -- unix_wg_parser_push_data, -+ bool (CDECL *wg_parser_get_next_read_offset)(struct wg_parser *parser, -+ uint64_t *offset, uint32_t *size); -+ void (CDECL *wg_parser_push_data)(struct wg_parser *parser, -+ const void *data, uint32_t size); - -- unix_wg_parser_get_stream_count, -- unix_wg_parser_get_stream, -+ uint32_t (CDECL *wg_parser_get_stream_count)(struct wg_parser *parser); -+ struct wg_parser_stream *(CDECL *wg_parser_get_stream)(struct wg_parser *parser, uint32_t index); - -- unix_wg_parser_stream_get_preferred_format, -- unix_wg_parser_stream_enable, -- unix_wg_parser_stream_disable, -+ void (CDECL *wg_parser_stream_get_preferred_format)(struct wg_parser_stream *stream, struct wg_format *format); -+ void (CDECL *wg_parser_stream_enable)(struct wg_parser_stream *stream, const struct wg_format *format); -+ void (CDECL *wg_parser_stream_disable)(struct wg_parser_stream *stream); - -- unix_wg_parser_stream_get_event, -- unix_wg_parser_stream_copy_buffer, -- unix_wg_parser_stream_release_buffer, -- unix_wg_parser_stream_notify_qos, -+ bool (CDECL *wg_parser_stream_get_event)(struct wg_parser_stream *stream, struct wg_parser_event *event); -+ bool (CDECL *wg_parser_stream_copy_buffer)(struct wg_parser_stream *stream, -+ void *data, uint32_t offset, uint32_t size); -+ void (CDECL *wg_parser_stream_release_buffer)(struct wg_parser_stream *stream); -+ void (CDECL *wg_parser_stream_notify_qos)(struct wg_parser_stream *stream, -+ bool underflow, double proportion, int64_t diff, uint64_t timestamp); - -- unix_wg_parser_stream_get_duration, -- unix_wg_parser_stream_seek, -+ /* Returns the duration in 100-nanosecond units. */ -+ uint64_t (CDECL *wg_parser_stream_get_duration)(struct wg_parser_stream *stream); -+ /* start_pos and stop_pos are in 100-nanosecond units. */ -+ void (CDECL *wg_parser_stream_seek)(struct wg_parser_stream *stream, double rate, -+ uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags); - }; - - #endif /* __WINE_WINEGSTREAMER_UNIXLIB_H */ -diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 72dfab8f3d6..694f8b57ed1 100644 ---- a/dlls/winegstreamer/wg_parser.c -+++ b/dlls/winegstreamer/wg_parser.c -@@ -34,6 +34,8 @@ - #include - #include - -+#include "ntstatus.h" -+#define WIN32_NO_STATUS - #include "winternl.h" - #include "dshow.h" - -@@ -501,25 +503,18 @@ static bool wg_format_compare(const struct wg_format *a, const struct wg_format - return false; - } - --static NTSTATUS wg_parser_get_stream_count(void *args) -+static uint32_t CDECL wg_parser_get_stream_count(struct wg_parser *parser) - { -- struct wg_parser_get_stream_count_params *params = args; -- -- params->count = params->parser->stream_count; -- return S_OK; -+ return parser->stream_count; - } - --static NTSTATUS wg_parser_get_stream(void *args) -+static struct wg_parser_stream * CDECL wg_parser_get_stream(struct wg_parser *parser, uint32_t index) - { -- struct wg_parser_get_stream_params *params = args; -- -- params->stream = params->parser->streams[params->index]; -- return S_OK; -+ return parser->streams[index]; - } - --static NTSTATUS wg_parser_begin_flush(void *args) -+static void CDECL wg_parser_begin_flush(struct wg_parser *parser) - { -- struct wg_parser *parser = args; - unsigned int i; - - pthread_mutex_lock(&parser->mutex); -@@ -531,26 +526,18 @@ static NTSTATUS wg_parser_begin_flush(void *args) - if (parser->streams[i]->enabled) - pthread_cond_signal(&parser->streams[i]->event_cond); - } -- -- return S_OK; - } - --static NTSTATUS wg_parser_end_flush(void *args) -+static void CDECL wg_parser_end_flush(struct wg_parser *parser) - { -- struct wg_parser *parser = args; -- - pthread_mutex_lock(&parser->mutex); - parser->flushing = false; - pthread_mutex_unlock(&parser->mutex); -- -- return S_OK; - } - --static NTSTATUS wg_parser_get_next_read_offset(void *args) -+static bool CDECL wg_parser_get_next_read_offset(struct wg_parser *parser, -+ uint64_t *offset, uint32_t *size) - { -- struct wg_parser_get_next_read_offset_params *params = args; -- struct wg_parser *parser = params->parser; -- - pthread_mutex_lock(&parser->mutex); - - while (parser->sink_connected && !parser->read_request.data) -@@ -559,23 +546,19 @@ static NTSTATUS wg_parser_get_next_read_offset(void *args) - if (!parser->sink_connected) - { - pthread_mutex_unlock(&parser->mutex); -- return VFW_E_WRONG_STATE; -+ return false; - } - -- params->offset = parser->read_request.offset; -- params->size = parser->read_request.size; -+ *offset = parser->read_request.offset; -+ *size = parser->read_request.size; - - pthread_mutex_unlock(&parser->mutex); -- return S_OK; -+ return true; - } - --static NTSTATUS wg_parser_push_data(void *args) -+static void CDECL wg_parser_push_data(struct wg_parser *parser, -+ const void *data, uint32_t size) - { -- const struct wg_parser_push_data_params *params = args; -- struct wg_parser *parser = params->parser; -- const void *data = params->data; -- uint32_t size = params->size; -- - pthread_mutex_lock(&parser->mutex); - parser->read_request.size = size; - parser->read_request.done = true; -@@ -585,24 +568,15 @@ static NTSTATUS wg_parser_push_data(void *args) - parser->read_request.data = NULL; - pthread_mutex_unlock(&parser->mutex); - pthread_cond_signal(&parser->read_done_cond); -- -- return S_OK; - } - --static NTSTATUS wg_parser_stream_get_preferred_format(void *args) -+static void CDECL wg_parser_stream_get_preferred_format(struct wg_parser_stream *stream, struct wg_format *format) - { -- const struct wg_parser_stream_get_preferred_format_params *params = args; -- -- *params->format = params->stream->preferred_format; -- return S_OK; -+ *format = stream->preferred_format; - } - --static NTSTATUS wg_parser_stream_enable(void *args) -+static void CDECL wg_parser_stream_enable(struct wg_parser_stream *stream, const struct wg_format *format) - { -- const struct wg_parser_stream_enable_params *params = args; -- struct wg_parser_stream *stream = params->stream; -- const struct wg_format *format = params->format; -- - stream->current_format = *format; - stream->enabled = true; - -@@ -633,21 +607,15 @@ static NTSTATUS wg_parser_stream_enable(void *args) - } - - gst_pad_push_event(stream->my_sink, gst_event_new_reconfigure()); -- return S_OK; - } - --static NTSTATUS wg_parser_stream_disable(void *args) -+static void CDECL wg_parser_stream_disable(struct wg_parser_stream *stream) - { -- struct wg_parser_stream *stream = args; -- - stream->enabled = false; -- return S_OK; - } - --static NTSTATUS wg_parser_stream_get_event(void *args) -+static bool CDECL wg_parser_stream_get_event(struct wg_parser_stream *stream, struct wg_parser_event *event) - { -- const struct wg_parser_stream_get_event_params *params = args; -- struct wg_parser_stream *stream = params->stream; - struct wg_parser *parser = stream->parser; - - pthread_mutex_lock(&parser->mutex); -@@ -659,10 +627,10 @@ static NTSTATUS wg_parser_stream_get_event(void *args) - { - pthread_mutex_unlock(&parser->mutex); - GST_DEBUG("Filter is flushing.\n"); -- return VFW_E_WRONG_STATE; -+ return false; - } - -- *params->event = stream->event; -+ *event = stream->event; - - if (stream->event.type != WG_PARSER_EVENT_BUFFER) - { -@@ -671,37 +639,33 @@ static NTSTATUS wg_parser_stream_get_event(void *args) - } - pthread_mutex_unlock(&parser->mutex); - -- return S_OK; -+ return true; - } - --static NTSTATUS wg_parser_stream_copy_buffer(void *args) -+static bool CDECL wg_parser_stream_copy_buffer(struct wg_parser_stream *stream, -+ void *data, uint32_t offset, uint32_t size) - { -- const struct wg_parser_stream_copy_buffer_params *params = args; -- struct wg_parser_stream *stream = params->stream; - struct wg_parser *parser = stream->parser; -- uint32_t offset = params->offset; -- uint32_t size = params->size; - - pthread_mutex_lock(&parser->mutex); - - if (!stream->buffer) - { - pthread_mutex_unlock(&parser->mutex); -- return VFW_E_WRONG_STATE; -+ return false; - } - - assert(stream->event.type == WG_PARSER_EVENT_BUFFER); - assert(offset < stream->map_info.size); - assert(offset + size <= stream->map_info.size); -- memcpy(params->data, stream->map_info.data + offset, size); -+ memcpy(data, stream->map_info.data + offset, size); - - pthread_mutex_unlock(&parser->mutex); -- return S_OK; -+ return true; - } - --static NTSTATUS wg_parser_stream_release_buffer(void *args) -+static void CDECL wg_parser_stream_release_buffer(struct wg_parser_stream *stream) - { -- struct wg_parser_stream *stream = args; - struct wg_parser *parser = stream->parser; - - pthread_mutex_lock(&parser->mutex); -@@ -715,24 +679,17 @@ static NTSTATUS wg_parser_stream_release_buffer(void *args) - - pthread_mutex_unlock(&parser->mutex); - pthread_cond_signal(&stream->event_empty_cond); -- -- return S_OK; - } - --static NTSTATUS wg_parser_stream_get_duration(void *args) -+static uint64_t CDECL wg_parser_stream_get_duration(struct wg_parser_stream *stream) - { -- struct wg_parser_stream_get_duration_params *params = args; -- -- params->duration = params->stream->duration; -- return S_OK; -+ return stream->duration; - } - --static NTSTATUS wg_parser_stream_seek(void *args) -+static void CDECL wg_parser_stream_seek(struct wg_parser_stream *stream, double rate, -+ uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags) - { - GstSeekType start_type = GST_SEEK_TYPE_SET, stop_type = GST_SEEK_TYPE_SET; -- const struct wg_parser_stream_seek_params *params = args; -- DWORD start_flags = params->start_flags; -- DWORD stop_flags = params->stop_flags; - GstSeekFlags flags = 0; - - if (start_flags & AM_SEEKING_SeekToKeyFrame) -@@ -747,39 +704,34 @@ static NTSTATUS wg_parser_stream_seek(void *args) - if ((stop_flags & AM_SEEKING_PositioningBitsMask) == AM_SEEKING_NoPositioning) - stop_type = GST_SEEK_TYPE_NONE; - -- if (!gst_pad_push_event(params->stream->my_sink, gst_event_new_seek(params->rate, GST_FORMAT_TIME, -- flags, start_type, params->start_pos * 100, stop_type, params->stop_pos * 100))) -+ if (!gst_pad_push_event(stream->my_sink, gst_event_new_seek(rate, GST_FORMAT_TIME, -+ flags, start_type, start_pos * 100, stop_type, stop_pos * 100))) - GST_ERROR("Failed to seek.\n"); -- -- return S_OK; - } - --static NTSTATUS wg_parser_stream_notify_qos(void *args) -+static void CDECL wg_parser_stream_notify_qos(struct wg_parser_stream *stream, -+ bool underflow, double proportion, int64_t diff, uint64_t timestamp) - { -- const struct wg_parser_stream_notify_qos_params *params = args; -- struct wg_parser_stream *stream = params->stream; - GstClockTime stream_time; - GstEvent *event; - - /* We return timestamps in stream time, i.e. relative to the start of the - * file (or other medium), but gst_event_new_qos() expects the timestamp in - * running time. */ -- stream_time = gst_segment_to_running_time(&stream->segment, GST_FORMAT_TIME, params->timestamp * 100); -+ stream_time = gst_segment_to_running_time(&stream->segment, GST_FORMAT_TIME, timestamp * 100); - if (stream_time == -1) - { - /* This can happen legitimately if the sample falls outside of the - * segment bounds. GStreamer elements shouldn't present the sample in - * that case, but DirectShow doesn't care. */ - GST_LOG("Ignoring QoS event.\n"); -- return S_OK; -+ return; - } - -- if (!(event = gst_event_new_qos(params->underflow ? GST_QOS_TYPE_UNDERFLOW : GST_QOS_TYPE_OVERFLOW, -- params->proportion, params->diff * 100, stream_time))) -+ if (!(event = gst_event_new_qos(underflow ? GST_QOS_TYPE_UNDERFLOW : GST_QOS_TYPE_OVERFLOW, -+ proportion, diff * 100, stream_time))) - GST_ERROR("Failed to create QOS event.\n"); - gst_pad_push_event(stream->my_sink, event); -- -- return S_OK; - } - - static GstAutoplugSelectResult autoplug_select_cb(GstElement *bin, GstPad *pad, -@@ -1575,16 +1527,14 @@ static gboolean src_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) - return ret; - } - --static NTSTATUS wg_parser_connect(void *args) -+static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_size) - { - GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE("quartz_src", - GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); -- const struct wg_parser_connect_params *params = args; -- struct wg_parser *parser = params->parser; - unsigned int i; - int ret; - -- parser->file_size = params->file_size; -+ parser->file_size = file_size; - parser->sink_connected = true; - - if (!parser->bus) -@@ -1734,9 +1684,8 @@ out: - return E_FAIL; - } - --static NTSTATUS wg_parser_disconnect(void *args) -+static void CDECL wg_parser_disconnect(struct wg_parser *parser) - { -- struct wg_parser *parser = args; - unsigned int i; - - /* Unblock all of our streams. */ -@@ -1769,8 +1718,6 @@ static NTSTATUS wg_parser_disconnect(void *args) - gst_element_set_bus(parser->container, NULL); - gst_object_unref(parser->container); - parser->container = NULL; -- -- return S_OK; - } - - static BOOL decodebin_parser_init_gst(struct wg_parser *parser) -@@ -1931,7 +1878,7 @@ static void init_gstreamer_once(void) - gst_version_string(), GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_VERSION_MICRO); - } - --static NTSTATUS wg_parser_create(void *args) -+static struct wg_parser * CDECL wg_parser_create(enum wg_parser_type type, bool unlimited_buffering) - { - static const init_gst_cb init_funcs[] = - { -@@ -1942,32 +1889,28 @@ static NTSTATUS wg_parser_create(void *args) - }; - - static pthread_once_t once = PTHREAD_ONCE_INIT; -- struct wg_parser_create_params *params = args; - struct wg_parser *parser; - - if (pthread_once(&once, init_gstreamer_once)) -- return E_FAIL; -+ return NULL; - - if (!(parser = calloc(1, sizeof(*parser)))) -- return E_OUTOFMEMORY; -+ return NULL; - - pthread_mutex_init(&parser->mutex, NULL); - pthread_cond_init(&parser->init_cond, NULL); - pthread_cond_init(&parser->read_cond, NULL); - pthread_cond_init(&parser->read_done_cond, NULL); - parser->flushing = true; -- parser->init_gst = init_funcs[params->type]; -- parser->unlimited_buffering = params->unlimited_buffering; -+ parser->init_gst = init_funcs[type]; -+ parser->unlimited_buffering = unlimited_buffering; - - GST_DEBUG("Created winegstreamer parser %p.\n", parser); -- params->parser = parser; -- return S_OK; -+ return parser; - } - --static NTSTATUS wg_parser_destroy(void *args) -+static void CDECL wg_parser_destroy(struct wg_parser *parser) - { -- struct wg_parser *parser = args; -- - if (parser->bus) - { - gst_bus_set_sync_handler(parser->bus, NULL, NULL, NULL); -@@ -1980,36 +1923,41 @@ static NTSTATUS wg_parser_destroy(void *args) - pthread_cond_destroy(&parser->read_done_cond); - - free(parser); -- return S_OK; - } - --const unixlib_entry_t __wine_unix_call_funcs[] = -+static const struct unix_funcs funcs = - { --#define X(name) [unix_ ## name] = name -- X(wg_parser_create), -- X(wg_parser_destroy), -+ wg_parser_create, -+ wg_parser_destroy, - -- X(wg_parser_connect), -- X(wg_parser_disconnect), -+ wg_parser_connect, -+ wg_parser_disconnect, - -- X(wg_parser_begin_flush), -- X(wg_parser_end_flush), -+ wg_parser_begin_flush, -+ wg_parser_end_flush, - -- X(wg_parser_get_next_read_offset), -- X(wg_parser_push_data), -+ wg_parser_get_next_read_offset, -+ wg_parser_push_data, - -- X(wg_parser_get_stream_count), -- X(wg_parser_get_stream), -+ wg_parser_get_stream_count, -+ wg_parser_get_stream, - -- X(wg_parser_stream_get_preferred_format), -- X(wg_parser_stream_enable), -- X(wg_parser_stream_disable), -+ wg_parser_stream_get_preferred_format, -+ wg_parser_stream_enable, -+ wg_parser_stream_disable, - -- X(wg_parser_stream_get_event), -- X(wg_parser_stream_copy_buffer), -- X(wg_parser_stream_release_buffer), -- X(wg_parser_stream_notify_qos), -+ wg_parser_stream_get_event, -+ wg_parser_stream_copy_buffer, -+ wg_parser_stream_release_buffer, -+ wg_parser_stream_notify_qos, - -- X(wg_parser_stream_get_duration), -- X(wg_parser_stream_seek), -+ wg_parser_stream_get_duration, -+ wg_parser_stream_seek, - }; -+ -+NTSTATUS CDECL __wine_init_unix_lib(HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out) -+{ -+ if (reason == DLL_PROCESS_ATTACH) -+ *(const struct unix_funcs **)ptr_out = &funcs; -+ return STATUS_SUCCESS; -+} --- -2.33.0 - diff --git a/patches/mfplat-reverts/0012-Revert-winegstreamer-Return-void-from-wg_parser_stre.patch b/patches/mfplat-reverts/0012-Revert-winegstreamer-Return-void-from-wg_parser_stre.patch deleted file mode 100644 index 73f36c56..00000000 --- a/patches/mfplat-reverts/0012-Revert-winegstreamer-Return-void-from-wg_parser_stre.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 3753c3b6c8c99a664430805c3e7bd7273064f379 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Wed, 6 Oct 2021 08:38:12 +1100 -Subject: [PATCH 12/22] Revert "winegstreamer: Return void from - wg_parser_stream_seek()." - -This reverts commit 494039d0d0df8fd5b2b3442caac7bd6c0c7433c0. ---- - dlls/winegstreamer/quartz_parser.c | 12 +++++++++--- - dlls/winegstreamer/unixlib.h | 2 +- - dlls/winegstreamer/wg_parser.c | 7 +++---- - 3 files changed, 13 insertions(+), 8 deletions(-) - -diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c -index 5dd232ea0da..a1fa7daec6f 100644 ---- a/dlls/winegstreamer/quartz_parser.c -+++ b/dlls/winegstreamer/quartz_parser.c -@@ -1233,6 +1233,7 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface, - { - struct parser_source *pin = impl_from_IMediaSeeking(iface); - struct parser *filter = impl_from_strmbase_filter(pin->pin.pin.filter); -+ HRESULT hr = S_OK; - int i; - - TRACE("pin %p, current %s, current_flags %#x, stop %s, stop_flags %#x.\n", -@@ -1269,8 +1270,13 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface, - - SourceSeekingImpl_SetPositions(iface, current, current_flags, stop, stop_flags); - -- unix_funcs->wg_parser_stream_seek(pin->wg_stream, pin->seek.dRate, -- pin->seek.llCurrent, pin->seek.llStop, current_flags, stop_flags); -+ if (!unix_funcs->wg_parser_stream_seek(pin->wg_stream, pin->seek.dRate, -+ pin->seek.llCurrent, pin->seek.llStop, current_flags, stop_flags)) -+ { -+ ERR("Failed to seek (current %s, stop %s).\n", -+ debugstr_time(pin->seek.llCurrent), debugstr_time(pin->seek.llStop)); -+ hr = E_FAIL; -+ } - - if (!(current_flags & AM_SEEKING_NoFlush)) - { -@@ -1293,7 +1299,7 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface, - LeaveCriticalSection(&pin->flushing_cs); - } - -- return S_OK; -+ return hr; - } - - static const IMediaSeekingVtbl GST_Seeking_Vtbl = -diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h -index dade020916a..e917f7b5557 100644 ---- a/dlls/winegstreamer/unixlib.h -+++ b/dlls/winegstreamer/unixlib.h -@@ -158,7 +158,7 @@ struct unix_funcs - /* Returns the duration in 100-nanosecond units. */ - uint64_t (CDECL *wg_parser_stream_get_duration)(struct wg_parser_stream *stream); - /* start_pos and stop_pos are in 100-nanosecond units. */ -- void (CDECL *wg_parser_stream_seek)(struct wg_parser_stream *stream, double rate, -+ bool (CDECL *wg_parser_stream_seek)(struct wg_parser_stream *stream, double rate, - uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags); - }; - -diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 694f8b57ed1..b89a50b5d8f 100644 ---- a/dlls/winegstreamer/wg_parser.c -+++ b/dlls/winegstreamer/wg_parser.c -@@ -686,7 +686,7 @@ static uint64_t CDECL wg_parser_stream_get_duration(struct wg_parser_stream *str - return stream->duration; - } - --static void CDECL wg_parser_stream_seek(struct wg_parser_stream *stream, double rate, -+static bool CDECL wg_parser_stream_seek(struct wg_parser_stream *stream, double rate, - uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags) - { - GstSeekType start_type = GST_SEEK_TYPE_SET, stop_type = GST_SEEK_TYPE_SET; -@@ -704,9 +704,8 @@ static void CDECL wg_parser_stream_seek(struct wg_parser_stream *stream, double - if ((stop_flags & AM_SEEKING_PositioningBitsMask) == AM_SEEKING_NoPositioning) - stop_type = GST_SEEK_TYPE_NONE; - -- if (!gst_pad_push_event(stream->my_sink, gst_event_new_seek(rate, GST_FORMAT_TIME, -- flags, start_type, start_pos * 100, stop_type, stop_pos * 100))) -- GST_ERROR("Failed to seek.\n"); -+ return gst_pad_push_event(stream->my_sink, gst_event_new_seek(rate, -+ GST_FORMAT_TIME, flags, start_type, start_pos * 100, stop_type, stop_pos * 100)); - } - - static void CDECL wg_parser_stream_notify_qos(struct wg_parser_stream *stream, --- -2.33.0 - diff --git a/patches/mfplat-reverts/0013-Revert-winegstreamer-Move-Unix-library-definitions-i.patch b/patches/mfplat-reverts/0013-Revert-winegstreamer-Move-Unix-library-definitions-i.patch deleted file mode 100644 index e5144539..00000000 --- a/patches/mfplat-reverts/0013-Revert-winegstreamer-Move-Unix-library-definitions-i.patch +++ /dev/null @@ -1,382 +0,0 @@ -From 79181b01cb2cb9c6cafd3ea08920e892e37cd654 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Wed, 6 Oct 2021 08:38:12 +1100 -Subject: [PATCH 13/22] Revert "winegstreamer: Move Unix library definitions - into a separate header." - -This reverts commit 84b870bb1fcac27288ed70d28de6a1c2649e9fe6. ---- - dlls/winegstreamer/gst_private.h | 137 ++++++++++++++++++++++++- - dlls/winegstreamer/unixlib.h | 165 ------------------------------- - dlls/winegstreamer/wg_parser.c | 17 +--- - 3 files changed, 140 insertions(+), 179 deletions(-) - delete mode 100644 dlls/winegstreamer/unixlib.h - -diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index 91c646571cf..3470f7870fa 100644 ---- a/dlls/winegstreamer/gst_private.h -+++ b/dlls/winegstreamer/gst_private.h -@@ -36,8 +36,6 @@ - #include "wine/debug.h" - #include "wine/strmbase.h" - --#include "unixlib.h" -- - static inline const char *debugstr_time(REFERENCE_TIME time) - { - ULONGLONG abstime = time >= 0 ? time : -time; -@@ -61,6 +59,141 @@ static inline const char *debugstr_time(REFERENCE_TIME time) - - #define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000) - -+struct wg_format -+{ -+ enum wg_major_type -+ { -+ WG_MAJOR_TYPE_UNKNOWN, -+ WG_MAJOR_TYPE_VIDEO, -+ WG_MAJOR_TYPE_AUDIO, -+ } major_type; -+ -+ union -+ { -+ struct -+ { -+ enum wg_video_format -+ { -+ WG_VIDEO_FORMAT_UNKNOWN, -+ -+ WG_VIDEO_FORMAT_BGRA, -+ WG_VIDEO_FORMAT_BGRx, -+ WG_VIDEO_FORMAT_BGR, -+ WG_VIDEO_FORMAT_RGB15, -+ WG_VIDEO_FORMAT_RGB16, -+ -+ WG_VIDEO_FORMAT_AYUV, -+ WG_VIDEO_FORMAT_I420, -+ WG_VIDEO_FORMAT_NV12, -+ WG_VIDEO_FORMAT_UYVY, -+ WG_VIDEO_FORMAT_YUY2, -+ WG_VIDEO_FORMAT_YV12, -+ WG_VIDEO_FORMAT_YVYU, -+ -+ WG_VIDEO_FORMAT_CINEPAK, -+ } format; -+ uint32_t width, height; -+ uint32_t fps_n, fps_d; -+ } video; -+ struct -+ { -+ enum wg_audio_format -+ { -+ WG_AUDIO_FORMAT_UNKNOWN, -+ -+ WG_AUDIO_FORMAT_U8, -+ WG_AUDIO_FORMAT_S16LE, -+ WG_AUDIO_FORMAT_S24LE, -+ WG_AUDIO_FORMAT_S32LE, -+ WG_AUDIO_FORMAT_F32LE, -+ WG_AUDIO_FORMAT_F64LE, -+ -+ WG_AUDIO_FORMAT_MPEG1_LAYER1, -+ WG_AUDIO_FORMAT_MPEG1_LAYER2, -+ WG_AUDIO_FORMAT_MPEG1_LAYER3, -+ } format; -+ -+ uint32_t channels; -+ uint32_t channel_mask; /* In WinMM format. */ -+ uint32_t rate; -+ } audio; -+ } u; -+}; -+ -+enum wg_parser_event_type -+{ -+ WG_PARSER_EVENT_NONE = 0, -+ WG_PARSER_EVENT_BUFFER, -+ WG_PARSER_EVENT_EOS, -+ WG_PARSER_EVENT_SEGMENT, -+}; -+ -+struct wg_parser_event -+{ -+ enum wg_parser_event_type type; -+ union -+ { -+ struct -+ { -+ /* pts and duration are in 100-nanosecond units. */ -+ ULONGLONG pts, duration; -+ uint32_t size; -+ bool discontinuity, preroll, delta, has_pts, has_duration; -+ } buffer; -+ struct -+ { -+ ULONGLONG position, stop; -+ DOUBLE rate; -+ } segment; -+ } u; -+}; -+C_ASSERT(sizeof(struct wg_parser_event) == 40); -+ -+enum wg_parser_type -+{ -+ WG_PARSER_DECODEBIN, -+ WG_PARSER_AVIDEMUX, -+ WG_PARSER_MPEGAUDIOPARSE, -+ WG_PARSER_WAVPARSE, -+}; -+ -+struct unix_funcs -+{ -+ struct wg_parser *(CDECL *wg_parser_create)(enum wg_parser_type type, bool unlimited_buffering); -+ void (CDECL *wg_parser_destroy)(struct wg_parser *parser); -+ -+ HRESULT (CDECL *wg_parser_connect)(struct wg_parser *parser, uint64_t file_size); -+ void (CDECL *wg_parser_disconnect)(struct wg_parser *parser); -+ -+ void (CDECL *wg_parser_begin_flush)(struct wg_parser *parser); -+ void (CDECL *wg_parser_end_flush)(struct wg_parser *parser); -+ -+ bool (CDECL *wg_parser_get_next_read_offset)(struct wg_parser *parser, -+ uint64_t *offset, uint32_t *size); -+ void (CDECL *wg_parser_push_data)(struct wg_parser *parser, -+ const void *data, uint32_t size); -+ -+ uint32_t (CDECL *wg_parser_get_stream_count)(struct wg_parser *parser); -+ struct wg_parser_stream *(CDECL *wg_parser_get_stream)(struct wg_parser *parser, uint32_t index); -+ -+ void (CDECL *wg_parser_stream_get_preferred_format)(struct wg_parser_stream *stream, struct wg_format *format); -+ void (CDECL *wg_parser_stream_enable)(struct wg_parser_stream *stream, const struct wg_format *format); -+ void (CDECL *wg_parser_stream_disable)(struct wg_parser_stream *stream); -+ -+ bool (CDECL *wg_parser_stream_get_event)(struct wg_parser_stream *stream, struct wg_parser_event *event); -+ bool (CDECL *wg_parser_stream_copy_buffer)(struct wg_parser_stream *stream, -+ void *data, uint32_t offset, uint32_t size); -+ void (CDECL *wg_parser_stream_release_buffer)(struct wg_parser_stream *stream); -+ void (CDECL *wg_parser_stream_notify_qos)(struct wg_parser_stream *stream, -+ bool underflow, double proportion, int64_t diff, uint64_t timestamp); -+ -+ /* Returns the duration in 100-nanosecond units. */ -+ uint64_t (CDECL *wg_parser_stream_get_duration)(struct wg_parser_stream *stream); -+ /* start_pos and stop_pos are in 100-nanosecond units. */ -+ bool (CDECL *wg_parser_stream_seek)(struct wg_parser_stream *stream, double rate, -+ uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags); -+}; -+ - extern const struct unix_funcs *unix_funcs; - - HRESULT avi_splitter_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; -diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h -deleted file mode 100644 -index e917f7b5557..00000000000 ---- a/dlls/winegstreamer/unixlib.h -+++ /dev/null -@@ -1,165 +0,0 @@ --/* -- * winegstreamer Unix library interface -- * -- * Copyright 2020-2021 Zebediah Figura for CodeWeavers -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 2.1 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU Lesser General Public -- * License along with this library; if not, write to the Free Software -- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA -- */ -- --#ifndef __WINE_WINEGSTREAMER_UNIXLIB_H --#define __WINE_WINEGSTREAMER_UNIXLIB_H -- --#include --#include --#include "windef.h" --#include "wtypes.h" --#include "mmreg.h" -- --struct wg_format --{ -- enum wg_major_type -- { -- WG_MAJOR_TYPE_UNKNOWN, -- WG_MAJOR_TYPE_VIDEO, -- WG_MAJOR_TYPE_AUDIO, -- } major_type; -- -- union -- { -- struct -- { -- enum wg_video_format -- { -- WG_VIDEO_FORMAT_UNKNOWN, -- -- WG_VIDEO_FORMAT_BGRA, -- WG_VIDEO_FORMAT_BGRx, -- WG_VIDEO_FORMAT_BGR, -- WG_VIDEO_FORMAT_RGB15, -- WG_VIDEO_FORMAT_RGB16, -- -- WG_VIDEO_FORMAT_AYUV, -- WG_VIDEO_FORMAT_I420, -- WG_VIDEO_FORMAT_NV12, -- WG_VIDEO_FORMAT_UYVY, -- WG_VIDEO_FORMAT_YUY2, -- WG_VIDEO_FORMAT_YV12, -- WG_VIDEO_FORMAT_YVYU, -- -- WG_VIDEO_FORMAT_CINEPAK, -- } format; -- uint32_t width, height; -- uint32_t fps_n, fps_d; -- } video; -- struct -- { -- enum wg_audio_format -- { -- WG_AUDIO_FORMAT_UNKNOWN, -- -- WG_AUDIO_FORMAT_U8, -- WG_AUDIO_FORMAT_S16LE, -- WG_AUDIO_FORMAT_S24LE, -- WG_AUDIO_FORMAT_S32LE, -- WG_AUDIO_FORMAT_F32LE, -- WG_AUDIO_FORMAT_F64LE, -- -- WG_AUDIO_FORMAT_MPEG1_LAYER1, -- WG_AUDIO_FORMAT_MPEG1_LAYER2, -- WG_AUDIO_FORMAT_MPEG1_LAYER3, -- } format; -- -- uint32_t channels; -- uint32_t channel_mask; /* In WinMM format. */ -- uint32_t rate; -- } audio; -- } u; --}; -- --enum wg_parser_event_type --{ -- WG_PARSER_EVENT_NONE = 0, -- WG_PARSER_EVENT_BUFFER, -- WG_PARSER_EVENT_EOS, -- WG_PARSER_EVENT_SEGMENT, --}; -- --struct wg_parser_event --{ -- enum wg_parser_event_type type; -- union -- { -- struct -- { -- /* pts and duration are in 100-nanosecond units. */ -- ULONGLONG pts, duration; -- uint32_t size; -- bool discontinuity, preroll, delta, has_pts, has_duration; -- } buffer; -- struct -- { -- ULONGLONG position, stop; -- DOUBLE rate; -- } segment; -- } u; --}; --C_ASSERT(sizeof(struct wg_parser_event) == 40); -- --enum wg_parser_type --{ -- WG_PARSER_DECODEBIN, -- WG_PARSER_AVIDEMUX, -- WG_PARSER_MPEGAUDIOPARSE, -- WG_PARSER_WAVPARSE, --}; -- --struct unix_funcs --{ -- struct wg_parser *(CDECL *wg_parser_create)(enum wg_parser_type type, bool unlimited_buffering); -- void (CDECL *wg_parser_destroy)(struct wg_parser *parser); -- -- HRESULT (CDECL *wg_parser_connect)(struct wg_parser *parser, uint64_t file_size); -- void (CDECL *wg_parser_disconnect)(struct wg_parser *parser); -- -- void (CDECL *wg_parser_begin_flush)(struct wg_parser *parser); -- void (CDECL *wg_parser_end_flush)(struct wg_parser *parser); -- -- bool (CDECL *wg_parser_get_next_read_offset)(struct wg_parser *parser, -- uint64_t *offset, uint32_t *size); -- void (CDECL *wg_parser_push_data)(struct wg_parser *parser, -- const void *data, uint32_t size); -- -- uint32_t (CDECL *wg_parser_get_stream_count)(struct wg_parser *parser); -- struct wg_parser_stream *(CDECL *wg_parser_get_stream)(struct wg_parser *parser, uint32_t index); -- -- void (CDECL *wg_parser_stream_get_preferred_format)(struct wg_parser_stream *stream, struct wg_format *format); -- void (CDECL *wg_parser_stream_enable)(struct wg_parser_stream *stream, const struct wg_format *format); -- void (CDECL *wg_parser_stream_disable)(struct wg_parser_stream *stream); -- -- bool (CDECL *wg_parser_stream_get_event)(struct wg_parser_stream *stream, struct wg_parser_event *event); -- bool (CDECL *wg_parser_stream_copy_buffer)(struct wg_parser_stream *stream, -- void *data, uint32_t offset, uint32_t size); -- void (CDECL *wg_parser_stream_release_buffer)(struct wg_parser_stream *stream); -- void (CDECL *wg_parser_stream_notify_qos)(struct wg_parser_stream *stream, -- bool underflow, double proportion, int64_t diff, uint64_t timestamp); -- -- /* Returns the duration in 100-nanosecond units. */ -- uint64_t (CDECL *wg_parser_stream_get_duration)(struct wg_parser_stream *stream); -- /* start_pos and stop_pos are in 100-nanosecond units. */ -- bool (CDECL *wg_parser_stream_seek)(struct wg_parser_stream *stream, double rate, -- uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags); --}; -- --#endif /* __WINE_WINEGSTREAMER_UNIXLIB_H */ -diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index b89a50b5d8f..21278682318 100644 ---- a/dlls/winegstreamer/wg_parser.c -+++ b/dlls/winegstreamer/wg_parser.c -@@ -25,21 +25,14 @@ - #endif - - #include "config.h" -- --#include --#include --#include -- --#include --#include --#include -- - #include "ntstatus.h" - #define WIN32_NO_STATUS -+#include "gst_private.h" - #include "winternl.h" --#include "dshow.h" - --#include "unixlib.h" -+#include -+#include -+#include - - typedef enum - { -@@ -1866,7 +1859,7 @@ static void init_gstreamer_once(void) - - if (!gst_init_check(&argc, &argv, &err)) - { -- fprintf(stderr, "winegstreamer: failed to initialize GStreamer: %s\n", err->message); -+ fprintf(stderr, "winegstreamer: failed to initialize GStreamer: %s\n", debugstr_a(err->message)); - g_error_free(err); - return; - } --- -2.33.0 - diff --git a/patches/mfplat-reverts/0014-Revert-winegstreamer-Remove-the-no-longer-used-start.patch b/patches/mfplat-reverts/0014-Revert-winegstreamer-Remove-the-no-longer-used-start.patch deleted file mode 100644 index e68a37b3..00000000 --- a/patches/mfplat-reverts/0014-Revert-winegstreamer-Remove-the-no-longer-used-start.patch +++ /dev/null @@ -1,27 +0,0 @@ -From d4afee5c3a6b8875563c3f931e3eaff3e55b87dc Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sat, 2 Oct 2021 10:35:45 +1000 -Subject: [PATCH 14/22] Revert "winegstreamer: Remove the no longer used - start_dispatch_thread() declaration." - -This reverts commit a87abdbe85779adf6a2a7897bd88984587880693. ---- - dlls/winegstreamer/gst_private.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index 3470f7870fa..3b477ba254a 100644 ---- a/dlls/winegstreamer/gst_private.h -+++ b/dlls/winegstreamer/gst_private.h -@@ -203,6 +203,8 @@ HRESULT wave_parser_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; - - BOOL init_gstreamer(void) DECLSPEC_HIDDEN; - -+void start_dispatch_thread(void) DECLSPEC_HIDDEN; -+ - extern HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj) DECLSPEC_HIDDEN; - extern HRESULT mfplat_DllRegisterServer(void) DECLSPEC_HIDDEN; - --- -2.33.0 - diff --git a/patches/mfplat-reverts/0015-Revert-winegstreamer-Set-unlimited-buffering-using-a.patch b/patches/mfplat-reverts/0015-Revert-winegstreamer-Set-unlimited-buffering-using-a.patch deleted file mode 100644 index 8a0a979b..00000000 --- a/patches/mfplat-reverts/0015-Revert-winegstreamer-Set-unlimited-buffering-using-a.patch +++ /dev/null @@ -1,180 +0,0 @@ -From 421567d9cdd09b1d9db8410160ac1c106a05f2f9 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sat, 2 Oct 2021 10:35:46 +1000 -Subject: [PATCH 15/22] Revert "winegstreamer: Set unlimited buffering using a - flag for wg_parser_create()." - -This reverts commit 45690320f933d68f613f95f0330098426fc5a08f. ---- - dlls/winegstreamer/gst_private.h | 4 +++- - dlls/winegstreamer/media_source.c | 16 +++++++++------- - dlls/winegstreamer/quartz_parser.c | 8 ++++---- - dlls/winegstreamer/wg_parser.c | 21 ++++++++++----------- - 4 files changed, 26 insertions(+), 23 deletions(-) - -diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index 3b477ba254a..9e5de174984 100644 ---- a/dlls/winegstreamer/gst_private.h -+++ b/dlls/winegstreamer/gst_private.h -@@ -159,7 +159,7 @@ enum wg_parser_type - - struct unix_funcs - { -- struct wg_parser *(CDECL *wg_parser_create)(enum wg_parser_type type, bool unlimited_buffering); -+ struct wg_parser *(CDECL *wg_parser_create)(enum wg_parser_type type); - void (CDECL *wg_parser_destroy)(struct wg_parser *parser); - - HRESULT (CDECL *wg_parser_connect)(struct wg_parser *parser, uint64_t file_size); -@@ -173,6 +173,8 @@ struct unix_funcs - void (CDECL *wg_parser_push_data)(struct wg_parser *parser, - const void *data, uint32_t size); - -+ void (CDECL *wg_parser_set_unlimited_buffering)(struct wg_parser *parser); -+ - uint32_t (CDECL *wg_parser_get_stream_count)(struct wg_parser *parser); - struct wg_parser_stream *(CDECL *wg_parser_get_stream)(struct wg_parser *parser, uint32_t index); - -diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index 18bffca1362..e1e6cdbceb1 100644 ---- a/dlls/winegstreamer/media_source.c -+++ b/dlls/winegstreamer/media_source.c -@@ -1421,13 +1421,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ - if (FAILED(hr = MFAllocateWorkQueue(&object->async_commands_queue))) - goto fail; - -- /* In Media Foundation, sources may read from any media source stream -- * without fear of blocking due to buffering limits on another. Trailmakers, -- * a Unity3D Engine game, only reads one sample from the audio stream (and -- * never deselects it). Remove buffering limits from decodebin in order to -- * account for this. Note that this does leak memory, but the same memory -- * leak occurs with native. */ -- if (!(parser = unix_funcs->wg_parser_create(WG_PARSER_DECODEBIN, true))) -+ if (!(parser = unix_funcs->wg_parser_create(WG_PARSER_DECODEBIN))) - { - hr = E_OUTOFMEMORY; - goto fail; -@@ -1441,6 +1435,14 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ - if (FAILED(hr = unix_funcs->wg_parser_connect(parser, file_size))) - goto fail; - -+ /* In Media Foundation, sources may read from any media source stream -+ * without fear of blocking due to buffering limits on another. Trailmakers, -+ * a Unity3D Engine game, only reads one sample from the audio stream (and -+ * never deselects it). Remove buffering limits from decodebin in order to -+ * account for this. Note that this does leak memory, but the same memory -+ * leak occurs with native. */ -+ unix_funcs->wg_parser_set_unlimited_buffering(parser); -+ - stream_count = unix_funcs->wg_parser_get_stream_count(parser); - - if (!(object->streams = calloc(stream_count, sizeof(*object->streams)))) -diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c -index a1fa7daec6f..f532b8969de 100644 ---- a/dlls/winegstreamer/quartz_parser.c -+++ b/dlls/winegstreamer/quartz_parser.c -@@ -1115,7 +1115,7 @@ HRESULT decodebin_parser_create(IUnknown *outer, IUnknown **out) - if (!(object = calloc(1, sizeof(*object)))) - return E_OUTOFMEMORY; - -- if (!(object->wg_parser = unix_funcs->wg_parser_create(WG_PARSER_DECODEBIN, false))) -+ if (!(object->wg_parser = unix_funcs->wg_parser_create(WG_PARSER_DECODEBIN))) - { - free(object); - return E_OUTOFMEMORY; -@@ -1646,7 +1646,7 @@ HRESULT wave_parser_create(IUnknown *outer, IUnknown **out) - if (!(object = calloc(1, sizeof(*object)))) - return E_OUTOFMEMORY; - -- if (!(object->wg_parser = unix_funcs->wg_parser_create(WG_PARSER_WAVPARSE, false))) -+ if (!(object->wg_parser = unix_funcs->wg_parser_create(WG_PARSER_WAVPARSE))) - { - free(object); - return E_OUTOFMEMORY; -@@ -1732,7 +1732,7 @@ HRESULT avi_splitter_create(IUnknown *outer, IUnknown **out) - if (!(object = calloc(1, sizeof(*object)))) - return E_OUTOFMEMORY; - -- if (!(object->wg_parser = unix_funcs->wg_parser_create(WG_PARSER_AVIDEMUX, false))) -+ if (!(object->wg_parser = unix_funcs->wg_parser_create(WG_PARSER_AVIDEMUX))) - { - free(object); - return E_OUTOFMEMORY; -@@ -1839,7 +1839,7 @@ HRESULT mpeg_splitter_create(IUnknown *outer, IUnknown **out) - if (!(object = calloc(1, sizeof(*object)))) - return E_OUTOFMEMORY; - -- if (!(object->wg_parser = unix_funcs->wg_parser_create(WG_PARSER_MPEGAUDIOPARSE, false))) -+ if (!(object->wg_parser = unix_funcs->wg_parser_create(WG_PARSER_MPEGAUDIOPARSE))) - { - free(object); - return E_OUTOFMEMORY; -diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 21278682318..f27ad84df17 100644 ---- a/dlls/winegstreamer/wg_parser.c -+++ b/dlls/winegstreamer/wg_parser.c -@@ -83,8 +83,6 @@ struct wg_parser - } read_request; - - bool flushing, sink_connected; -- -- bool unlimited_buffering; - }; - - struct wg_parser_stream -@@ -563,6 +561,13 @@ static void CDECL wg_parser_push_data(struct wg_parser *parser, - pthread_cond_signal(&parser->read_done_cond); - } - -+static void CDECL wg_parser_set_unlimited_buffering(struct wg_parser *parser) -+{ -+ g_object_set(parser->decodebin, "max-size-buffers", G_MAXUINT, NULL); -+ g_object_set(parser->decodebin, "max-size-time", G_MAXUINT64, NULL); -+ g_object_set(parser->decodebin, "max-size-bytes", G_MAXUINT, NULL); -+} -+ - static void CDECL wg_parser_stream_get_preferred_format(struct wg_parser_stream *stream, struct wg_format *format) - { - *format = stream->preferred_format; -@@ -1723,13 +1728,6 @@ static BOOL decodebin_parser_init_gst(struct wg_parser *parser) - gst_bin_add(GST_BIN(parser->container), element); - parser->decodebin = element; - -- if (parser->unlimited_buffering) -- { -- g_object_set(parser->decodebin, "max-size-buffers", G_MAXUINT, NULL); -- g_object_set(parser->decodebin, "max-size-time", G_MAXUINT64, NULL); -- g_object_set(parser->decodebin, "max-size-bytes", G_MAXUINT, NULL); -- } -- - g_signal_connect(element, "pad-added", G_CALLBACK(pad_added_cb), parser); - g_signal_connect(element, "pad-removed", G_CALLBACK(pad_removed_cb), parser); - g_signal_connect(element, "autoplug-select", G_CALLBACK(autoplug_select_cb), parser); -@@ -1870,7 +1868,7 @@ static void init_gstreamer_once(void) - gst_version_string(), GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_VERSION_MICRO); - } - --static struct wg_parser * CDECL wg_parser_create(enum wg_parser_type type, bool unlimited_buffering) -+static struct wg_parser * CDECL wg_parser_create(enum wg_parser_type type) - { - static const init_gst_cb init_funcs[] = - { -@@ -1895,7 +1893,6 @@ static struct wg_parser * CDECL wg_parser_create(enum wg_parser_type type, bool - pthread_cond_init(&parser->read_done_cond, NULL); - parser->flushing = true; - parser->init_gst = init_funcs[type]; -- parser->unlimited_buffering = unlimited_buffering; - - GST_DEBUG("Created winegstreamer parser %p.\n", parser); - return parser; -@@ -1931,6 +1928,8 @@ static const struct unix_funcs funcs = - wg_parser_get_next_read_offset, - wg_parser_push_data, - -+ wg_parser_set_unlimited_buffering, -+ - wg_parser_get_stream_count, - wg_parser_get_stream, - --- -2.33.0 - diff --git a/patches/mfplat-reverts/0016-Revert-winegstreamer-Initialize-GStreamer-in-wg_pars.patch b/patches/mfplat-reverts/0016-Revert-winegstreamer-Initialize-GStreamer-in-wg_pars.patch deleted file mode 100644 index e389b122..00000000 --- a/patches/mfplat-reverts/0016-Revert-winegstreamer-Initialize-GStreamer-in-wg_pars.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 1dd81b5b288ffe70164d06548cfcee61089ca0fd Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sat, 2 Oct 2021 10:35:47 +1000 -Subject: [PATCH 16/22] Revert "winegstreamer: Initialize GStreamer in - wg_parser_create()." - -This reverts commit 3643f73ab61f05ddc9a637f8613c933dda0dd232. ---- - dlls/winegstreamer/wg_parser.c | 47 +++++++++++++++------------------- - 1 file changed, 21 insertions(+), 26 deletions(-) - -diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index f27ad84df17..e1127b9a059 100644 ---- a/dlls/winegstreamer/wg_parser.c -+++ b/dlls/winegstreamer/wg_parser.c -@@ -1846,28 +1846,6 @@ static BOOL wave_parser_init_gst(struct wg_parser *parser) - return TRUE; - } - --static void init_gstreamer_once(void) --{ -- char arg0[] = "wine"; -- char arg1[] = "--gst-disable-registry-fork"; -- char *args[] = {arg0, arg1, NULL}; -- int argc = ARRAY_SIZE(args) - 1; -- char **argv = args; -- GError *err; -- -- if (!gst_init_check(&argc, &argv, &err)) -- { -- fprintf(stderr, "winegstreamer: failed to initialize GStreamer: %s\n", debugstr_a(err->message)); -- g_error_free(err); -- return; -- } -- -- GST_DEBUG_CATEGORY_INIT(wine, "WINE", GST_DEBUG_FG_RED, "Wine GStreamer support"); -- -- GST_INFO("GStreamer library version %s; wine built with %d.%d.%d.\n", -- gst_version_string(), GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_VERSION_MICRO); --} -- - static struct wg_parser * CDECL wg_parser_create(enum wg_parser_type type) - { - static const init_gst_cb init_funcs[] = -@@ -1878,12 +1856,8 @@ static struct wg_parser * CDECL wg_parser_create(enum wg_parser_type type) - [WG_PARSER_WAVPARSE] = wave_parser_init_gst, - }; - -- static pthread_once_t once = PTHREAD_ONCE_INIT; - struct wg_parser *parser; - -- if (pthread_once(&once, init_gstreamer_once)) -- return NULL; -- - if (!(parser = calloc(1, sizeof(*parser)))) - return NULL; - -@@ -1949,6 +1923,27 @@ static const struct unix_funcs funcs = - NTSTATUS CDECL __wine_init_unix_lib(HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out) - { - if (reason == DLL_PROCESS_ATTACH) -+ { -+ char arg0[] = "wine"; -+ char arg1[] = "--gst-disable-registry-fork"; -+ char *args[] = {arg0, arg1, NULL}; -+ int argc = ARRAY_SIZE(args) - 1; -+ char **argv = args; -+ GError *err; -+ -+ if (!gst_init_check(&argc, &argv, &err)) -+ { -+ fprintf(stderr, "winegstreamer: failed to initialize GStreamer: %s\n", debugstr_a(err->message)); -+ g_error_free(err); -+ return STATUS_UNSUCCESSFUL; -+ } -+ -+ GST_DEBUG_CATEGORY_INIT(wine, "WINE", GST_DEBUG_FG_RED, "Wine GStreamer support"); -+ -+ GST_INFO("GStreamer library version %s; wine built with %d.%d.%d.\n", -+ gst_version_string(), GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_VERSION_MICRO); -+ - *(const struct unix_funcs **)ptr_out = &funcs; -+ } - return STATUS_SUCCESS; - } --- -2.33.0 - diff --git a/patches/mfplat-reverts/0017-Revert-winegstreamer-Use-a-single-wg_parser_create-e.patch b/patches/mfplat-reverts/0017-Revert-winegstreamer-Use-a-single-wg_parser_create-e.patch deleted file mode 100644 index 9950c368..00000000 --- a/patches/mfplat-reverts/0017-Revert-winegstreamer-Use-a-single-wg_parser_create-e.patch +++ /dev/null @@ -1,192 +0,0 @@ -From cf1958f12f33ec46546cac81d958cf38bf9245dc Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sat, 2 Oct 2021 10:35:47 +1000 -Subject: [PATCH 17/22] Revert "winegstreamer: Use a single wg_parser_create() - entry point." - -This reverts commit eab189810d9c40c698bd049d9af647e195cd5993. ---- - dlls/winegstreamer/gst_private.h | 13 +++---- - dlls/winegstreamer/media_source.c | 2 +- - dlls/winegstreamer/quartz_parser.c | 8 ++--- - dlls/winegstreamer/wg_parser.c | 56 ++++++++++++++++++++++-------- - 4 files changed, 51 insertions(+), 28 deletions(-) - -diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index 9e5de174984..923bba25d38 100644 ---- a/dlls/winegstreamer/gst_private.h -+++ b/dlls/winegstreamer/gst_private.h -@@ -149,17 +149,12 @@ struct wg_parser_event - }; - C_ASSERT(sizeof(struct wg_parser_event) == 40); - --enum wg_parser_type --{ -- WG_PARSER_DECODEBIN, -- WG_PARSER_AVIDEMUX, -- WG_PARSER_MPEGAUDIOPARSE, -- WG_PARSER_WAVPARSE, --}; -- - struct unix_funcs - { -- struct wg_parser *(CDECL *wg_parser_create)(enum wg_parser_type type); -+ struct wg_parser *(CDECL *wg_decodebin_parser_create)(void); -+ struct wg_parser *(CDECL *wg_avi_parser_create)(void); -+ struct wg_parser *(CDECL *wg_mpeg_audio_parser_create)(void); -+ struct wg_parser *(CDECL *wg_wave_parser_create)(void); - void (CDECL *wg_parser_destroy)(struct wg_parser *parser); - - HRESULT (CDECL *wg_parser_connect)(struct wg_parser *parser, uint64_t file_size); -diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index e1e6cdbceb1..12ca14ca139 100644 ---- a/dlls/winegstreamer/media_source.c -+++ b/dlls/winegstreamer/media_source.c -@@ -1421,7 +1421,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ - if (FAILED(hr = MFAllocateWorkQueue(&object->async_commands_queue))) - goto fail; - -- if (!(parser = unix_funcs->wg_parser_create(WG_PARSER_DECODEBIN))) -+ if (!(parser = unix_funcs->wg_decodebin_parser_create())) - { - hr = E_OUTOFMEMORY; - goto fail; -diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c -index f532b8969de..a8e7e3d979f 100644 ---- a/dlls/winegstreamer/quartz_parser.c -+++ b/dlls/winegstreamer/quartz_parser.c -@@ -1115,7 +1115,7 @@ HRESULT decodebin_parser_create(IUnknown *outer, IUnknown **out) - if (!(object = calloc(1, sizeof(*object)))) - return E_OUTOFMEMORY; - -- if (!(object->wg_parser = unix_funcs->wg_parser_create(WG_PARSER_DECODEBIN))) -+ if (!(object->wg_parser = unix_funcs->wg_decodebin_parser_create())) - { - free(object); - return E_OUTOFMEMORY; -@@ -1646,7 +1646,7 @@ HRESULT wave_parser_create(IUnknown *outer, IUnknown **out) - if (!(object = calloc(1, sizeof(*object)))) - return E_OUTOFMEMORY; - -- if (!(object->wg_parser = unix_funcs->wg_parser_create(WG_PARSER_WAVPARSE))) -+ if (!(object->wg_parser = unix_funcs->wg_wave_parser_create())) - { - free(object); - return E_OUTOFMEMORY; -@@ -1732,7 +1732,7 @@ HRESULT avi_splitter_create(IUnknown *outer, IUnknown **out) - if (!(object = calloc(1, sizeof(*object)))) - return E_OUTOFMEMORY; - -- if (!(object->wg_parser = unix_funcs->wg_parser_create(WG_PARSER_AVIDEMUX))) -+ if (!(object->wg_parser = unix_funcs->wg_avi_parser_create())) - { - free(object); - return E_OUTOFMEMORY; -@@ -1839,7 +1839,7 @@ HRESULT mpeg_splitter_create(IUnknown *outer, IUnknown **out) - if (!(object = calloc(1, sizeof(*object)))) - return E_OUTOFMEMORY; - -- if (!(object->wg_parser = unix_funcs->wg_parser_create(WG_PARSER_MPEGAUDIOPARSE))) -+ if (!(object->wg_parser = unix_funcs->wg_mpeg_audio_parser_create())) - { - free(object); - return E_OUTOFMEMORY; -diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index e1127b9a059..dde137ef186 100644 ---- a/dlls/winegstreamer/wg_parser.c -+++ b/dlls/winegstreamer/wg_parser.c -@@ -49,11 +49,9 @@ typedef enum - GST_DEBUG_CATEGORY_STATIC(wine); - #define GST_CAT_DEFAULT wine - --typedef BOOL (*init_gst_cb)(struct wg_parser *parser); -- - struct wg_parser - { -- init_gst_cb init_gst; -+ BOOL (*init_gst)(struct wg_parser *parser); - - struct wg_parser_stream **streams; - unsigned int stream_count; -@@ -1846,16 +1844,8 @@ static BOOL wave_parser_init_gst(struct wg_parser *parser) - return TRUE; - } - --static struct wg_parser * CDECL wg_parser_create(enum wg_parser_type type) -+static struct wg_parser *wg_parser_create(void) - { -- static const init_gst_cb init_funcs[] = -- { -- [WG_PARSER_DECODEBIN] = decodebin_parser_init_gst, -- [WG_PARSER_AVIDEMUX] = avi_parser_init_gst, -- [WG_PARSER_MPEGAUDIOPARSE] = mpeg_audio_parser_init_gst, -- [WG_PARSER_WAVPARSE] = wave_parser_init_gst, -- }; -- - struct wg_parser *parser; - - if (!(parser = calloc(1, sizeof(*parser)))) -@@ -1866,12 +1856,47 @@ static struct wg_parser * CDECL wg_parser_create(enum wg_parser_type type) - pthread_cond_init(&parser->read_cond, NULL); - pthread_cond_init(&parser->read_done_cond, NULL); - parser->flushing = true; -- parser->init_gst = init_funcs[type]; - - GST_DEBUG("Created winegstreamer parser %p.\n", parser); - return parser; - } - -+static struct wg_parser * CDECL wg_decodebin_parser_create(void) -+{ -+ struct wg_parser *parser; -+ -+ if ((parser = wg_parser_create())) -+ parser->init_gst = decodebin_parser_init_gst; -+ return parser; -+} -+ -+static struct wg_parser * CDECL wg_avi_parser_create(void) -+{ -+ struct wg_parser *parser; -+ -+ if ((parser = wg_parser_create())) -+ parser->init_gst = avi_parser_init_gst; -+ return parser; -+} -+ -+static struct wg_parser * CDECL wg_mpeg_audio_parser_create(void) -+{ -+ struct wg_parser *parser; -+ -+ if ((parser = wg_parser_create())) -+ parser->init_gst = mpeg_audio_parser_init_gst; -+ return parser; -+} -+ -+static struct wg_parser * CDECL wg_wave_parser_create(void) -+{ -+ struct wg_parser *parser; -+ -+ if ((parser = wg_parser_create())) -+ parser->init_gst = wave_parser_init_gst; -+ return parser; -+} -+ - static void CDECL wg_parser_destroy(struct wg_parser *parser) - { - if (parser->bus) -@@ -1890,7 +1915,10 @@ static void CDECL wg_parser_destroy(struct wg_parser *parser) - - static const struct unix_funcs funcs = - { -- wg_parser_create, -+ wg_decodebin_parser_create, -+ wg_avi_parser_create, -+ wg_mpeg_audio_parser_create, -+ wg_wave_parser_create, - wg_parser_destroy, - - wg_parser_connect, --- -2.33.0 - diff --git a/patches/mfplat-reverts/0018-Revert-winegstreamer-Fix-return-code-in-init_gst-fai.patch b/patches/mfplat-reverts/0018-Revert-winegstreamer-Fix-return-code-in-init_gst-fai.patch deleted file mode 100644 index 28dc680a..00000000 --- a/patches/mfplat-reverts/0018-Revert-winegstreamer-Fix-return-code-in-init_gst-fai.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 5e55fd289a3baca9c53757c3b7ace7e5f51040f4 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sun, 19 Sep 2021 13:07:56 +1000 -Subject: [PATCH 18/22] Revert "winegstreamer: Fix return code in init_gst - failure case." - -This reverts commit b9a7e961cdd39203866be38e90b1d901595d54ba. ---- - dlls/winegstreamer/quartz_parser.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c -index a8e7e3d979f..5299f4dc2ed 100644 ---- a/dlls/winegstreamer/quartz_parser.c -+++ b/dlls/winegstreamer/quartz_parser.c -@@ -982,10 +982,7 @@ static HRESULT parser_sink_connect(struct strmbase_sink *iface, IPin *peer, cons - goto err; - - if (!filter->init_gst(filter)) -- { -- hr = E_FAIL; - goto err; -- } - - for (i = 0; i < filter->source_count; ++i) - { --- -2.33.0 - diff --git a/patches/mfplat-reverts/0019-Revert-winegstreamer-Allocate-source-media-buffers-i.patch b/patches/mfplat-reverts/0019-Revert-winegstreamer-Allocate-source-media-buffers-i.patch deleted file mode 100644 index b1eceb6e..00000000 --- a/patches/mfplat-reverts/0019-Revert-winegstreamer-Allocate-source-media-buffers-i.patch +++ /dev/null @@ -1,224 +0,0 @@ -From eb244f666ec0ed78a7ca101f735c6555648c8da6 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sun, 19 Sep 2021 13:08:02 +1000 -Subject: [PATCH 19/22] Revert "winegstreamer: Allocate source media buffers in - the PE components." - -This reverts commit 8b7390f80d866435f06f2571a93bcd67c0947673. ---- - dlls/winegstreamer/gst_private.h | 7 +++---- - dlls/winegstreamer/media_source.c | 28 ++++------------------------ - dlls/winegstreamer/quartz_parser.c | 26 +++----------------------- - dlls/winegstreamer/wg_parser.c | 28 +++++++++++++--------------- - 4 files changed, 23 insertions(+), 66 deletions(-) - -diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index 923bba25d38..c5e4367811f 100644 ---- a/dlls/winegstreamer/gst_private.h -+++ b/dlls/winegstreamer/gst_private.h -@@ -163,10 +163,9 @@ struct unix_funcs - void (CDECL *wg_parser_begin_flush)(struct wg_parser *parser); - void (CDECL *wg_parser_end_flush)(struct wg_parser *parser); - -- bool (CDECL *wg_parser_get_next_read_offset)(struct wg_parser *parser, -- uint64_t *offset, uint32_t *size); -- void (CDECL *wg_parser_push_data)(struct wg_parser *parser, -- const void *data, uint32_t size); -+ bool (CDECL *wg_parser_get_read_request)(struct wg_parser *parser, -+ void **data, uint64_t *offset, uint32_t *size); -+ void (CDECL *wg_parser_complete_read_request)(struct wg_parser *parser, bool ret); - - void (CDECL *wg_parser_set_unlimited_buffering)(struct wg_parser *parser); - -diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index 12ca14ca139..87959546a7c 100644 ---- a/dlls/winegstreamer/media_source.c -+++ b/dlls/winegstreamer/media_source.c -@@ -613,11 +613,6 @@ static DWORD CALLBACK read_thread(void *arg) - { - struct media_source *source = arg; - IMFByteStream *byte_stream = source->byte_stream; -- uint32_t buffer_size = 0; -- uint64_t file_size; -- void *data = NULL; -- -- IMFByteStream_GetLength(byte_stream, &file_size); - - TRACE("Starting read thread for media source %p.\n", source); - -@@ -627,33 +622,18 @@ static DWORD CALLBACK read_thread(void *arg) - ULONG ret_size; - uint32_t size; - HRESULT hr; -+ void *data; - -- if (!unix_funcs->wg_parser_get_next_read_offset(source->wg_parser, &offset, &size)) -+ if (!unix_funcs->wg_parser_get_read_request(source->wg_parser, &data, &offset, &size)) - continue; - -- if (offset >= file_size) -- size = 0; -- else if (offset + size >= file_size) -- size = file_size - offset; -- -- if (size > buffer_size) -- { -- buffer_size = size; -- data = realloc(data, size); -- } -- -- ret_size = 0; -- - if (SUCCEEDED(hr = IMFByteStream_SetCurrentPosition(byte_stream, offset))) - hr = IMFByteStream_Read(byte_stream, data, size, &ret_size); -- if (FAILED(hr)) -- ERR("Failed to read %u bytes at offset %I64u, hr %#x.\n", size, offset, hr); -- else if (ret_size != size) -+ if (SUCCEEDED(hr) && ret_size != size) - ERR("Unexpected short read: requested %u bytes, got %u.\n", size, ret_size); -- unix_funcs->wg_parser_push_data(source->wg_parser, SUCCEEDED(hr) ? data : NULL, ret_size); -+ unix_funcs->wg_parser_complete_read_request(source->wg_parser, SUCCEEDED(hr)); - } - -- free(data); - TRACE("Media source is shutting down; exiting.\n"); - return 0; - } -diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c -index 5299f4dc2ed..09a916d7f5c 100644 ---- a/dlls/winegstreamer/quartz_parser.c -+++ b/dlls/winegstreamer/quartz_parser.c -@@ -785,11 +785,6 @@ static DWORD CALLBACK stream_thread(void *arg) - static DWORD CALLBACK read_thread(void *arg) - { - struct parser *filter = arg; -- LONGLONG file_size, unused; -- uint32_t buffer_size = 0; -- void *data = NULL; -- -- IAsyncReader_Length(filter->reader, &file_size, &unused); - - TRACE("Starting read thread for filter %p.\n", filter); - -@@ -798,29 +793,14 @@ static DWORD CALLBACK read_thread(void *arg) - uint64_t offset; - uint32_t size; - HRESULT hr; -+ void *data; - -- if (!unix_funcs->wg_parser_get_next_read_offset(filter->wg_parser, &offset, &size)) -+ if (!unix_funcs->wg_parser_get_read_request(filter->wg_parser, &data, &offset, &size)) - continue; -- -- if (offset >= file_size) -- size = 0; -- else if (offset + size >= file_size) -- size = file_size - offset; -- -- if (size > buffer_size) -- { -- buffer_size = size; -- data = realloc(data, size); -- } -- - hr = IAsyncReader_SyncRead(filter->reader, offset, size, data); -- if (FAILED(hr)) -- ERR("Failed to read %u bytes at offset %I64u, hr %#x.\n", size, offset, hr); -- -- unix_funcs->wg_parser_push_data(filter->wg_parser, SUCCEEDED(hr) ? data : NULL, size); -+ unix_funcs->wg_parser_complete_read_request(filter->wg_parser, SUCCEEDED(hr)); - } - -- free(data); - TRACE("Streaming stopped; exiting.\n"); - return 0; - } -diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index dde137ef186..e12cb08776b 100644 ---- a/dlls/winegstreamer/wg_parser.c -+++ b/dlls/winegstreamer/wg_parser.c -@@ -524,8 +524,8 @@ static void CDECL wg_parser_end_flush(struct wg_parser *parser) - pthread_mutex_unlock(&parser->mutex); - } - --static bool CDECL wg_parser_get_next_read_offset(struct wg_parser *parser, -- uint64_t *offset, uint32_t *size) -+static bool CDECL wg_parser_get_read_request(struct wg_parser *parser, -+ void **data, uint64_t *offset, uint32_t *size) - { - pthread_mutex_lock(&parser->mutex); - -@@ -538,6 +538,7 @@ static bool CDECL wg_parser_get_next_read_offset(struct wg_parser *parser, - return false; - } - -+ *data = parser->read_request.data; - *offset = parser->read_request.offset; - *size = parser->read_request.size; - -@@ -545,15 +546,11 @@ static bool CDECL wg_parser_get_next_read_offset(struct wg_parser *parser, - return true; - } - --static void CDECL wg_parser_push_data(struct wg_parser *parser, -- const void *data, uint32_t size) -+static void CDECL wg_parser_complete_read_request(struct wg_parser *parser, bool ret) - { - pthread_mutex_lock(&parser->mutex); -- parser->read_request.size = size; - parser->read_request.done = true; -- parser->read_request.ret = !!data; -- if (data) -- memcpy(parser->read_request.data, data, size); -+ parser->read_request.ret = ret; - parser->read_request.data = NULL; - pthread_mutex_unlock(&parser->mutex); - pthread_cond_signal(&parser->read_done_cond); -@@ -1224,6 +1221,10 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent, - if (offset == GST_BUFFER_OFFSET_NONE) - offset = parser->next_pull_offset; - parser->next_pull_offset = offset + size; -+ if (offset >= parser->file_size) -+ return GST_FLOW_EOS; -+ if (offset + size >= parser->file_size) -+ size = parser->file_size - offset; - - if (!*buffer) - *buffer = new_buffer = gst_buffer_new_and_alloc(size); -@@ -1247,7 +1248,6 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent, - pthread_cond_wait(&parser->read_done_cond, &parser->mutex); - - ret = parser->read_request.ret; -- gst_buffer_set_size(*buffer, parser->read_request.size); - - pthread_mutex_unlock(&parser->mutex); - -@@ -1255,12 +1255,10 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent, - - GST_LOG("Request returned %d.", ret); - -- if ((!ret || !size) && new_buffer) -+ if (!ret && new_buffer) - gst_buffer_unref(new_buffer); - -- if (ret) -- return size ? GST_FLOW_OK : GST_FLOW_EOS; -- return GST_FLOW_ERROR; -+ return ret ? GST_FLOW_OK : GST_FLOW_ERROR; - } - - static gboolean src_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) -@@ -1927,8 +1925,8 @@ static const struct unix_funcs funcs = - wg_parser_begin_flush, - wg_parser_end_flush, - -- wg_parser_get_next_read_offset, -- wg_parser_push_data, -+ wg_parser_get_read_request, -+ wg_parser_complete_read_request, - - wg_parser_set_unlimited_buffering, - --- -2.33.0 - diff --git a/patches/mfplat-reverts/0020-Revert-winegstreamer-Duplicate-source-shutdown-path-.patch b/patches/mfplat-reverts/0020-Revert-winegstreamer-Duplicate-source-shutdown-path-.patch deleted file mode 100644 index 913ad4ad..00000000 --- a/patches/mfplat-reverts/0020-Revert-winegstreamer-Duplicate-source-shutdown-path-.patch +++ /dev/null @@ -1,221 +0,0 @@ -From ee5ed3858dd7747358b2627511be3369f10a54c5 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sun, 19 Sep 2021 13:08:03 +1000 -Subject: [PATCH 20/22] Revert "winegstreamer: Duplicate source shutdown path - into constructor with leak fixes." - -This reverts commit 67734bfce31d6032cee1a8980a9022665e9e18fa. ---- - dlls/winegstreamer/gst_private.h | 1 - - dlls/winegstreamer/media_source.c | 102 +++++++++++------------------- - 2 files changed, 37 insertions(+), 66 deletions(-) - -diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index c5e4367811f..9a753a01b46 100644 ---- a/dlls/winegstreamer/gst_private.h -+++ b/dlls/winegstreamer/gst_private.h -@@ -22,7 +22,6 @@ - #define __GST_PRIVATE_INCLUDED__ - - #include --#include - #include - #include - #include -diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index 87959546a7c..64d40fd6fb6 100644 ---- a/dlls/winegstreamer/media_source.c -+++ b/dlls/winegstreamer/media_source.c -@@ -817,12 +817,6 @@ static HRESULT new_media_stream(struct media_source *source, - object->IMFMediaStream_iface.lpVtbl = &media_stream_vtbl; - object->ref = 1; - -- if (FAILED(hr = MFCreateEventQueue(&object->event_queue))) -- { -- free(object); -- return hr; -- } -- - IMFMediaSource_AddRef(&source->IMFMediaSource_iface); - object->parent_source = source; - object->stream_id = stream_id; -@@ -831,11 +825,20 @@ static HRESULT new_media_stream(struct media_source *source, - object->eos = FALSE; - object->wg_stream = wg_stream; - -+ if (FAILED(hr = MFCreateEventQueue(&object->event_queue))) -+ goto fail; -+ - TRACE("Created stream object %p.\n", object); - - *out_stream = object; - - return S_OK; -+ -+fail: -+ WARN("Failed to construct media stream, hr %#x.\n", hr); -+ -+ IMFMediaStream_Release(&object->IMFMediaStream_iface); -+ return hr; - } - - static HRESULT media_stream_init_desc(struct media_stream *stream) -@@ -928,16 +931,10 @@ static HRESULT media_stream_init_desc(struct media_stream *stream) - goto done; - - if (FAILED(hr = IMFStreamDescriptor_GetMediaTypeHandler(stream->descriptor, &type_handler))) -- { -- IMFStreamDescriptor_Release(stream->descriptor); - goto done; -- } - - if (FAILED(hr = IMFMediaTypeHandler_SetCurrentMediaType(type_handler, stream_types[0]))) -- { -- IMFStreamDescriptor_Release(stream->descriptor); - goto done; -- } - - done: - if (type_handler) -@@ -1309,13 +1306,19 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface) - - unix_funcs->wg_parser_disconnect(source->wg_parser); - -- source->read_thread_shutdown = true; -- WaitForSingleObject(source->read_thread, INFINITE); -- CloseHandle(source->read_thread); -+ if (source->read_thread) -+ { -+ source->read_thread_shutdown = true; -+ WaitForSingleObject(source->read_thread, INFINITE); -+ CloseHandle(source->read_thread); -+ } - -- IMFPresentationDescriptor_Release(source->pres_desc); -- IMFMediaEventQueue_Shutdown(source->event_queue); -- IMFByteStream_Release(source->byte_stream); -+ if (source->pres_desc) -+ IMFPresentationDescriptor_Release(source->pres_desc); -+ if (source->event_queue) -+ IMFMediaEventQueue_Shutdown(source->event_queue); -+ if (source->byte_stream) -+ IMFByteStream_Release(source->byte_stream); - - for (i = 0; i < source->stream_count; i++) - { -@@ -1323,18 +1326,23 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface) - - stream->state = STREAM_SHUTDOWN; - -- IMFMediaEventQueue_Shutdown(stream->event_queue); -- IMFStreamDescriptor_Release(stream->descriptor); -- IMFMediaSource_Release(&stream->parent_source->IMFMediaSource_iface); -+ if (stream->event_queue) -+ IMFMediaEventQueue_Shutdown(stream->event_queue); -+ if (stream->descriptor) -+ IMFStreamDescriptor_Release(stream->descriptor); -+ if (stream->parent_source) -+ IMFMediaSource_Release(&stream->parent_source->IMFMediaSource_iface); - - IMFMediaStream_Release(&stream->IMFMediaStream_iface); - } - - unix_funcs->wg_parser_destroy(source->wg_parser); - -- free(source->streams); -+ if (source->stream_count) -+ free(source->streams); - -- MFUnlockWorkQueue(source->async_commands_queue); -+ if (source->async_commands_queue) -+ MFUnlockWorkQueue(source->async_commands_queue); - - return S_OK; - } -@@ -1359,7 +1367,6 @@ static const IMFMediaSourceVtbl IMFMediaSource_vtbl = - static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_source **out_media_source) - { - IMFStreamDescriptor **descriptors = NULL; -- unsigned int stream_count = UINT_MAX; - struct media_source *object; - UINT64 total_pres_time = 0; - struct wg_parser *parser; -@@ -1423,15 +1430,15 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ - * leak occurs with native. */ - unix_funcs->wg_parser_set_unlimited_buffering(parser); - -- stream_count = unix_funcs->wg_parser_get_stream_count(parser); -+ object->stream_count = unix_funcs->wg_parser_get_stream_count(parser); - -- if (!(object->streams = calloc(stream_count, sizeof(*object->streams)))) -+ if (!(object->streams = calloc(object->stream_count, sizeof(*object->streams)))) - { - hr = E_OUTOFMEMORY; - goto fail; - } - -- for (i = 0; i < stream_count; ++i) -+ for (i = 0; i < object->stream_count; ++i) - { - if (FAILED(hr = new_media_stream(object, unix_funcs->wg_parser_get_stream(parser, i), i, &object->streams[i]))) - goto fail; -@@ -1439,13 +1446,9 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ - if (FAILED(hr = media_stream_init_desc(object->streams[i]))) - { - ERR("Failed to finish initialization of media stream %p, hr %x.\n", object->streams[i], hr); -- IMFMediaSource_Release(&object->streams[i]->parent_source->IMFMediaSource_iface); -- IMFMediaEventQueue_Release(object->streams[i]->event_queue); -- free(object->streams[i]); -+ IMFMediaStream_Release(&object->streams[i]->IMFMediaStream_iface); - goto fail; - } -- -- object->stream_count++; - } - - /* init presentation descriptor */ -@@ -1482,39 +1485,8 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ - fail: - WARN("Failed to construct MFMediaSource, hr %#x.\n", hr); - -- if (descriptors) -- { -- for (i = 0; i < object->stream_count; i++) -- IMFStreamDescriptor_Release(descriptors[i]); -- free(descriptors); -- } -- for (i = 0; i < object->stream_count; i++) -- { -- struct media_stream *stream = object->streams[i]; -- -- IMFMediaEventQueue_Release(stream->event_queue); -- IMFStreamDescriptor_Release(stream->descriptor); -- IMFMediaSource_Release(&stream->parent_source->IMFMediaSource_iface); -- -- free(stream); -- } -- free(object->streams); -- if (stream_count != UINT_MAX) -- unix_funcs->wg_parser_disconnect(object->wg_parser); -- if (object->read_thread) -- { -- object->read_thread_shutdown = true; -- WaitForSingleObject(object->read_thread, INFINITE); -- CloseHandle(object->read_thread); -- } -- if (object->wg_parser) -- unix_funcs->wg_parser_destroy(object->wg_parser); -- if (object->async_commands_queue) -- MFUnlockWorkQueue(object->async_commands_queue); -- if (object->event_queue) -- IMFMediaEventQueue_Release(object->event_queue); -- IMFByteStream_Release(object->byte_stream); -- free(object); -+ free(descriptors); -+ IMFMediaSource_Release(&object->IMFMediaSource_iface); - return hr; - } - --- -2.33.0 - diff --git a/patches/mfplat-reverts/0021-Revert-winegstreamer-Properly-clean-up-from-failure-.patch b/patches/mfplat-reverts/0021-Revert-winegstreamer-Properly-clean-up-from-failure-.patch deleted file mode 100644 index 14605c49..00000000 --- a/patches/mfplat-reverts/0021-Revert-winegstreamer-Properly-clean-up-from-failure-.patch +++ /dev/null @@ -1,140 +0,0 @@ -From eb2329e6547f41329cb909f44fb05f7a8c2864ac Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sun, 19 Sep 2021 13:08:04 +1000 -Subject: [PATCH 21/22] Revert "winegstreamer: Properly clean up from failure - in wg_parser_connect()." - -This reverts commit 721b1eb2ebe5c3eaab8ac3fb1e4f4648cbee5b4d. ---- - dlls/winegstreamer/wg_parser.c | 76 ++++++++++------------------------ - 1 file changed, 23 insertions(+), 53 deletions(-) - -diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index e12cb08776b..80cc08ea0a5 100644 ---- a/dlls/winegstreamer/wg_parser.c -+++ b/dlls/winegstreamer/wg_parser.c -@@ -1041,30 +1041,6 @@ static struct wg_parser_stream *create_stream(struct wg_parser *parser) - return stream; - } - --static void free_stream(struct wg_parser_stream *stream) --{ -- if (stream->their_src) -- { -- if (stream->post_sink) -- { -- gst_pad_unlink(stream->their_src, stream->post_sink); -- gst_pad_unlink(stream->post_src, stream->my_sink); -- gst_object_unref(stream->post_src); -- gst_object_unref(stream->post_sink); -- stream->post_src = stream->post_sink = NULL; -- } -- else -- gst_pad_unlink(stream->their_src, stream->my_sink); -- gst_object_unref(stream->their_src); -- } -- gst_object_unref(stream->my_sink); -- -- pthread_cond_destroy(&stream->event_cond); -- pthread_cond_destroy(&stream->event_empty_cond); -- -- free(stream); --} -- - static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user) - { - struct wg_parser *parser = user; -@@ -1551,14 +1527,14 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s - parser->error = false; - - if (!parser->init_gst(parser)) -- goto out; -+ return E_FAIL; - - gst_element_set_state(parser->container, GST_STATE_PAUSED); - ret = gst_element_get_state(parser->container, NULL, NULL, -1); - if (ret == GST_STATE_CHANGE_FAILURE) - { - GST_ERROR("Failed to play stream.\n"); -- goto out; -+ return E_FAIL; - } - - pthread_mutex_lock(&parser->mutex); -@@ -1568,7 +1544,7 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s - if (parser->error) - { - pthread_mutex_unlock(&parser->mutex); -- goto out; -+ return E_FAIL; - } - - for (i = 0; i < parser->stream_count; ++i) -@@ -1608,7 +1584,7 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s - if (parser->error) - { - pthread_mutex_unlock(&parser->mutex); -- goto out; -+ return E_FAIL; - } - if (gst_pad_query_duration(stream->their_src, GST_FORMAT_TIME, &duration)) - { -@@ -1645,36 +1621,30 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s - - parser->next_offset = 0; - return S_OK; -+} - --out: -- if (parser->container) -- gst_element_set_state(parser->container, GST_STATE_NULL); -- if (parser->their_sink) -- { -- gst_pad_unlink(parser->my_src, parser->their_sink); -- gst_object_unref(parser->their_sink); -- parser->my_src = parser->their_sink = NULL; -- } -- -- for (i = 0; i < parser->stream_count; ++i) -- free_stream(parser->streams[i]); -- parser->stream_count = 0; -- free(parser->streams); -- parser->streams = NULL; -- -- if (parser->container) -+static void free_stream(struct wg_parser_stream *stream) -+{ -+ if (stream->their_src) - { -- gst_element_set_bus(parser->container, NULL); -- gst_object_unref(parser->container); -- parser->container = NULL; -+ if (stream->post_sink) -+ { -+ gst_pad_unlink(stream->their_src, stream->post_sink); -+ gst_pad_unlink(stream->post_src, stream->my_sink); -+ gst_object_unref(stream->post_src); -+ gst_object_unref(stream->post_sink); -+ stream->post_src = stream->post_sink = NULL; -+ } -+ else -+ gst_pad_unlink(stream->their_src, stream->my_sink); -+ gst_object_unref(stream->their_src); - } -+ gst_object_unref(stream->my_sink); - -- pthread_mutex_lock(&parser->mutex); -- parser->sink_connected = false; -- pthread_mutex_unlock(&parser->mutex); -- pthread_cond_signal(&parser->read_cond); -+ pthread_cond_destroy(&stream->event_cond); -+ pthread_cond_destroy(&stream->event_empty_cond); - -- return E_FAIL; -+ free(stream); - } - - static void CDECL wg_parser_disconnect(struct wg_parser *parser) --- -2.33.0 - diff --git a/patches/mfplat-reverts/0022-Revert-winegstreamer-Factor-out-more-of-the-init_gst.patch b/patches/mfplat-reverts/0022-Revert-winegstreamer-Factor-out-more-of-the-init_gst.patch deleted file mode 100644 index fea00b8e..00000000 --- a/patches/mfplat-reverts/0022-Revert-winegstreamer-Factor-out-more-of-the-init_gst.patch +++ /dev/null @@ -1,160 +0,0 @@ -From 000e19a29821dbbe21534eb4b2a6d784001dbda2 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sun, 19 Sep 2021 13:08:05 +1000 -Subject: [PATCH 22/22] Revert "winegstreamer: Factor out more of the init_gst - callback into wg_parser_connect()." - -This reverts commit 830efe873a967dbbb0c9a65be6a66b124a5fa826. ---- - dlls/winegstreamer/wg_parser.c | 78 +++++++++++++++++++++++----------- - 1 file changed, 54 insertions(+), 24 deletions(-) - -diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 80cc08ea0a5..45219488de8 100644 ---- a/dlls/winegstreamer/wg_parser.c -+++ b/dlls/winegstreamer/wg_parser.c -@@ -1501,7 +1501,6 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s - GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE("quartz_src", - GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); - unsigned int i; -- int ret; - - parser->file_size = file_size; - parser->sink_connected = true; -@@ -1524,29 +1523,12 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s - - parser->start_offset = parser->next_offset = parser->stop_offset = 0; - parser->next_pull_offset = 0; -- parser->error = false; - - if (!parser->init_gst(parser)) - return E_FAIL; - -- gst_element_set_state(parser->container, GST_STATE_PAUSED); -- ret = gst_element_get_state(parser->container, NULL, NULL, -1); -- if (ret == GST_STATE_CHANGE_FAILURE) -- { -- GST_ERROR("Failed to play stream.\n"); -- return E_FAIL; -- } -- - pthread_mutex_lock(&parser->mutex); - -- while (!parser->no_more_pads && !parser->error) -- pthread_cond_wait(&parser->init_cond, &parser->mutex); -- if (parser->error) -- { -- pthread_mutex_unlock(&parser->mutex); -- return E_FAIL; -- } -- - for (i = 0; i < parser->stream_count; ++i) - { - struct wg_parser_stream *stream = parser->streams[i]; -@@ -1702,7 +1684,7 @@ static BOOL decodebin_parser_init_gst(struct wg_parser *parser) - parser->their_sink = gst_element_get_static_pad(element, "sink"); - - pthread_mutex_lock(&parser->mutex); -- parser->no_more_pads = false; -+ parser->no_more_pads = parser->error = false; - pthread_mutex_unlock(&parser->mutex); - - if ((ret = gst_pad_link(parser->my_src, parser->their_sink)) < 0) -@@ -1711,6 +1693,24 @@ static BOOL decodebin_parser_init_gst(struct wg_parser *parser) - return FALSE; - } - -+ gst_element_set_state(parser->container, GST_STATE_PAUSED); -+ ret = gst_element_get_state(parser->container, NULL, NULL, -1); -+ if (ret == GST_STATE_CHANGE_FAILURE) -+ { -+ GST_ERROR("Failed to play stream.\n"); -+ return FALSE; -+ } -+ -+ pthread_mutex_lock(&parser->mutex); -+ while (!parser->no_more_pads && !parser->error) -+ pthread_cond_wait(&parser->init_cond, &parser->mutex); -+ if (parser->error) -+ { -+ pthread_mutex_unlock(&parser->mutex); -+ return FALSE; -+ } -+ pthread_mutex_unlock(&parser->mutex); -+ - return TRUE; - } - -@@ -1731,7 +1731,7 @@ static BOOL avi_parser_init_gst(struct wg_parser *parser) - parser->their_sink = gst_element_get_static_pad(element, "sink"); - - pthread_mutex_lock(&parser->mutex); -- parser->no_more_pads = false; -+ parser->no_more_pads = parser->error = false; - pthread_mutex_unlock(&parser->mutex); - - if ((ret = gst_pad_link(parser->my_src, parser->their_sink)) < 0) -@@ -1740,6 +1740,24 @@ static BOOL avi_parser_init_gst(struct wg_parser *parser) - return FALSE; - } - -+ gst_element_set_state(parser->container, GST_STATE_PAUSED); -+ ret = gst_element_get_state(parser->container, NULL, NULL, -1); -+ if (ret == GST_STATE_CHANGE_FAILURE) -+ { -+ GST_ERROR("Failed to play stream.\n"); -+ return FALSE; -+ } -+ -+ pthread_mutex_lock(&parser->mutex); -+ while (!parser->no_more_pads && !parser->error) -+ pthread_cond_wait(&parser->init_cond, &parser->mutex); -+ if (parser->error) -+ { -+ pthread_mutex_unlock(&parser->mutex); -+ return FALSE; -+ } -+ pthread_mutex_unlock(&parser->mutex); -+ - return TRUE; - } - -@@ -1770,9 +1788,15 @@ static BOOL mpeg_audio_parser_init_gst(struct wg_parser *parser) - GST_ERROR("Failed to link source pads, error %d.\n", ret); - return FALSE; - } -- gst_pad_set_active(stream->my_sink, 1); - -- parser->no_more_pads = true; -+ gst_pad_set_active(stream->my_sink, 1); -+ gst_element_set_state(parser->container, GST_STATE_PAUSED); -+ ret = gst_element_get_state(parser->container, NULL, NULL, -1); -+ if (ret == GST_STATE_CHANGE_FAILURE) -+ { -+ GST_ERROR("Failed to play stream.\n"); -+ return FALSE; -+ } - - return TRUE; - } -@@ -1805,9 +1829,15 @@ static BOOL wave_parser_init_gst(struct wg_parser *parser) - GST_ERROR("Failed to link source pads, error %d.\n", ret); - return FALSE; - } -- gst_pad_set_active(stream->my_sink, 1); - -- parser->no_more_pads = true; -+ gst_pad_set_active(stream->my_sink, 1); -+ gst_element_set_state(parser->container, GST_STATE_PAUSED); -+ ret = gst_element_get_state(parser->container, NULL, NULL, -1); -+ if (ret == GST_STATE_CHANGE_FAILURE) -+ { -+ GST_ERROR("Failed to play stream.\n"); -+ return FALSE; -+ } - - return TRUE; - } --- -2.33.0 - diff --git a/patches/mfplat-reverts/definition b/patches/mfplat-reverts/definition deleted file mode 100644 index bc488b8a..00000000 --- a/patches/mfplat-reverts/definition +++ /dev/null @@ -1,2 +0,0 @@ -# This is just a revert of update mfplat patches until it's new versions -# of the mfplat have been merged upstream. diff --git a/patches/mfplat-streaming-support/definition b/patches/mfplat-streaming-support/definition index 9ca1daa3..e91efdc2 100644 --- a/patches/mfplat-streaming-support/definition +++ b/patches/mfplat-streaming-support/definition @@ -1,2 +1,2 @@ Fixes: [49692] Multiple applications need a Media Foundation media source implementation -Depends: mfplat-reverts +Disabled: True diff --git a/patches/msxml3-FreeThreadedXMLHTTP60/0003-msxml3-Implement-FreeThreadedXMLHTTP60.patch b/patches/msxml3-FreeThreadedXMLHTTP60/0003-msxml3-Implement-FreeThreadedXMLHTTP60.patch index 808ac2aa..a93e50a0 100644 --- a/patches/msxml3-FreeThreadedXMLHTTP60/0003-msxml3-Implement-FreeThreadedXMLHTTP60.patch +++ b/patches/msxml3-FreeThreadedXMLHTTP60/0003-msxml3-Implement-FreeThreadedXMLHTTP60.patch @@ -1,4 +1,4 @@ -From b36d2db7b14e50e6bc2e74313f918737b32b60e9 Mon Sep 17 00:00:00 2001 +From f1500a8dcd6e90680d69fb04ff4f01c1ea4f9fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Tue, 8 Sep 2020 18:43:52 +0200 Subject: [PATCH] msxml3: Implement FreeThreadedXMLHTTP60. @@ -15,21 +15,21 @@ Update from Gijs Vermeulen 7 files changed, 905 insertions(+), 5 deletions(-) diff --git a/dlls/msxml3/Makefile.in b/dlls/msxml3/Makefile.in -index 936c745895d..f9e629f89bc 100644 +index 2bf789732da..e2d737599b1 100644 --- a/dlls/msxml3/Makefile.in +++ b/dlls/msxml3/Makefile.in @@ -1,5 +1,5 @@ MODULE = msxml3.dll --IMPORTS = uuid urlmon shlwapi oleaut32 ole32 user32 advapi32 -+IMPORTS = uuid urlmon shlwapi oleaut32 ole32 user32 advapi32 rtworkq - EXTRALIBS = $(XML2_LIBS) - EXTRAINCL = $(XML2_CFLAGS) $(XSLT_CFLAGS) +-IMPORTS = $(XSLT_PE_LIBS) $(XML2_PE_LIBS) uuid urlmon shlwapi oleaut32 ole32 user32 advapi32 ++IMPORTS = $(XSLT_PE_LIBS) $(XML2_PE_LIBS) uuid urlmon shlwapi oleaut32 ole32 user32 advapi32 rtworkq + EXTRAINCL = $(XSLT_PE_CFLAGS) $(XML2_PE_CFLAGS) + C_SRCS = \ diff --git a/dlls/msxml3/factory.c b/dlls/msxml3/factory.c -index 1a489b87a94..1c8e04813e5 100644 +index 34aa3bc4e23..651a6b8e9df 100644 --- a/dlls/msxml3/factory.c +++ b/dlls/msxml3/factory.c -@@ -281,6 +281,7 @@ static HRESULT DOMClassFactory_Create(const GUID *clsid, REFIID riid, void **ppv +@@ -277,6 +277,7 @@ static HRESULT DOMClassFactory_Create(const GUID *clsid, REFIID riid, void **ppv static ClassFactory xmldoccf = { { &ClassFactoryVtbl }, XMLDocument_create }; static ClassFactory httpreqcf = { { &ClassFactoryVtbl }, XMLHTTPRequest_create }; @@ -37,7 +37,7 @@ index 1a489b87a94..1c8e04813e5 100644 static ClassFactory serverhttp = { { &ClassFactoryVtbl }, ServerXMLHTTP_create }; static ClassFactory xsltemplatecf = { { &ClassFactoryVtbl }, XSLTemplate_create }; static ClassFactory mxnsmanagercf = { {&ClassFactoryVtbl }, MXNamespaceManager_create }; -@@ -342,6 +343,10 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID riid, void **ppv ) +@@ -338,6 +339,10 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID riid, void **ppv ) { cf = &httpreqcf.IClassFactory_iface; } @@ -49,10 +49,10 @@ index 1a489b87a94..1c8e04813e5 100644 IsEqualCLSID( rclsid, &CLSID_ServerXMLHTTP30 ) || IsEqualCLSID( rclsid, &CLSID_ServerXMLHTTP40 ) || diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c -index 15a1f888ebd..a05e07b0c42 100644 +index 934d580064f..65232bbc8af 100644 --- a/dlls/msxml3/httprequest.c +++ b/dlls/msxml3/httprequest.c -@@ -38,11 +38,13 @@ +@@ -38,10 +38,12 @@ #include "shlwapi.h" #include "msxml_dispex.h" @@ -60,14 +60,13 @@ index 15a1f888ebd..a05e07b0c42 100644 +#include "rtworkq.h" #include "wine/debug.h" - #include "wine/unicode.h" -WINE_DEFAULT_DEBUG_CHANNEL(msxml); +WINE_DEFAULT_DEBUG_CHANNEL(xmlhttp); static const WCHAR colspaceW[] = {':',' ',0}; static const WCHAR crlfW[] = {'\r','\n',0}; -@@ -2075,6 +2077,468 @@ static const struct IServerXMLHTTPRequestVtbl ServerXMLHTTPRequestVtbl = +@@ -2074,6 +2076,468 @@ static const struct IServerXMLHTTPRequestVtbl ServerXMLHTTPRequestVtbl = ServerXMLHTTPRequest_setOption }; @@ -536,7 +535,7 @@ index 15a1f888ebd..a05e07b0c42 100644 static void init_httprequest(httprequest *req) { req->IXMLHTTPRequest_iface.lpVtbl = &XMLHTTPRequestVtbl; -@@ -2124,6 +2588,35 @@ HRESULT XMLHTTPRequest_create(void **obj) +@@ -2123,6 +2587,35 @@ HRESULT XMLHTTPRequest_create(void **obj) return S_OK; } @@ -572,16 +571,16 @@ index 15a1f888ebd..a05e07b0c42 100644 HRESULT ServerXMLHTTP_create(void **obj) { serverhttp *req; -@@ -2143,3 +2636,4 @@ HRESULT ServerXMLHTTP_create(void **obj) +@@ -2142,3 +2635,4 @@ HRESULT ServerXMLHTTP_create(void **obj) return S_OK; } + diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h -index d578d5de560..9fac4e5936f 100644 +index 07ed09fb480..6b45cc63a9e 100644 --- a/dlls/msxml3/msxml_private.h +++ b/dlls/msxml3/msxml_private.h -@@ -390,6 +390,7 @@ extern HRESULT XMLDocument_create(void**) DECLSPEC_HIDDEN; +@@ -365,6 +365,7 @@ extern HRESULT XMLDocument_create(void**) DECLSPEC_HIDDEN; extern HRESULT SAXXMLReader_create(MSXML_VERSION, void**) DECLSPEC_HIDDEN; extern HRESULT SAXAttributes_create(MSXML_VERSION, void**) DECLSPEC_HIDDEN; extern HRESULT XMLHTTPRequest_create(void **) DECLSPEC_HIDDEN; @@ -1066,5 +1065,5 @@ index 333d4f3d3c7..1b4f0452c5f 100644 /* * Note that because of a #define in msxml2.h, we end up initializing -- -2.30.2 +2.33.0 diff --git a/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch b/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch index 465820b3..97a10fdf 100644 --- a/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch +++ b/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch @@ -1,4 +1,4 @@ -From 2849190768a826d888577c820c52a593b660b64e Mon Sep 17 00:00:00 2001 +From 187108be05dcf7521646c22f637627147d9bbdb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Mon, 3 Apr 2017 05:30:27 +0200 Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data. @@ -6,11 +6,10 @@ Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data. --- dlls/kernel32/tests/loader.c | 75 ++++++++++++++++++++++++++++++++++++ dlls/ntdll/loader.c | 41 ++++++++++++++++++++ - include/winternl.h | 2 +- - 3 files changed, 117 insertions(+), 1 deletion(-) + 2 files changed, 116 insertions(+) diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c -index 1db68a191a3..bec46088518 100644 +index 4f1b11338a6..56cd5a88e20 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -30,6 +30,7 @@ @@ -21,7 +20,7 @@ index 1db68a191a3..bec46088518 100644 #include "wine/test.h" #include "delayloadhandler.h" -@@ -4031,6 +4032,79 @@ static void test_Wow64Transition(void) +@@ -4036,6 +4037,79 @@ static void test_Wow64Transition(void) debugstr_wn(name->SectionFileName.Buffer, name->SectionFileName.Length / sizeof(WCHAR))); } @@ -101,7 +100,7 @@ index 1db68a191a3..bec46088518 100644 START_TEST(loader) { int argc; -@@ -4103,6 +4177,7 @@ START_TEST(loader) +@@ -4108,6 +4182,7 @@ START_TEST(loader) test_InMemoryOrderModuleList(); test_LoadPackagedLibrary(); test_wow64_redirection(); @@ -110,10 +109,10 @@ index 1db68a191a3..bec46088518 100644 test_dll_file( "kernel32.dll" ); test_dll_file( "advapi32.dll" ); diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index f3a37d4e8a6..eb0f3f8741c 100644 +index 65d684e555c..644d531d8f8 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -124,6 +124,9 @@ struct file_id +@@ -129,6 +129,9 @@ struct file_id BYTE ObjectId[16]; }; @@ -123,7 +122,7 @@ index f3a37d4e8a6..eb0f3f8741c 100644 /* internal representation of loaded modules */ typedef struct _wine_modref { -@@ -469,6 +472,33 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module ) +@@ -477,6 +480,33 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module ) } } @@ -157,7 +156,7 @@ index f3a37d4e8a6..eb0f3f8741c 100644 /************************************************************************* * get_modref * -@@ -1245,7 +1275,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name +@@ -1253,7 +1283,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name &wm->ldr.InLoadOrderLinks); InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderLinks); @@ -170,7 +169,7 @@ index f3a37d4e8a6..eb0f3f8741c 100644 if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT)) { -@@ -1925,6 +1960,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name, +@@ -1933,6 +1968,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name, /* the module has only be inserted in the load & memory order lists */ RemoveEntryList(&wm->ldr.InLoadOrderLinks); RemoveEntryList(&wm->ldr.InMemoryOrderLinks); @@ -178,7 +177,7 @@ index f3a37d4e8a6..eb0f3f8741c 100644 /* FIXME: there are several more dangling references * left. Including dlls loaded by this dll before the -@@ -3427,6 +3463,7 @@ static void free_modref( WINE_MODREF *wm ) +@@ -3518,6 +3554,7 @@ static void free_modref( WINE_MODREF *wm ) { RemoveEntryList(&wm->ldr.InLoadOrderLinks); RemoveEntryList(&wm->ldr.InMemoryOrderLinks); @@ -186,7 +185,7 @@ index f3a37d4e8a6..eb0f3f8741c 100644 if (wm->ldr.InInitializationOrderLinks.Flink) RemoveEntryList(&wm->ldr.InInitializationOrderLinks); -@@ -3751,6 +3788,10 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR +@@ -3881,6 +3918,10 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR sizeof(peb->TlsExpansionBitmapBits) * 8 ); RtlSetBits( peb->TlsBitmap, 0, 1 ); /* TLS index 0 is reserved and should be initialized to NULL. */ @@ -197,20 +196,6 @@ index f3a37d4e8a6..eb0f3f8741c 100644 init_user_process_params(); load_global_options(); version_init(); -diff --git a/include/winternl.h b/include/winternl.h -index 7221c0632b0..b8227b4583f 100644 ---- a/include/winternl.h -+++ b/include/winternl.h -@@ -3310,8 +3310,8 @@ typedef struct _LDR_DATA_TABLE_ENTRY - ULONG Flags; - SHORT LoadCount; - SHORT TlsIndex; -- HANDLE SectionHandle; - ULONG CheckSum; -+ LIST_ENTRY HashLinks; - ULONG TimeDateStamp; - HANDLE ActivationContext; - void* Lock; -- -2.30.2 +2.33.0 diff --git a/patches/ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch b/patches/ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch index 7c9de096..23740e3d 100644 --- a/patches/ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch +++ b/patches/ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch @@ -1,4 +1,4 @@ -From 62fa6a8ef11039fa44cd668ab2fd9964741d5a2b Mon Sep 17 00:00:00 2001 +From d823f033345ad18f5deea7530f1b3ad359616eb8 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Thu, 16 Jan 2014 20:56:49 -0700 Subject: [PATCH] ntdll: Add support for junction point creation. @@ -14,10 +14,10 @@ Signed-off-by: Erich E. Hoover create mode 100644 include/ntifs.h diff --git a/configure.ac b/configure.ac -index 9bf053ff39d..f7dc85cb13d 100644 +index f030099941a..dbabb4d5a78 100644 --- a/configure.ac +++ b/configure.ac -@@ -2160,6 +2160,8 @@ AC_CHECK_FUNCS(\ +@@ -2060,6 +2060,8 @@ AC_CHECK_FUNCS(\ posix_fallocate \ prctl \ proc_pidinfo \ @@ -152,18 +152,18 @@ index 46037546e6e..7a01e947e13 100644 test_mailslot_name(); } diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index 98fcc075c45..6ffa1473199 100644 +index eb5c6846a10..9d371f57969 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -36,6 +36,7 @@ +@@ -35,6 +35,7 @@ #include #include #include +#include #include + #include #ifdef HAVE_MNTENT_H - #include -@@ -139,6 +140,7 @@ +@@ -135,6 +136,7 @@ #include "wine/list.h" #include "wine/debug.h" #include "unix_private.h" @@ -171,7 +171,7 @@ index 98fcc075c45..6ffa1473199 100644 WINE_DEFAULT_DEBUG_CHANNEL(file); WINE_DECLARE_DEBUG_CHANNEL(winediag); -@@ -150,6 +152,10 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag); +@@ -146,6 +148,10 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag); #undef EXT2_IOC_GETFLAGS #undef EXT4_CASEFOLD_FL @@ -182,7 +182,7 @@ index 98fcc075c45..6ffa1473199 100644 #ifdef linux /* We want the real kernel dirent structure, not the libc one */ -@@ -474,6 +480,32 @@ static int xattr_set( const char *path, const char *name, void *value, size_t si +@@ -470,6 +476,32 @@ static int xattr_set( const char *path, const char *name, void *value, size_t si #endif } @@ -215,7 +215,7 @@ index 98fcc075c45..6ffa1473199 100644 /* get space from the current directory data buffer, allocating a new one if necessary */ static void *get_dir_data_space( struct dir_data *data, unsigned int size ) { -@@ -5936,6 +5968,116 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer, +@@ -5932,6 +5964,116 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer, } @@ -332,7 +332,7 @@ index 98fcc075c45..6ffa1473199 100644 /****************************************************************************** * NtFsControlFile (NTDLL.@) */ -@@ -6018,6 +6160,23 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap +@@ -6014,6 +6156,23 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap break; } @@ -357,10 +357,10 @@ index 98fcc075c45..6ffa1473199 100644 TRACE("FSCTL_SET_SPARSE: Ignoring request\n"); io->Information = 0; diff --git a/include/Makefile.in b/include/Makefile.in -index eac1c2e0570..25b00f9e52b 100644 +index a9a478e5433..3d5c88c041e 100644 --- a/include/Makefile.in +++ b/include/Makefile.in -@@ -546,6 +546,7 @@ SOURCES = \ +@@ -548,6 +548,7 @@ SOURCES = \ ntdef.h \ ntdsapi.h \ ntgdi.h \ diff --git a/patches/ntdll-NtAlertThreadByThreadId/0003-ntdll-Implement-NtAlertThreadByThreadId-and-NtWaitFo.patch b/patches/ntdll-NtAlertThreadByThreadId/0003-ntdll-Implement-NtAlertThreadByThreadId-and-NtWaitFo.patch index 73a89daa..a5a33520 100644 --- a/patches/ntdll-NtAlertThreadByThreadId/0003-ntdll-Implement-NtAlertThreadByThreadId-and-NtWaitFo.patch +++ b/patches/ntdll-NtAlertThreadByThreadId/0003-ntdll-Implement-NtAlertThreadByThreadId-and-NtWaitFo.patch @@ -1,4 +1,4 @@ -From 9bd824a4cb0539197c1ce17df9b0461a436d92e4 Mon Sep 17 00:00:00 2001 +From 2bb6291b369ff7d7a84cbd28c76b0f19fddc9026 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Fri, 30 Apr 2021 15:07:04 -0500 Subject: [PATCH] ntdll: Implement NtAlertThreadByThreadId and @@ -15,10 +15,10 @@ Signed-off-by: Zebediah Figura 6 files changed, 126 insertions(+) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index c3d17d989ac..6d65ac0ad95 100644 +index 13e65f65139..71d95517a63 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec -@@ -138,6 +138,7 @@ +@@ -140,6 +140,7 @@ @ stdcall -syscall NtAdjustPrivilegesToken(long long ptr long ptr ptr) @ stdcall -syscall NtAlertResumeThread(long ptr) @ stdcall -syscall NtAlertThread(long) @@ -26,7 +26,7 @@ index c3d17d989ac..6d65ac0ad95 100644 @ stdcall -syscall NtAllocateLocallyUniqueId(ptr) # @ stub NtAllocateUserPhysicalPages @ stdcall -syscall NtAllocateUuids(ptr ptr ptr ptr) -@@ -425,6 +426,7 @@ +@@ -424,6 +425,7 @@ @ stdcall -syscall NtUnmapViewOfSection(long ptr) # @ stub NtVdmControl # @ stub NtW32Call @@ -34,7 +34,7 @@ index c3d17d989ac..6d65ac0ad95 100644 @ stdcall -syscall NtWaitForDebugEvent(long long ptr ptr) @ stdcall -syscall NtWaitForKeyedEvent(long ptr long ptr) @ stdcall -syscall NtWaitForMultipleObjects(long ptr long long ptr) -@@ -1162,6 +1164,7 @@ +@@ -1161,6 +1163,7 @@ @ stdcall -private -syscall ZwAdjustPrivilegesToken(long long ptr long ptr ptr) NtAdjustPrivilegesToken @ stdcall -private -syscall ZwAlertResumeThread(long ptr) NtAlertResumeThread @ stdcall -private -syscall ZwAlertThread(long) NtAlertThread @@ -42,7 +42,7 @@ index c3d17d989ac..6d65ac0ad95 100644 @ stdcall -private -syscall ZwAllocateLocallyUniqueId(ptr) NtAllocateLocallyUniqueId # @ stub ZwAllocateUserPhysicalPages @ stdcall -private -syscall ZwAllocateUuids(ptr ptr ptr ptr) NtAllocateUuids -@@ -1447,6 +1450,7 @@ +@@ -1443,6 +1446,7 @@ @ stdcall -private -syscall ZwUnmapViewOfSection(long ptr) NtUnmapViewOfSection # @ stub ZwVdmControl # @ stub ZwW32Call @@ -51,10 +51,10 @@ index c3d17d989ac..6d65ac0ad95 100644 @ stdcall -private -syscall ZwWaitForKeyedEvent(long ptr long ptr) NtWaitForKeyedEvent @ stdcall -private -syscall ZwWaitForMultipleObjects(long ptr long long ptr) NtWaitForMultipleObjects diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c -index b15824346b7..736b1a8773e 100644 +index 9527e21dc0b..2089e6e45f2 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c -@@ -126,6 +126,7 @@ static void * const syscalls[] = +@@ -131,6 +131,7 @@ static void * const syscalls[] = NtAdjustPrivilegesToken, NtAlertResumeThread, NtAlertThread, @@ -62,7 +62,7 @@ index b15824346b7..736b1a8773e 100644 NtAllocateLocallyUniqueId, NtAllocateUuids, NtAllocateVirtualMemory, -@@ -331,6 +332,7 @@ static void * const syscalls[] = +@@ -333,6 +334,7 @@ static void * const syscalls[] = NtUnlockFile, NtUnlockVirtualMemory, NtUnmapViewOfSection, @@ -71,20 +71,20 @@ index b15824346b7..736b1a8773e 100644 NtWaitForKeyedEvent, NtWaitForMultipleObjects, diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c -index a13e53a437b..dc9ced540d4 100644 +index a5a4581ce58..98b1a487ff6 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c -@@ -32,6 +32,9 @@ - #include +@@ -33,6 +33,9 @@ #include #include + #include +#ifdef HAVE_SYS_MMAN_H +#include +#endif #ifdef HAVE_SYS_SYSCALL_H #include #endif -@@ -81,6 +84,12 @@ static const LARGE_INTEGER zero_timeout; +@@ -80,6 +83,12 @@ static const LARGE_INTEGER zero_timeout; static pthread_mutex_t addr_mutex = PTHREAD_MUTEX_INITIALIZER; @@ -97,7 +97,7 @@ index a13e53a437b..dc9ced540d4 100644 /* return a monotonic time counter, in Win32 ticks */ static inline ULONGLONG monotonic_counter(void) { -@@ -2312,6 +2321,90 @@ NTSTATUS WINAPI NtQueryInformationAtom( RTL_ATOM atom, ATOM_INFORMATION_CLASS cl +@@ -2393,6 +2402,90 @@ NTSTATUS WINAPI NtQueryInformationAtom( RTL_ATOM atom, ATOM_INFORMATION_CLASS cl } @@ -189,10 +189,10 @@ index a13e53a437b..dc9ced540d4 100644 NTSTATUS CDECL fast_RtlpWaitForCriticalSection( RTL_CRITICAL_SECTION *crit, int timeout ) diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c -index 0078508fc7f..5e59c8c5587 100644 +index e2e9468a727..fbd039f644c 100644 --- a/dlls/wow64/sync.c +++ b/dlls/wow64/sync.c -@@ -1624,3 +1624,26 @@ NTSTATUS WINAPI wow64_NtYieldExecution( UINT *args ) +@@ -1587,3 +1587,26 @@ NTSTATUS WINAPI wow64_NtYieldExecution( UINT *args ) { return NtYieldExecution(); } @@ -220,7 +220,7 @@ index 0078508fc7f..5e59c8c5587 100644 + return NtWaitForAlertByThreadId( address, timeout ); +} diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h -index a565e9cda3a..feca707a9da 100644 +index bc403dd6d31..112711875f7 100644 --- a/dlls/wow64/syscall.h +++ b/dlls/wow64/syscall.h @@ -30,6 +30,7 @@ @@ -231,7 +231,7 @@ index a565e9cda3a..feca707a9da 100644 SYSCALL_ENTRY( NtAllocateLocallyUniqueId ) \ SYSCALL_ENTRY( NtAllocateUuids ) \ SYSCALL_ENTRY( NtAllocateVirtualMemory ) \ -@@ -234,6 +235,7 @@ +@@ -231,6 +232,7 @@ SYSCALL_ENTRY( NtUnlockFile ) \ SYSCALL_ENTRY( NtUnlockVirtualMemory ) \ SYSCALL_ENTRY( NtUnmapViewOfSection ) \ @@ -240,10 +240,10 @@ index a565e9cda3a..feca707a9da 100644 SYSCALL_ENTRY( NtWaitForKeyedEvent ) \ SYSCALL_ENTRY( NtWaitForMultipleObjects ) \ diff --git a/include/winternl.h b/include/winternl.h -index fea9e9df117..9d7a95406ea 100644 +index aeffea80674..b21563213e6 100644 --- a/include/winternl.h +++ b/include/winternl.h -@@ -3820,6 +3820,7 @@ NTSYSAPI NTSTATUS WINAPI NtAdjustGroupsToken(HANDLE,BOOLEAN,PTOKEN_GROUPS,ULONG +@@ -3845,6 +3845,7 @@ NTSYSAPI NTSTATUS WINAPI NtAdjustGroupsToken(HANDLE,BOOLEAN,PTOKEN_GROUPS,ULONG NTSYSAPI NTSTATUS WINAPI NtAdjustPrivilegesToken(HANDLE,BOOLEAN,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD); NTSYSAPI NTSTATUS WINAPI NtAlertResumeThread(HANDLE,PULONG); NTSYSAPI NTSTATUS WINAPI NtAlertThread(HANDLE ThreadHandle); @@ -251,7 +251,7 @@ index fea9e9df117..9d7a95406ea 100644 NTSYSAPI NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID lpLuid); NTSYSAPI NTSTATUS WINAPI NtAllocateUuids(PULARGE_INTEGER,PULONG,PULONG,PUCHAR); NTSYSAPI NTSTATUS WINAPI NtAllocateVirtualMemory(HANDLE,PVOID*,ULONG_PTR,SIZE_T*,ULONG,ULONG); -@@ -4062,6 +4063,7 @@ NTSYSAPI NTSTATUS WINAPI NtUnlockFile(HANDLE,PIO_STATUS_BLOCK,PLARGE_INTEGER,PL +@@ -4084,6 +4085,7 @@ NTSYSAPI NTSTATUS WINAPI NtUnlockFile(HANDLE,PIO_STATUS_BLOCK,PLARGE_INTEGER,PL NTSYSAPI NTSTATUS WINAPI NtUnlockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG); NTSYSAPI NTSTATUS WINAPI NtUnmapViewOfSection(HANDLE,PVOID); NTSYSAPI NTSTATUS WINAPI NtVdmControl(ULONG,PVOID); diff --git a/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch b/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch index 80b5a891..5469bcb5 100644 --- a/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch +++ b/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch @@ -1,19 +1,19 @@ -From 5199e9b66777ab4436b8d641dd8412da472d718d Mon Sep 17 00:00:00 2001 +From 54b37227849cb6e4d214b4a6740d37624e4bb037 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Tue, 14 Jul 2020 15:00:34 +0300 Subject: [PATCH] ntdll: Support x86_64 syscall emulation. --- configure.ac | 1 + - dlls/ntdll/unix/signal_x86_64.c | 122 ++++++++++++++++++++++++++++++++ + dlls/ntdll/unix/signal_x86_64.c | 123 ++++++++++++++++++++++++++++++++ tools/winebuild/import.c | 3 +- - 3 files changed, 124 insertions(+), 2 deletions(-) + 3 files changed, 125 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index 594794ed93c..38f6e76eae0 100644 +index 9af23da03e6..058fea5941d 100644 --- a/configure.ac +++ b/configure.ac -@@ -479,6 +479,7 @@ AC_CHECK_HEADERS(\ +@@ -455,6 +455,7 @@ AC_CHECK_HEADERS(\ linux/joystick.h \ linux/major.h \ linux/param.h \ @@ -22,18 +22,24 @@ index 594794ed93c..38f6e76eae0 100644 linux/types.h \ linux/ucdrom.h \ diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c -index a9bdbf62929..7d9ee03ffaf 100644 +index 4600d079536..f028a855147 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c -@@ -28,6 +28,7 @@ - #include "wine/port.h" +@@ -27,11 +27,13 @@ + #include "config.h" #include +#include #include #include #include -@@ -68,6 +69,13 @@ + #include + #include ++#include + #include + #include + #include +@@ -65,6 +67,13 @@ # include #endif @@ -47,7 +53,7 @@ index a9bdbf62929..7d9ee03ffaf 100644 #define NONAMELESSUNION #define NONAMELESSSTRUCT #include "ntstatus.h" -@@ -2426,6 +2434,118 @@ static inline DWORD is_privileged_instr( CONTEXT *context ) +@@ -2422,6 +2431,118 @@ static inline DWORD is_privileged_instr( CONTEXT *context ) return 0; } @@ -166,7 +172,7 @@ index a9bdbf62929..7d9ee03ffaf 100644 /*********************************************************************** * handle_interrupt -@@ -2980,6 +3100,7 @@ void signal_init_process(void) +@@ -3000,6 +3121,7 @@ void signal_init_process(void) if (sigaction( SIGSEGV, &sig_act, NULL ) == -1) goto error; if (sigaction( SIGILL, &sig_act, NULL ) == -1) goto error; if (sigaction( SIGBUS, &sig_act, NULL ) == -1) goto error; @@ -174,7 +180,7 @@ index a9bdbf62929..7d9ee03ffaf 100644 return; error: -@@ -3175,6 +3296,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, +@@ -3218,6 +3340,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "leaq 0x28(%rsp),%rsi\n\t" /* first argument */ "movq %rcx,%rsp\n\t" "movq 0x00(%rcx),%rax\n\t" @@ -183,10 +189,10 @@ index a9bdbf62929..7d9ee03ffaf 100644 "movl %eax,%ebx\n\t" "shrl $8,%ebx\n\t" diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c -index fcd27117780..0da028d83e7 100644 +index 104397716f1..5f62210f486 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c -@@ -1419,7 +1419,6 @@ static int cmp_link_name( const void *e1, const void *e2 ) +@@ -1410,7 +1410,6 @@ static int cmp_link_name( const void *e1, const void *e2 ) return strcmp( odp1->link_name, odp2->link_name ); } @@ -194,7 +200,7 @@ index fcd27117780..0da028d83e7 100644 /* output the functions for system calls */ void output_syscalls( DLLSPEC *spec ) { -@@ -1477,7 +1476,7 @@ void output_syscalls( DLLSPEC *spec ) +@@ -1468,7 +1467,7 @@ void output_syscalls( DLLSPEC *spec ) * validate that instruction, we can just put a jmp there instead. */ output( "\t.byte 0x4c,0x8b,0xd1\n" ); /* movq %rcx,%r10 */ output( "\t.byte 0xb8\n" ); /* movl $i,%eax */ diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index b5651f01..082cace5 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "530c1839603bd3caa1b9d17fe458b5bd341ccfc9" + echo "f712a98d12d091c5437159a291857dfb9f0cea7c" } # Show version information @@ -128,8 +128,6 @@ patch_enable_all () enable_krnl386_exe16_Invalid_Console_Handles="$1" enable_libs_Unicode_Collation="$1" enable_loader_KeyboardLayouts="$1" - enable_mfplat_reverts="$1" - enable_mfplat_streaming_support="$1" enable_mmsystem_dll16_MIDIHDR_Refcount="$1" enable_mountmgr_DosDevices="$1" enable_mscoree_CorValidateImage="$1" @@ -414,12 +412,6 @@ patch_enable () loader-KeyboardLayouts) enable_loader_KeyboardLayouts="$2" ;; - mfplat-reverts) - enable_mfplat_reverts="$2" - ;; - mfplat-streaming-support) - enable_mfplat_streaming_support="$2" - ;; mmsystem.dll16-MIDIHDR_Refcount) enable_mmsystem_dll16_MIDIHDR_Refcount="$2" ;; @@ -1307,13 +1299,6 @@ if test "$enable_ntdll_WRITECOPY" -eq 1; then enable_ntdll_ForceBottomUpAlloc=1 fi -if test "$enable_mfplat_streaming_support" -eq 1; then - if test "$enable_mfplat_reverts" -gt 1; then - abort "Patchset mfplat-reverts disabled, but mfplat-streaming-support depends on that." - fi - enable_mfplat_reverts=1 -fi - if test "$enable_fltmgr_sys_FltBuildDefaultSecurityDescriptor" -eq 1; then if test "$enable_winedevice_Default_Drivers" -gt 1; then abort "Patchset winedevice-Default_Drivers disabled, but fltmgr.sys-FltBuildDefaultSecurityDescriptor depends on that." @@ -2246,95 +2231,6 @@ if test "$enable_loader_KeyboardLayouts" -eq 1; then patch_apply loader-KeyboardLayouts/0002-user32-Improve-GetKeyboardLayoutList.patch fi -# Patchset mfplat-reverts -# | -# | Modified files: -# | * dlls/winegstreamer/Makefile.in, dlls/winegstreamer/gst_private.h, dlls/winegstreamer/main.c, -# | dlls/winegstreamer/media_source.c, dlls/winegstreamer/quartz_parser.c, dlls/winegstreamer/unixlib.h, -# | dlls/winegstreamer/wg_parser.c, dlls/winegstreamer/winegstreamer.spec, dlls/winegstreamer/wm_asyncreader.c, -# | dlls/winegstreamer/wm_syncreader.c, dlls/wmvcore/Makefile.in, dlls/wmvcore/reader.c, dlls/wmvcore/syncreader.c, -# | dlls/wmvcore/wmvcore_main.c -# | -if test "$enable_mfplat_reverts" -eq 1; then - patch_apply mfplat-reverts/0001-Revert-winegstreamer-Get-rid-of-the-WMReader-typedef.patch - patch_apply mfplat-reverts/0002-Revert-wmvcore-Move-the-async-reader-implementation-.patch - patch_apply mfplat-reverts/0003-Revert-winegstreamer-Get-rid-of-the-WMSyncReader-typ.patch - patch_apply mfplat-reverts/0004-Revert-wmvcore-Move-the-sync-reader-implementation-t.patch - patch_apply mfplat-reverts/0005-Revert-winegstreamer-Translate-GST_AUDIO_CHANNEL_POS.patch - patch_apply mfplat-reverts/0006-Revert-winegstreamer-Trace-the-unfiltered-caps-in-si.patch - patch_apply mfplat-reverts/0007-Revert-winegstreamer-Avoid-seeking-past-the-end-of-a.patch - patch_apply mfplat-reverts/0008-Revert-winegstreamer-Avoid-passing-a-NULL-buffer-to-.patch - patch_apply mfplat-reverts/0009-Revert-winegstreamer-Use-array_reserve-to-reallocate.patch - patch_apply mfplat-reverts/0010-Revert-winegstreamer-Handle-zero-length-reads-in-src.patch - patch_apply mfplat-reverts/0011-Revert-winegstreamer-Convert-the-Unix-library-to-the.patch - patch_apply mfplat-reverts/0012-Revert-winegstreamer-Return-void-from-wg_parser_stre.patch - patch_apply mfplat-reverts/0013-Revert-winegstreamer-Move-Unix-library-definitions-i.patch - patch_apply mfplat-reverts/0014-Revert-winegstreamer-Remove-the-no-longer-used-start.patch - patch_apply mfplat-reverts/0015-Revert-winegstreamer-Set-unlimited-buffering-using-a.patch - patch_apply mfplat-reverts/0016-Revert-winegstreamer-Initialize-GStreamer-in-wg_pars.patch - patch_apply mfplat-reverts/0017-Revert-winegstreamer-Use-a-single-wg_parser_create-e.patch - patch_apply mfplat-reverts/0018-Revert-winegstreamer-Fix-return-code-in-init_gst-fai.patch - patch_apply mfplat-reverts/0019-Revert-winegstreamer-Allocate-source-media-buffers-i.patch - patch_apply mfplat-reverts/0020-Revert-winegstreamer-Duplicate-source-shutdown-path-.patch - patch_apply mfplat-reverts/0021-Revert-winegstreamer-Properly-clean-up-from-failure-.patch - patch_apply mfplat-reverts/0022-Revert-winegstreamer-Factor-out-more-of-the-init_gst.patch -fi - -# Patchset mfplat-streaming-support -# | -# | This patchset has the following (direct or indirect) dependencies: -# | * mfplat-reverts -# | -# | This patchset fixes the following Wine bugs: -# | * [#49692] Multiple applications need a Media Foundation media source implementation -# | -# | Modified files: -# | * dlls/mf/topology.c, dlls/mfplat/main.c, dlls/winegstreamer/Makefile.in, dlls/winegstreamer/audioconvert.c, -# | dlls/winegstreamer/colorconvert.c, dlls/winegstreamer/decode_transform.c, dlls/winegstreamer/gst_private.h, -# | dlls/winegstreamer/media_source.c, dlls/winegstreamer/mfplat.c, dlls/winegstreamer/quartz_parser.c, -# | dlls/winegstreamer/wg_parser.c, dlls/winegstreamer/winegstreamer_classes.idl, include/mfidl.idl, include/wmcodecdsp.idl -# | -if test "$enable_mfplat_streaming_support" -eq 1; then - patch_apply mfplat-streaming-support/0001-winegstreamer-Activate-source-pad-in-push-mode-if-it.patch - patch_apply mfplat-streaming-support/0002-winegstreamer-Push-stream-start-and-segment-events-i.patch - patch_apply mfplat-streaming-support/0003-winegstreamer-Introduce-H.264-decoder-transform.patch - patch_apply mfplat-streaming-support/0004-winegstreamer-Implement-GetInputAvailableType-for-de.patch - patch_apply mfplat-streaming-support/0005-winegstreamer-Implement-GetOutputAvailableType-for-d.patch - patch_apply mfplat-streaming-support/0006-winegstreamer-Implement-SetInputType-for-decode-tran.patch - patch_apply mfplat-streaming-support/0007-winegstreamer-Implement-SetOutputType-for-decode-tra.patch - patch_apply mfplat-streaming-support/0008-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch - patch_apply mfplat-streaming-support/0009-winegstreamer-Add-push-mode-path-for-wg_parser.patch - patch_apply mfplat-streaming-support/0010-winegstreamer-Implement-Process-Input-Output-for-dec.patch - patch_apply mfplat-streaming-support/0011-winestreamer-Implement-ProcessMessage-for-decoder-tr.patch - patch_apply mfplat-streaming-support/0012-winegstreamer-Semi-stub-GetAttributes-for-decoder-tr.patch - patch_apply mfplat-streaming-support/0013-winegstreamer-Register-the-H.264-decoder-transform.patch - patch_apply mfplat-streaming-support/0014-winegstreamer-Introduce-AAC-decoder-transform.patch - patch_apply mfplat-streaming-support/0015-winegstreamer-Register-the-AAC-decoder-transform.patch - patch_apply mfplat-streaming-support/0016-winegstreamer-Rename-GStreamer-objects-to-be-more-ge.patch - patch_apply mfplat-streaming-support/0017-winegstreamer-Report-streams-backwards-in-media-sour.patch - patch_apply mfplat-streaming-support/0018-winegstreamer-Implement-Process-Input-Output-for-aud.patch - patch_apply mfplat-streaming-support/0019-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch - patch_apply mfplat-streaming-support/0020-winegstreamer-Semi-stub-Get-Attributes-functions-for.patch - patch_apply mfplat-streaming-support/0021-winegstreamer-Introduce-color-conversion-transform.patch - patch_apply mfplat-streaming-support/0022-winegstreamer-Register-the-color-conversion-transfor.patch - patch_apply mfplat-streaming-support/0023-winegstreamer-Implement-GetInputAvailableType-for-co.patch - patch_apply mfplat-streaming-support/0024-winegstreamer-Implement-SetInputType-for-color-conve.patch - patch_apply mfplat-streaming-support/0025-winegstreamer-Implement-GetOutputAvailableType-for-c.patch - patch_apply mfplat-streaming-support/0026-winegstreamer-Implement-SetOutputType-for-color-conv.patch - patch_apply mfplat-streaming-support/0027-winegstreamer-Implement-Process-Input-Output-for-col.patch - patch_apply mfplat-streaming-support/0028-winegstreamer-Implement-ProcessMessage-for-color-con.patch - patch_apply mfplat-streaming-support/0029-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch - patch_apply mfplat-streaming-support/0030-mf-topology-Forward-failure-from-SetOutputType-when-.patch - patch_apply mfplat-streaming-support/0031-winegstreamer-Handle-flush-command-in-audio-converst.patch - patch_apply mfplat-streaming-support/0032-winegstreamer-In-the-default-configuration-select-on.patch - patch_apply mfplat-streaming-support/0033-winegstreamer-Implement-MF_SD_LANGUAGE.patch - patch_apply mfplat-streaming-support/0034-winegstreamer-Only-require-videobox-element-for-pars.patch - patch_apply mfplat-streaming-support/0035-winegstreamer-Don-t-rely-on-max_size-in-unseekable-p.patch - patch_apply mfplat-streaming-support/0036-winegstreamer-Implement-MFT_MESSAGE_COMMAND_FLUSH-fo.patch - patch_apply mfplat-streaming-support/0037-winegstreamer-Default-Frame-size-if-one-isn-t-availa.patch - patch_apply mfplat-streaming-support/0038-mfplat-Stub-out-MFCreateDXGIDeviceManager-to-avoid-t.patch -fi - # Patchset mmsystem.dll16-MIDIHDR_Refcount # | # | This patchset fixes the following Wine bugs: diff --git a/staging/upstream-commit b/staging/upstream-commit index 8a2249ce..4fe5eab6 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -530c1839603bd3caa1b9d17fe458b5bd341ccfc9 +f712a98d12d091c5437159a291857dfb9f0cea7c