mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Rebase against f712a98d12d091c5437159a291857dfb9f0cea7c.
This commit is contained in:
parent
164b361be6
commit
feb91195ff
File diff suppressed because it is too large
Load Diff
@ -1,168 +0,0 @@
|
||||
From 2c3d9dfc09ee64767347574e0bd6e8f5511a6a54 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1,579 +0,0 @@
|
||||
From 92f0e4d02787c066c9b58a661981723f26c8e123 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1,161 +0,0 @@
|
||||
From 59b60c9a19de54bc0f6541395ffcf49d96437b8c Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1,30 +0,0 @@
|
||||
From 6bde437d76c256778d706da4874a4db2a37e0e3a Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 0cc0b9856041daede1d49ce5ba3bde736edd0a92 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1,33 +0,0 @@
|
||||
From dd5d76af94c794f9679c29bec0dc436bfaa78edc Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1,52 +0,0 @@
|
||||
From 9d20d8d508a65ef044a3d903eb2c96e9b4d08429 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1,122 +0,0 @@
|
||||
From 997978816252d56a53b53d8d0a1913f78b3aad42 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1,44 +0,0 @@
|
||||
From 6e82f802820e9ed145201091cd636f2e83d85e67 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,91 +0,0 @@
|
||||
From 3753c3b6c8c99a664430805c3e7bd7273064f379 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1,382 +0,0 @@
|
||||
From 79181b01cb2cb9c6cafd3ea08920e892e37cd654 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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 <stdbool.h>
|
||||
-#include <stdint.h>
|
||||
-#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 <assert.h>
|
||||
-#include <stdarg.h>
|
||||
-#include <stdio.h>
|
||||
-
|
||||
-#include <gst/gst.h>
|
||||
-#include <gst/video/video.h>
|
||||
-#include <gst/audio/audio.h>
|
||||
-
|
||||
#include "ntstatus.h"
|
||||
#define WIN32_NO_STATUS
|
||||
+#include "gst_private.h"
|
||||
#include "winternl.h"
|
||||
-#include "dshow.h"
|
||||
|
||||
-#include "unixlib.h"
|
||||
+#include <gst/gst.h>
|
||||
+#include <gst/video/video.h>
|
||||
+#include <gst/audio/audio.h>
|
||||
|
||||
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
|
||||
|
@ -1,27 +0,0 @@
|
||||
From d4afee5c3a6b8875563c3f931e3eaff3e55b87dc Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1,180 +0,0 @@
|
||||
From 421567d9cdd09b1d9db8410160ac1c106a05f2f9 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1,88 +0,0 @@
|
||||
From 1dd81b5b288ffe70164d06548cfcee61089ca0fd Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1,192 +0,0 @@
|
||||
From cf1958f12f33ec46546cac81d958cf38bf9245dc Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1,29 +0,0 @@
|
||||
From 5e55fd289a3baca9c53757c3b7ace7e5f51040f4 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1,224 +0,0 @@
|
||||
From eb244f666ec0ed78a7ca101f735c6555648c8da6 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1,221 +0,0 @@
|
||||
From ee5ed3858dd7747358b2627511be3369f10a54c5 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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 <assert.h>
|
||||
-#include <limits.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
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
|
||||
|
@ -1,140 +0,0 @@
|
||||
From eb2329e6547f41329cb909f44fb05f7a8c2864ac Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1,160 +0,0 @@
|
||||
From 000e19a29821dbbe21534eb4b2a6d784001dbda2 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -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.
|
@ -1,2 +1,2 @@
|
||||
Fixes: [49692] Multiple applications need a Media Foundation media source implementation
|
||||
Depends: mfplat-reverts
|
||||
Disabled: True
|
||||
|
@ -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?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 8 Sep 2020 18:43:52 +0200
|
||||
Subject: [PATCH] msxml3: Implement FreeThreadedXMLHTTP60.
|
||||
@ -15,21 +15,21 @@ Update from Gijs Vermeulen <gijsvrm@gmail.com>
|
||||
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
|
||||
|
||||
|
@ -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?= <michael@fds-team.de>
|
||||
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
|
||||
|
||||
|
@ -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" <erich.e.hoover@gmail.com>
|
||||
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 <erich.e.hoover@gmail.com>
|
||||
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 <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
+#include <libgen.h>
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_MNTENT_H
|
||||
#include <mntent.h>
|
||||
@@ -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 \
|
||||
|
@ -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 <z.figura12@gmail.com>
|
||||
Date: Fri, 30 Apr 2021 15:07:04 -0500
|
||||
Subject: [PATCH] ntdll: Implement NtAlertThreadByThreadId and
|
||||
@ -15,10 +15,10 @@ Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
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 <errno.h>
|
||||
@@ -33,6 +33,9 @@
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
#include <sys/types.h>
|
||||
+#ifdef HAVE_SYS_MMAN_H
|
||||
+#include <sys/mman.h>
|
||||
+#endif
|
||||
#ifdef HAVE_SYS_SYSCALL_H
|
||||
#include <sys/syscall.h>
|
||||
#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);
|
||||
|
@ -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 <pgofman@codeweavers.com>
|
||||
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 <assert.h>
|
||||
+#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
@@ -68,6 +69,13 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
+#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
@@ -65,6 +67,13 @@
|
||||
# include <mach/mach.h>
|
||||
#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 */
|
||||
|
@ -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:
|
||||
|
@ -1 +1 @@
|
||||
530c1839603bd3caa1b9d17fe458b5bd341ccfc9
|
||||
f712a98d12d091c5437159a291857dfb9f0cea7c
|
||||
|
Loading…
Reference in New Issue
Block a user