Rebase against a87abdbe85779adf6a2a7897bd88984587880693.

This commit is contained in:
Alistair Leslie-Hughes 2021-10-02 12:00:05 +10:00
parent c4535e89f7
commit 4d66e1bf6b
16 changed files with 618 additions and 140 deletions

View File

@ -1,17 +1,17 @@
From 990050ed436283fb820d4fe64b08dda3ac7ea9e2 Mon Sep 17 00:00:00 2001
From 281b0621aa872330ab61f927750deb0753417ec8 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 8 Jun 2021 09:34:28 +1000
Subject: [PATCH 2/2] d3d10: Avoid implicit cast of interface pointer.
Subject: [PATCH] d3d10: Avoid implicit cast of interface pointer.
---
dlls/d3d10/effect.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c
index 86ef50aac01..060fb69ce3e 100644
index 5a5f9f37e6d..c127cb2bd2d 100644
--- a/dlls/d3d10/effect.c
+++ b/dlls/d3d10/effect.c
@@ -126,7 +126,7 @@ static inline struct d3d10_effect_variable *impl_from_ID3D10EffectVariable(ID3D1
@@ -131,7 +131,7 @@ static inline struct d3d10_effect_variable *impl_from_ID3D10EffectVariable(ID3D1
static inline struct d3d10_effect_variable *impl_from_ID3D10EffectShaderVariable(ID3D10EffectShaderVariable *iface)
{
@ -19,8 +19,8 @@ index 86ef50aac01..060fb69ce3e 100644
+ return CONTAINING_RECORD((ID3D10EffectVariable*)iface, struct d3d10_effect_variable, ID3D10EffectVariable_iface);
}
struct d3d10_effect_state_property_info
@@ -4665,7 +4665,7 @@ static void read_variable_array_from_buffer(struct d3d10_effect_variable *variab
enum d3d10_effect_container_type
@@ -4969,7 +4969,7 @@ static void read_variable_array_from_buffer(struct d3d10_effect_variable *variab
static inline struct d3d10_effect_variable *impl_from_ID3D10EffectScalarVariable(ID3D10EffectScalarVariable *iface)
{
@ -29,7 +29,7 @@ index 86ef50aac01..060fb69ce3e 100644
}
static BOOL STDMETHODCALLTYPE d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable *iface)
@@ -5001,7 +5001,7 @@ static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_
@@ -5305,7 +5305,7 @@ static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_
static inline struct d3d10_effect_variable *impl_from_ID3D10EffectVectorVariable(ID3D10EffectVectorVariable *iface)
{
@ -38,7 +38,7 @@ index 86ef50aac01..060fb69ce3e 100644
}
static BOOL STDMETHODCALLTYPE d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable *iface)
@@ -5488,7 +5488,7 @@ static void read_matrix_variable_array_from_buffer(struct d3d10_effect_variable
@@ -5792,7 +5792,7 @@ static void read_matrix_variable_array_from_buffer(struct d3d10_effect_variable
static inline struct d3d10_effect_variable *impl_from_ID3D10EffectMatrixVariable(ID3D10EffectMatrixVariable *iface)
{
@ -47,7 +47,7 @@ index 86ef50aac01..060fb69ce3e 100644
}
static BOOL STDMETHODCALLTYPE d3d10_effect_matrix_variable_IsValid(ID3D10EffectMatrixVariable *iface)
@@ -5995,7 +5995,7 @@ static void set_shader_resource_variable(ID3D10ShaderResourceView **src, ID3D10S
@@ -6315,7 +6315,7 @@ static void set_shader_resource_variable(ID3D10ShaderResourceView **src, ID3D10S
static inline struct d3d10_effect_variable *impl_from_ID3D10EffectShaderResourceVariable(
ID3D10EffectShaderResourceVariable *iface)
{
@ -57,5 +57,5 @@ index 86ef50aac01..060fb69ce3e 100644
static BOOL STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_IsValid(ID3D10EffectShaderResourceVariable *iface)
--
2.30.2
2.33.0

View File

@ -1,4 +1,4 @@
From e26a5fd9e3b44cbee2919398233739d985274638 Mon Sep 17 00:00:00 2001
From 16e4ec7b0a93b164e54a6665af39a25def99bfc8 Mon Sep 17 00:00:00 2001
From: Daniel Wendt <daniel.wendt@linux.com>
Date: Fri, 15 Nov 2013 12:52:37 +0100
Subject: [PATCH] gdi32: fix for rotated Arc, ArcTo, Chord and Pie drawing
@ -11,10 +11,10 @@ Wine-Bug: http://bugs.winehq.org/show_bug.cgi?id=34579
2 files changed, 83 insertions(+)
diff --git a/dlls/gdi32/dibdrv/graphics.c b/dlls/gdi32/dibdrv/graphics.c
index 9ebcaf7e4a3..c4456a76e77 100644
index 875ae308546..ea03cac886f 100644
--- a/dlls/gdi32/dibdrv/graphics.c
+++ b/dlls/gdi32/dibdrv/graphics.c
@@ -312,6 +312,60 @@ static int get_arc_points( int arc_dir, const RECT *rect, POINT start, POINT end
@@ -316,6 +316,60 @@ static int get_arc_points( int arc_dir, const RECT *rect, POINT start, POINT end
return pos - count;
}
@ -75,7 +75,7 @@ index 9ebcaf7e4a3..c4456a76e77 100644
/* backend for arc functions; extra_lines is -1 for ArcTo, 0 for Arc, 1 for Chord, 2 for Pie */
static BOOL draw_arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
INT start_x, INT start_y, INT end_x, INT end_y, INT extra_lines )
@@ -324,6 +378,22 @@ static BOOL draw_arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
@@ -328,6 +382,22 @@ static BOOL draw_arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
BOOL ret = TRUE;
HRGN outline = 0, interior = 0;
@ -98,7 +98,7 @@ index 9ebcaf7e4a3..c4456a76e77 100644
if (!get_pen_device_rect( dc, pdev, &rect, left, top, right, bottom )) return TRUE;
width = rect.right - rect.left;
@@ -357,6 +427,16 @@ static BOOL draw_arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
@@ -361,6 +431,16 @@ static BOOL draw_arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
points[count].y = rect.top + height / 2;
count++;
}
@ -114,9 +114,9 @@ index 9ebcaf7e4a3..c4456a76e77 100644
+
if (count < 2)
{
HeapFree( GetProcessHeap(), 0, points );
free( points );
diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h
index 9f092913110..8dbf2772555 100644
index 45bd5431a23..3f04d02f7a1 100644
--- a/dlls/gdi32/gdi_private.h
+++ b/dlls/gdi32/gdi_private.h
@@ -303,4 +303,7 @@ static inline int get_dib_info_size( const BITMAPINFO *info, UINT coloruse )

View File

@ -1,4 +1,4 @@
From 017514cff847b53d409bf5c8735c30d26474ed8f Mon Sep 17 00:00:00 2001
From f678f5184cb4eef1ab47a4f8b4949c83f1af9791 Mon Sep 17 00:00:00 2001
From: Daniel Wendt <daniel.wendt@linux.com>
Date: Tue, 10 Dec 2013 14:55:32 +0100
Subject: [PATCH] gdi32: fix for rotated ellipse
@ -9,10 +9,10 @@ Bug: http://bugs.winehq.org/show_bug.cgi?id=35331
1 file changed, 42 insertions(+), 18 deletions(-)
diff --git a/dlls/gdi32/dibdrv/graphics.c b/dlls/gdi32/dibdrv/graphics.c
index da9144f0862..6a0519644f4 100644
index ea03cac886f..412d19249f0 100644
--- a/dlls/gdi32/dibdrv/graphics.c
+++ b/dlls/gdi32/dibdrv/graphics.c
@@ -1535,6 +1535,23 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
@@ -1541,6 +1541,23 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
BOOL ret = TRUE;
HRGN outline = 0, interior = 0;
@ -36,7 +36,7 @@ index da9144f0862..6a0519644f4 100644
if (!get_pen_device_rect( dc, pdev, &rect, left, top, right, bottom )) return TRUE;
pt[0].x = pt[0].y = 0;
@@ -1555,23 +1572,6 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
@@ -1561,23 +1578,6 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
return FALSE;
}
@ -44,7 +44,7 @@ index da9144f0862..6a0519644f4 100644
- !(interior = NtGdiCreateRoundRectRgn( rect.left, rect.top, rect.right + 1, rect.bottom + 1,
- ellipse_width, ellipse_height )))
- {
- HeapFree( GetProcessHeap(), 0, points );
- free( points );
- if (outline) NtGdiDeleteObjectApp( outline );
- return FALSE;
- }
@ -60,7 +60,7 @@ index da9144f0862..6a0519644f4 100644
count = ellipse_first_quadrant( ellipse_width, ellipse_height, points );
if (dc->attr->arc_direction == AD_CLOCKWISE)
@@ -1615,13 +1615,37 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
@@ -1621,13 +1621,37 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
}
count = end + 1;
@ -76,7 +76,7 @@ index da9144f0862..6a0519644f4 100644
+ if (pdev->brush.style != BS_NULL &&
+ !(interior = NtGdiPolyPolyDraw( ULongToHandle(ALTERNATE), points, (const UINT *)&count, 1, NtGdiPolyPolygonRgn )))
+ {
+ HeapFree( GetProcessHeap(), 0, points );
+ free( points );
+ if (outline) NtGdiDeleteObjectApp( outline );
+ return FALSE;
+ }

View File

@ -0,0 +1,27 @@
From 30120049d9403c6d2eed5a2e1aeb7a3c71557e35 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 1/9] 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

View File

@ -0,0 +1,180 @@
From 0909d7fc577a0406791e112bc1e920bf37be0152 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 2/9] 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

View File

@ -0,0 +1,88 @@
From 21e917e0afa2c59304e375da6d7230ba22d0d361 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 3/9] 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

View File

@ -0,0 +1,192 @@
From ffbc85a3089b39308582cab7de021c7d1d3481f2 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 4/9] 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

View File

@ -1,7 +1,7 @@
From 28339597a00da381c079c9d4f46b67780511c267 Mon Sep 17 00:00:00 2001
From ad6648fd5f8bb2a01c4ac94e0478030690213790 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 1/6] Revert "winegstreamer: Fix return code in init_gst
Subject: [PATCH 5/9] Revert "winegstreamer: Fix return code in init_gst
failure case."
This reverts commit b9a7e961cdd39203866be38e90b1d901595d54ba.

View File

@ -1,7 +1,7 @@
From 2e341e32dd761e40c9045648b0edfabd9b49fc4e Mon Sep 17 00:00:00 2001
From 1d45ee3329da8099c566dd9cf7f0075271c64957 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 3/6] Revert "winegstreamer: Allocate source media buffers in
Subject: [PATCH 6/9] Revert "winegstreamer: Allocate source media buffers in
the PE components."
This reverts commit 8b7390f80d866435f06f2571a93bcd67c0947673.
@ -13,10 +13,10 @@ This reverts commit 8b7390f80d866435f06f2571a93bcd67c0947673.
4 files changed, 23 insertions(+), 66 deletions(-)
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h
index 49e06b31369..c29fc4a2437 100644
index 923bba25d38..c5e4367811f 100644
--- a/dlls/winegstreamer/gst_private.h
+++ b/dlls/winegstreamer/gst_private.h
@@ -170,10 +170,9 @@ struct unix_funcs
@@ -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);
@ -31,10 +31,10 @@ index 49e06b31369..c29fc4a2437 100644
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 825bad8da27..95bdb9b488e 100644
index 12ca14ca139..87959546a7c 100644
--- a/dlls/winegstreamer/media_source.c
+++ b/dlls/winegstreamer/media_source.c
@@ -530,11 +530,6 @@ static DWORD CALLBACK read_thread(void *arg)
@@ -613,11 +613,6 @@ static DWORD CALLBACK read_thread(void *arg)
{
struct media_source *source = arg;
IMFByteStream *byte_stream = source->byte_stream;
@ -46,7 +46,7 @@ index 825bad8da27..95bdb9b488e 100644
TRACE("Starting read thread for media source %p.\n", source);
@@ -544,33 +539,18 @@ static DWORD CALLBACK read_thread(void *arg)
@@ -627,33 +622,18 @@ static DWORD CALLBACK read_thread(void *arg)
ULONG ret_size;
uint32_t size;
HRESULT hr;
@ -134,10 +134,10 @@ index 5299f4dc2ed..09a916d7f5c 100644
return 0;
}
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
index f0815e37689..119cbffbd88 100644
index dde137ef186..e12cb08776b 100644
--- a/dlls/winegstreamer/wg_parser.c
+++ b/dlls/winegstreamer/wg_parser.c
@@ -517,8 +517,8 @@ static void CDECL wg_parser_end_flush(struct wg_parser *parser)
@@ -524,8 +524,8 @@ static void CDECL wg_parser_end_flush(struct wg_parser *parser)
pthread_mutex_unlock(&parser->mutex);
}
@ -148,7 +148,7 @@ index f0815e37689..119cbffbd88 100644
{
pthread_mutex_lock(&parser->mutex);
@@ -531,6 +531,7 @@ static bool CDECL wg_parser_get_next_read_offset(struct wg_parser *parser,
@@ -538,6 +538,7 @@ static bool CDECL wg_parser_get_next_read_offset(struct wg_parser *parser,
return false;
}
@ -156,7 +156,7 @@ index f0815e37689..119cbffbd88 100644
*offset = parser->read_request.offset;
*size = parser->read_request.size;
@@ -538,15 +539,11 @@ static bool CDECL wg_parser_get_next_read_offset(struct wg_parser *parser,
@@ -545,15 +546,11 @@ static bool CDECL wg_parser_get_next_read_offset(struct wg_parser *parser,
return true;
}
@ -174,7 +174,7 @@ index f0815e37689..119cbffbd88 100644
parser->read_request.data = NULL;
pthread_mutex_unlock(&parser->mutex);
pthread_cond_signal(&parser->read_done_cond);
@@ -1217,6 +1214,10 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent,
@@ -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;
@ -185,7 +185,7 @@ index f0815e37689..119cbffbd88 100644
if (!*buffer)
*buffer = new_buffer = gst_buffer_new_and_alloc(size);
@@ -1240,7 +1241,6 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent,
@@ -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;
@ -193,7 +193,7 @@ index f0815e37689..119cbffbd88 100644
pthread_mutex_unlock(&parser->mutex);
@@ -1248,12 +1248,10 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent,
@@ -1255,12 +1255,10 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent,
GST_LOG("Request returned %d.", ret);
@ -208,7 +208,7 @@ index f0815e37689..119cbffbd88 100644
}
static gboolean src_query_cb(GstPad *pad, GstObject *parent, GstQuery *query)
@@ -1920,8 +1918,8 @@ static const struct unix_funcs funcs =
@@ -1927,8 +1925,8 @@ static const struct unix_funcs funcs =
wg_parser_begin_flush,
wg_parser_end_flush,

View File

@ -1,7 +1,7 @@
From ca25389c3980c848dc6094f84160079a4cf805f7 Mon Sep 17 00:00:00 2001
From 0a3805b8c2476df04303a59b118cb00146bd4cc3 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 4/6] Revert "winegstreamer: Duplicate source shutdown path
Subject: [PATCH 7/9] Revert "winegstreamer: Duplicate source shutdown path
into constructor with leak fixes."
This reverts commit 67734bfce31d6032cee1a8980a9022665e9e18fa.
@ -11,7 +11,7 @@ This reverts commit 67734bfce31d6032cee1a8980a9022665e9e18fa.
2 files changed, 37 insertions(+), 66 deletions(-)
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h
index c29fc4a2437..c6c99b1dd55 100644
index c5e4367811f..9a753a01b46 100644
--- a/dlls/winegstreamer/gst_private.h
+++ b/dlls/winegstreamer/gst_private.h
@@ -22,7 +22,6 @@
@ -23,10 +23,10 @@ index c29fc4a2437..c6c99b1dd55 100644
#include <stdbool.h>
#include <stdint.h>
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
index 95bdb9b488e..01ab626254a 100644
index 87959546a7c..64d40fd6fb6 100644
--- a/dlls/winegstreamer/media_source.c
+++ b/dlls/winegstreamer/media_source.c
@@ -733,12 +733,6 @@ static HRESULT new_media_stream(struct media_source *source,
@@ -817,12 +817,6 @@ static HRESULT new_media_stream(struct media_source *source,
object->IMFMediaStream_iface.lpVtbl = &media_stream_vtbl;
object->ref = 1;
@ -39,7 +39,7 @@ index 95bdb9b488e..01ab626254a 100644
IMFMediaSource_AddRef(&source->IMFMediaSource_iface);
object->parent_source = source;
object->stream_id = stream_id;
@@ -747,11 +741,20 @@ static HRESULT new_media_stream(struct media_source *source,
@@ -831,11 +825,20 @@ static HRESULT new_media_stream(struct media_source *source,
object->eos = FALSE;
object->wg_stream = wg_stream;
@ -60,7 +60,7 @@ index 95bdb9b488e..01ab626254a 100644
}
static HRESULT media_stream_init_desc(struct media_stream *stream)
@@ -844,16 +847,10 @@ 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)))
@ -77,7 +77,7 @@ index 95bdb9b488e..01ab626254a 100644
done:
if (type_handler)
@@ -1216,13 +1213,19 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface)
@@ -1309,13 +1306,19 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface)
unix_funcs->wg_parser_disconnect(source->wg_parser);
@ -103,7 +103,7 @@ index 95bdb9b488e..01ab626254a 100644
for (i = 0; i < source->stream_count; i++)
{
@@ -1230,18 +1233,23 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface)
@@ -1323,18 +1326,23 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface)
stream->state = STREAM_SHUTDOWN;
@ -132,7 +132,7 @@ index 95bdb9b488e..01ab626254a 100644
return S_OK;
}
@@ -1266,7 +1274,6 @@ static const IMFMediaSourceVtbl IMFMediaSource_vtbl =
@@ -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;
@ -140,7 +140,7 @@ index 95bdb9b488e..01ab626254a 100644
struct media_source *object;
UINT64 total_pres_time = 0;
struct wg_parser *parser;
@@ -1330,15 +1337,15 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
@@ -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);
@ -159,7 +159,7 @@ index 95bdb9b488e..01ab626254a 100644
{
if (FAILED(hr = new_media_stream(object, unix_funcs->wg_parser_get_stream(parser, i), i, &object->streams[i])))
goto fail;
@@ -1346,13 +1353,9 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
@@ -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);
@ -174,7 +174,7 @@ index 95bdb9b488e..01ab626254a 100644
}
/* init presentation descriptor */
@@ -1389,39 +1392,8 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
@@ -1482,39 +1485,8 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
fail:
WARN("Failed to construct MFMediaSource, hr %#x.\n", hr);

View File

@ -1,7 +1,7 @@
From e648d762c2609321822334a9a8db8a2f5905b51d Mon Sep 17 00:00:00 2001
From f9a7dd1d5b82b0c9ce25a75af759f057cf5de7db 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 5/6] Revert "winegstreamer: Properly clean up from failure in
Subject: [PATCH 8/9] Revert "winegstreamer: Properly clean up from failure in
wg_parser_connect()."
This reverts commit 721b1eb2ebe5c3eaab8ac3fb1e4f4648cbee5b4d.
@ -10,10 +10,10 @@ This reverts commit 721b1eb2ebe5c3eaab8ac3fb1e4f4648cbee5b4d.
1 file changed, 23 insertions(+), 53 deletions(-)
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
index 119cbffbd88..bf5a51aeaf4 100644
index e12cb08776b..80cc08ea0a5 100644
--- a/dlls/winegstreamer/wg_parser.c
+++ b/dlls/winegstreamer/wg_parser.c
@@ -1034,30 +1034,6 @@ static struct wg_parser_stream *create_stream(struct wg_parser *parser)
@@ -1041,30 +1041,6 @@ static struct wg_parser_stream *create_stream(struct wg_parser *parser)
return stream;
}
@ -44,7 +44,7 @@ index 119cbffbd88..bf5a51aeaf4 100644
static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
{
struct wg_parser *parser = user;
@@ -1544,14 +1520,14 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s
@@ -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))
@ -61,7 +61,7 @@ index 119cbffbd88..bf5a51aeaf4 100644
}
pthread_mutex_lock(&parser->mutex);
@@ -1561,7 +1537,7 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s
@@ -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);
@ -70,7 +70,7 @@ index 119cbffbd88..bf5a51aeaf4 100644
}
for (i = 0; i < parser->stream_count; ++i)
@@ -1601,7 +1577,7 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s
@@ -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);
@ -79,7 +79,7 @@ index 119cbffbd88..bf5a51aeaf4 100644
}
if (gst_pad_query_duration(stream->their_src, GST_FORMAT_TIME, &duration))
{
@@ -1638,36 +1614,30 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s
@@ -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;

View File

@ -1,7 +1,7 @@
From 6d496c2655531790cdfdb5869fd37b64ae405b8a Mon Sep 17 00:00:00 2001
From d173e0229a32f2aaea6309907b2561f83e868305 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 6/6] Revert "winegstreamer: Factor out more of the init_gst
Subject: [PATCH 9/9] Revert "winegstreamer: Factor out more of the init_gst
callback into wg_parser_connect()."
This reverts commit 830efe873a967dbbb0c9a65be6a66b124a5fa826.
@ -10,10 +10,10 @@ This reverts commit 830efe873a967dbbb0c9a65be6a66b124a5fa826.
1 file changed, 54 insertions(+), 24 deletions(-)
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
index bf5a51aeaf4..cd12a23d0c8 100644
index 80cc08ea0a5..45219488de8 100644
--- a/dlls/winegstreamer/wg_parser.c
+++ b/dlls/winegstreamer/wg_parser.c
@@ -1494,7 +1494,6 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s
@@ -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;
@ -21,7 +21,7 @@ index bf5a51aeaf4..cd12a23d0c8 100644
parser->file_size = file_size;
parser->sink_connected = true;
@@ -1517,29 +1516,12 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s
@@ -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;
@ -51,7 +51,7 @@ index bf5a51aeaf4..cd12a23d0c8 100644
for (i = 0; i < parser->stream_count; ++i)
{
struct wg_parser_stream *stream = parser->streams[i];
@@ -1695,7 +1677,7 @@ static BOOL decodebin_parser_init_gst(struct wg_parser *parser)
@@ -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);
@ -60,7 +60,7 @@ index bf5a51aeaf4..cd12a23d0c8 100644
pthread_mutex_unlock(&parser->mutex);
if ((ret = gst_pad_link(parser->my_src, parser->their_sink)) < 0)
@@ -1704,6 +1686,24 @@ static BOOL decodebin_parser_init_gst(struct wg_parser *parser)
@@ -1711,6 +1693,24 @@ static BOOL decodebin_parser_init_gst(struct wg_parser *parser)
return FALSE;
}
@ -85,7 +85,7 @@ index bf5a51aeaf4..cd12a23d0c8 100644
return TRUE;
}
@@ -1724,7 +1724,7 @@ static BOOL avi_parser_init_gst(struct wg_parser *parser)
@@ -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);
@ -94,7 +94,7 @@ index bf5a51aeaf4..cd12a23d0c8 100644
pthread_mutex_unlock(&parser->mutex);
if ((ret = gst_pad_link(parser->my_src, parser->their_sink)) < 0)
@@ -1733,6 +1733,24 @@ static BOOL avi_parser_init_gst(struct wg_parser *parser)
@@ -1740,6 +1740,24 @@ static BOOL avi_parser_init_gst(struct wg_parser *parser)
return FALSE;
}
@ -119,7 +119,7 @@ index bf5a51aeaf4..cd12a23d0c8 100644
return TRUE;
}
@@ -1763,9 +1781,15 @@ static BOOL mpeg_audio_parser_init_gst(struct wg_parser *parser)
@@ -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;
}
@ -137,7 +137,7 @@ index bf5a51aeaf4..cd12a23d0c8 100644
return TRUE;
}
@@ -1798,9 +1822,15 @@ static BOOL wave_parser_init_gst(struct wg_parser *parser)
@@ -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;
}

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "aa629c4c7225166f4ee46476d98702df2e142711"
echo "a87abdbe85779adf6a2a7897bd88984587880693"
}
# Show version information
@ -1523,8 +1523,8 @@ fi
# | implementation)
# |
# | Modified files:
# | * configure.ac, dlls/bcrypt/Makefile.in, dlls/bcrypt/bcrypt_internal.h, dlls/bcrypt/bcrypt_main.c, dlls/bcrypt/gnutls.c,
# | dlls/bcrypt/tests/bcrypt.c
# | * configure.ac, dlls/bcrypt/Makefile.in, dlls/bcrypt/bcrypt_internal.h, dlls/bcrypt/bcrypt_main.c, dlls/bcrypt/gcrypt.c,
# | dlls/bcrypt/gnutls.c, dlls/bcrypt/tests/bcrypt.c, dlls/bcrypt/unixlib.c
# |
if test "$enable_bcrypt_ECDHSecretAgreement" -eq 1; then
patch_apply bcrypt-ECDHSecretAgreement/0001-bcrypt-Allow-multiple-backends-to-coexist.patch
@ -2446,11 +2446,15 @@ fi
# | dlls/winegstreamer/wg_parser.c
# |
if test "$enable_mfplat_reverts" -eq 1; then
patch_apply mfplat-reverts/0001-Revert-winegstreamer-Fix-return-code-in-init_gst-fai.patch
patch_apply mfplat-reverts/0003-Revert-winegstreamer-Allocate-source-media-buffers-i.patch
patch_apply mfplat-reverts/0004-Revert-winegstreamer-Duplicate-source-shutdown-path-.patch
patch_apply mfplat-reverts/0005-Revert-winegstreamer-Properly-clean-up-from-failure-.patch
patch_apply mfplat-reverts/0006-Revert-winegstreamer-Factor-out-more-of-the-init_gst.patch
patch_apply mfplat-reverts/0001-Revert-winegstreamer-Remove-the-no-longer-used-start.patch
patch_apply mfplat-reverts/0002-Revert-winegstreamer-Set-unlimited-buffering-using-a.patch
patch_apply mfplat-reverts/0003-Revert-winegstreamer-Initialize-GStreamer-in-wg_pars.patch
patch_apply mfplat-reverts/0004-Revert-winegstreamer-Use-a-single-wg_parser_create-e.patch
patch_apply mfplat-reverts/0005-Revert-winegstreamer-Fix-return-code-in-init_gst-fai.patch
patch_apply mfplat-reverts/0006-Revert-winegstreamer-Allocate-source-media-buffers-i.patch
patch_apply mfplat-reverts/0007-Revert-winegstreamer-Duplicate-source-shutdown-path-.patch
patch_apply mfplat-reverts/0008-Revert-winegstreamer-Properly-clean-up-from-failure-.patch
patch_apply mfplat-reverts/0009-Revert-winegstreamer-Factor-out-more-of-the-init_gst.patch
fi
# Patchset mfplat-streaming-support

View File

@ -1,4 +1,4 @@
From a7ebcd8202c860f9966a861dee5cfc6c3c307c59 Mon Sep 17 00:00:00 2001
From e0a698c661327771d64c654ba562554b3fdb59a3 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 24 Sep 2014 21:13:59 +0200
Subject: [PATCH] winemenubuilder: Create desktop shortcuts with absolute wine
@ -11,11 +11,11 @@ behaviour on Linux, because some other distros are a bit special (FreeBSD requir
wine, and so on ...).
---
programs/winemenubuilder/Makefile.in | 1 +
programs/winemenubuilder/winemenubuilder.c | 21 +++++++++++++++------
2 files changed, 16 insertions(+), 6 deletions(-)
programs/winemenubuilder/winemenubuilder.c | 12 ++++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/programs/winemenubuilder/Makefile.in b/programs/winemenubuilder/Makefile.in
index f42cc0abdf2..6590ca7c642 100644
index 12326d1e4e2..07191b56d82 100644
--- a/programs/winemenubuilder/Makefile.in
+++ b/programs/winemenubuilder/Makefile.in
@@ -1,5 +1,6 @@
@ -23,13 +23,13 @@ index f42cc0abdf2..6590ca7c642 100644
IMPORTS = uuid windowscodecs shell32 shlwapi ole32 user32 advapi32
+EXTRADEFS = -DBINDIR="\"${bindir}\""
EXTRADLLFLAGS = -mwindows -municode -mcygwin
EXTRADLLFLAGS = -mwindows -municode
diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c
index 87ff3f37637..bac3b2485c8 100644
index e02d7bd787f..6d157305135 100644
--- a/programs/winemenubuilder/winemenubuilder.c
+++ b/programs/winemenubuilder/winemenubuilder.c
@@ -106,6 +106,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(menubuilder);
@@ -97,6 +97,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(menubuilder);
#define IS_OPTION_TRUE(ch) \
((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1')
@ -44,37 +44,24 @@ index 87ff3f37637..bac3b2485c8 100644
/* link file formats */
#include "pshpack1.h"
@@ -1466,11 +1474,12 @@ static BOOL write_desktop_entry(const char *unix_link, const char *location, con
fprintf(file, "[Desktop Entry]\n");
fprintf(file, "Name=%s\n", linkname);
if (prefix)
- fprintf(file, "Exec=env WINEPREFIX=\"%s\" wine %s %s\n", prefix, path, args);
+ fprintf(file, "Exec=env WINEPREFIX=\"%s\" %s %s %s\n", prefix, wine_path, path, args);
else if (home)
- fprintf(file, "Exec=env WINEPREFIX=\"%s/.wine\" wine %s %s\n", home, path, args);
+ fprintf(file, "Exec=env WINEPREFIX=\"%s/.wine\" %s %s %s\n", home, wine_path, path, args);
else
- fprintf(file, "Exec=wine %s %s\n", path, args);
+ fprintf(file, "Exec=%s %s %s\n", wine_path, path, args);
+
@@ -1418,7 +1426,7 @@ static BOOL write_desktop_entry(const WCHAR *link, const WCHAR *location, const
fprintf(file, "env WINEPREFIX=\"%s\" ", path);
heap_free( path );
}
- fprintf(file, "wine %s", escape(path));
+ fprintf(file, "%s %s", wine_path, escape(path));
if (args) fprintf(file, " %s", escape(args) );
fputc( '\n', file );
fprintf(file, "Type=Application\n");
fprintf(file, "StartupNotify=true\n");
if (descr && *descr)
@@ -2513,11 +2522,11 @@ static BOOL write_freedesktop_association_entry(const char *desktopPath, const c
fprintf(desktop, "Name=%s\n", friendlyAppName);
fprintf(desktop, "MimeType=%s;\n", mimeType);
@@ -2123,7 +2131,7 @@ static BOOL write_freedesktop_association_entry(const WCHAR *desktopPath, const
if (prefix)
- fprintf(desktop, "Exec=env WINEPREFIX=\"%s\" wine start /ProgIDOpen %s %%f\n", prefix, progId);
+ fprintf(desktop, "Exec=env WINEPREFIX=\"%s\" %s start /ProgIDOpen %s %%f\n", prefix, wine_path, progId);
else if (home)
- fprintf(desktop, "Exec=env WINEPREFIX=\"%s/.wine\" wine start /ProgIDOpen %s %%f\n", home, progId);
+ fprintf(desktop, "Exec=env WINEPREFIX=\"%s/.wine\" %s start /ProgIDOpen %s %%f\n", home, wine_path, progId);
{
char *path = wine_get_unix_file_name( prefix );
- fprintf(desktop, "Exec=env WINEPREFIX=\"%s\" wine start /ProgIDOpen %s %%f\n", path, escape(progId));
+ fprintf(desktop, "Exec=env WINEPREFIX=\"%s\" %s start /ProgIDOpen %s %%f\n", path, wine_path, escape(progId));
heap_free( path );
}
else
- fprintf(desktop, "Exec=wine start /ProgIDOpen %s %%f\n", progId);
+ fprintf(desktop, "Exec=%s start /ProgIDOpen %s %%f\n", wine_path, progId);
fprintf(desktop, "NoDisplay=true\n");
fprintf(desktop, "StartupNotify=true\n");
if (openWithIcon)
--
2.33.0

View File

@ -1,4 +1,4 @@
From be95736e06aba40bd61378be249c238ff3dcadb9 Mon Sep 17 00:00:00 2001
From 1b6c8682eeabea769020928a1f0fadb6f4a66930 Mon Sep 17 00:00:00 2001
From: Alex Henrie <alexhenrie24@gmail.com>
Date: Sun, 1 Mar 2020 17:58:12 -0700
Subject: [PATCH] winemenubuilder: Blacklist desktop integration for certain
@ -65,10 +65,10 @@ index 4a650b444fc..548739f4326 100644
;; PS
HKCR,"MIME\Database\Content Type\application/postscript","Extension",,".ps"
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index 2759854396d..e867df57a22 100644
index 4ff5e874cf8..892e0a04167 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -514,6 +514,16 @@ HKCR,MIME\Database\Charset\us-ascii,"AliasForCharset",,iso-8859-1
@@ -512,6 +512,16 @@ HKCR,MIME\Database\Charset\us-ascii,"AliasForCharset",,iso-8859-1
HKCR,MIME\Database\Charset\visual,"AliasForCharset",,iso-8859-8
HKCR,MIME\Database\Charset\Windows-1254,"AliasForCharset",,iso-8859-9
@ -86,10 +86,10 @@ index 2759854396d..e867df57a22 100644
HKLM,System\CurrentControlSet\Control\ContentIndex\Language\Neutral,"WBreakerClass",,"{369647e0-17b0-11ce-9950-00aa004bbb1f}"
HKLM,System\CurrentControlSet\Control\ContentIndex\Language\Neutral,"StemmerClass",,""
diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c
index 6545dabd668..405ce7942dc 100644
index 6d157305135..ed400d2052e 100644
--- a/programs/winemenubuilder/winemenubuilder.c
+++ b/programs/winemenubuilder/winemenubuilder.c
@@ -2479,7 +2479,7 @@ static BOOL write_freedesktop_mime_type_entry(const char *packages_dir, const ch
@@ -2092,7 +2092,7 @@ static BOOL write_freedesktop_mime_type_entry(const WCHAR *packages_dir, const W
return ret;
}
@ -97,8 +97,8 @@ index 6545dabd668..405ce7942dc 100644
+static BOOL is_extension_banned(const WCHAR *extension)
{
/* These are managed through external tools like wine.desktop, to evade malware created file type associations */
static const WCHAR comW[] = {'.','c','o','m',0};
@@ -2493,6 +2493,42 @@ static BOOL is_extension_banned(LPCWSTR extension)
if (!wcsicmp(extension, L".com") ||
@@ -2102,6 +2102,42 @@ static BOOL is_extension_banned(LPCWSTR extension)
return FALSE;
}
@ -125,7 +125,7 @@ index 6545dabd668..405ce7942dc 100644
+ while (RegEnumValueW(blacklist_key, i, program_name, &len, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
+ {
+ blacklisted_command = reg_get_valW(HKEY_CURRENT_USER, blacklist_key_path, program_name);
+ if (strcmpW(command, blacklisted_command) == 0)
+ if (wcscmp(command, blacklisted_command) == 0)
+ {
+ RegCloseKey(blacklist_key);
+ return TRUE;
@ -138,14 +138,14 @@ index 6545dabd668..405ce7942dc 100644
+ return FALSE;
+}
+
static const char* get_special_mime_type(LPCWSTR extension)
static WCHAR *get_special_mime_type(LPCWSTR extension)
{
static const WCHAR lnkW[] = {'.','l','n','k',0};
@@ -2591,6 +2627,15 @@ static BOOL generate_associations(const char *xdg_data_home, const char *package
char *progIdA = NULL;
char *mimeProgId = NULL;
if (!wcsicmp(extension, L".lnk"))
@@ -2189,6 +2225,15 @@ static BOOL generate_associations(const WCHAR *packages_dir, const WCHAR *applic
WCHAR *mimeProgId = NULL;
struct rb_string_entry *entry;
+ commandW = assoc_query(ASSOCSTR_COMMAND, extensionW, openW);
+ commandW = assoc_query(ASSOCSTR_COMMAND, extensionW, L"open");
+ if (commandW == NULL)
+ /* no command => no application is associated */
+ goto end;
@ -154,21 +154,21 @@ index 6545dabd668..405ce7942dc 100644
+ /* command is on the blacklist => desktop integration is not desirable */
+ goto end;
+
extensionA = wchars_to_utf8_chars(strlwrW(extensionW));
if (extensionA == NULL)
{
@@ -2659,11 +2704,6 @@ static BOOL generate_associations(const char *xdg_data_home, const char *package
}
wcslwr(extensionW);
friendlyDocNameW = assoc_query(ASSOCSTR_FRIENDLYDOCNAME, extensionW, NULL);
@@ -2229,11 +2274,6 @@ static BOOL generate_associations(const WCHAR *packages_dir, const WCHAR *applic
hasChanged = TRUE;
}
- commandW = assoc_query(ASSOCSTR_COMMAND, extensionW, openW);
- commandW = assoc_query(ASSOCSTR_COMMAND, extensionW, L"open");
- if (commandW == NULL)
- /* no command => no application is associated */
- goto end;
-
executableW = assoc_query(ASSOCSTR_EXECUTABLE, extensionW, openW);
executableW = assoc_query(ASSOCSTR_EXECUTABLE, extensionW, L"open");
if (executableW)
openWithIconA = compute_native_identifier(0, executableW);
openWithIcon = compute_native_identifier(0, executableW, NULL);
--
2.28.0
2.33.0

View File

@ -1 +1 @@
aa629c4c7225166f4ee46476d98702df2e142711
a87abdbe85779adf6a2a7897bd88984587880693