You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
46 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6d46b1e13f | ||
|
64d7f6c5f3 | ||
|
99fc74eb6c | ||
|
73351fd593 | ||
|
34b3ffed35 | ||
|
d6a9c88bf3 | ||
|
c61fed05c0 | ||
|
55c3361918 | ||
|
4ecbce03f5 | ||
|
b4004c7c84 | ||
|
6f59ab8034 | ||
|
4966b421fc | ||
|
57a12e6845 | ||
|
aa2eb6eed6 | ||
|
4ae0f97bc7 | ||
|
b31a964e1e | ||
|
fa8d0abc9d | ||
|
2c5c068424 | ||
|
e893644049 | ||
|
afbc5756c9 | ||
|
552b03f70a | ||
|
1f218b6822 | ||
|
d9e4a75d19 | ||
|
0106909ec5 | ||
|
ec592e937b | ||
|
4bc5bffe2f | ||
|
f2648a9a40 | ||
|
1d21e2b6f5 | ||
|
fcaab59ec5 | ||
|
8708356647 | ||
|
d3ed71430a | ||
|
fb2b3b3c69 | ||
|
9fd1bb66d3 | ||
|
86091d3b1f | ||
|
ab31919ee5 | ||
|
6638f9ee79 | ||
|
92ce758ac8 | ||
|
0de9d1028b | ||
|
7a2920aa2a | ||
|
cd8ca4d7d6 | ||
|
7cecf22dcc | ||
|
eb479ea60c | ||
|
a500c9ce42 | ||
|
35d13b744e | ||
|
f7d87c5bfb | ||
|
0acaed0ae5 |
@@ -1,116 +0,0 @@
|
||||
From 861cd6c6409efce4eb03aad3bc01f5df772e77fb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 6 Feb 2016 01:15:07 +0100
|
||||
Subject: [PATCH] ddraw: Don't set HWTRANSFORMANDLIGHT flag on d3d7 RGB device.
|
||||
|
||||
---
|
||||
dlls/ddraw/ddraw.c | 9 +++++++++
|
||||
dlls/ddraw/tests/ddraw7.c | 18 ++++++++++++++++++
|
||||
2 files changed, 27 insertions(+)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index 705d0335d95..1d916f93c4f 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -49,6 +49,7 @@ static struct enum_device_entry
|
||||
char interface_name[100];
|
||||
char device_name[100];
|
||||
const GUID *device_guid;
|
||||
+ DWORD remove_caps;
|
||||
} device_list7[] =
|
||||
{
|
||||
/* T&L HAL device */
|
||||
@@ -56,6 +57,7 @@ static struct enum_device_entry
|
||||
"WINE Direct3D7 Hardware Transform and Lighting acceleration using WineD3D",
|
||||
"Wine D3D7 T&L HAL",
|
||||
&IID_IDirect3DTnLHalDevice,
|
||||
+ 0,
|
||||
},
|
||||
|
||||
/* HAL device */
|
||||
@@ -63,6 +65,7 @@ static struct enum_device_entry
|
||||
"WINE Direct3D7 Hardware acceleration using WineD3D",
|
||||
"Direct3D HAL",
|
||||
&IID_IDirect3DHALDevice,
|
||||
+ 0,
|
||||
},
|
||||
|
||||
/* RGB device */
|
||||
@@ -70,6 +73,7 @@ static struct enum_device_entry
|
||||
"WINE Direct3D7 RGB Software Emulation using WineD3D",
|
||||
"Wine D3D7 RGB",
|
||||
&IID_IDirect3DRGBDevice,
|
||||
+ D3DDEVCAPS_HWTRANSFORMANDLIGHT,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3749,6 +3753,7 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
{
|
||||
struct ddraw *ddraw = impl_from_IDirect3D7(iface);
|
||||
D3DDEVICEDESC7 device_desc7;
|
||||
+ DWORD dev_caps;
|
||||
HRESULT hr;
|
||||
size_t i;
|
||||
|
||||
@@ -3765,11 +3770,15 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
return hr;
|
||||
}
|
||||
|
||||
+ dev_caps = device_desc7.dwDevCaps;
|
||||
+
|
||||
for (i = 0; i < ARRAY_SIZE(device_list7); i++)
|
||||
{
|
||||
HRESULT ret;
|
||||
|
||||
device_desc7.deviceGUID = *device_list7[i].device_guid;
|
||||
+ device_desc7.dwDevCaps = dev_caps & ~device_list7[i].remove_caps;
|
||||
+
|
||||
ret = callback(device_list7[i].interface_name, device_list7[i].device_name, &device_desc7, context);
|
||||
if (ret != DDENUMRET_OK)
|
||||
{
|
||||
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
|
||||
index d641595baa2..54cc18b74f2 100644
|
||||
--- a/dlls/ddraw/tests/ddraw7.c
|
||||
+++ b/dlls/ddraw/tests/ddraw7.c
|
||||
@@ -577,6 +577,19 @@ static IDirect3DDevice7 *create_device_ex(HWND window, DWORD coop_level, const G
|
||||
return device;
|
||||
}
|
||||
|
||||
+static HRESULT WINAPI enum_devtype_software_cb(char *desc_str, char *name, D3DDEVICEDESC7 *desc, void *ctx)
|
||||
+{
|
||||
+ BOOL *software_ok = ctx;
|
||||
+ if (IsEqualGUID(&desc->deviceGUID, &IID_IDirect3DRGBDevice))
|
||||
+ {
|
||||
+ ok(!(desc->dwDevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT),
|
||||
+ "RGB emulation device shouldn't have HWTRANSFORMANDLIGHT flag\n");
|
||||
+ *software_ok = TRUE;
|
||||
+ return DDENUMRET_CANCEL;
|
||||
+ }
|
||||
+ return DDENUMRET_OK;
|
||||
+}
|
||||
+
|
||||
static IDirect3DDevice7 *create_device(HWND window, DWORD coop_level)
|
||||
{
|
||||
const GUID *device_guid = &IID_IDirect3DHALDevice;
|
||||
@@ -6719,6 +6732,7 @@ static void test_surface_lock(void)
|
||||
ULONG refcount;
|
||||
DDPIXELFORMAT z_fmt;
|
||||
BOOL hal_ok = FALSE;
|
||||
+ BOOL software_ok = FALSE;
|
||||
const GUID *devtype = &IID_IDirect3DHALDevice;
|
||||
D3DDEVICEDESC7 device_desc;
|
||||
BOOL cubemap_supported;
|
||||
@@ -6844,6 +6858,10 @@ static void test_surface_lock(void)
|
||||
if (hal_ok)
|
||||
devtype = &IID_IDirect3DTnLHalDevice;
|
||||
|
||||
+ hr = IDirect3D7_EnumDevices(d3d, enum_devtype_software_cb, &software_ok);
|
||||
+ ok(SUCCEEDED(hr), "Failed to enumerate devices, hr %#x.\n", hr);
|
||||
+ if (!software_ok) win_skip("RGB device not found, unable to check flags\n");
|
||||
+
|
||||
memset(&z_fmt, 0, sizeof(z_fmt));
|
||||
hr = IDirect3D7_EnumZBufferFormats(d3d, devtype, enum_z_fmt, &z_fmt);
|
||||
if (FAILED(hr) || !z_fmt.dwSize)
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -1,18 +1,18 @@
|
||||
From 4498bb259a9ab5e5bf6f8a55dc96b6ac24c82e09 Mon Sep 17 00:00:00 2001
|
||||
From 9028351204472aafe5d7731c8737a6cfdb09e659 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 30 May 2015 02:56:19 +0200
|
||||
Subject: ddraw/tests: Add more tests for IDirect3DTexture2::Load.
|
||||
Subject: [PATCH] ddraw/tests: Add more tests for IDirect3DTexture2::Load.
|
||||
|
||||
---
|
||||
dlls/ddraw/tests/d3d.c | 373 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/ddraw/tests/ddraw2.c | 28 +++-
|
||||
dlls/ddraw/tests/d3d.c | 373 ++++++++++++++++++++++++++++++++++++++
|
||||
dlls/ddraw/tests/ddraw2.c | 28 ++-
|
||||
2 files changed, 400 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c
|
||||
index ec4197a..d35d0e0 100644
|
||||
index 87d0648b699..e88bbf59767 100644
|
||||
--- a/dlls/ddraw/tests/d3d.c
|
||||
+++ b/dlls/ddraw/tests/d3d.c
|
||||
@@ -1515,6 +1515,288 @@ static BOOL colortables_check_equality(PALETTEENTRY table1[256], PALETTEENTRY ta
|
||||
@@ -1221,6 +1221,288 @@ static BOOL colortables_check_equality(PALETTEENTRY table1[256], PALETTEENTRY ta
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -301,9 +301,9 @@ index ec4197a..d35d0e0 100644
|
||||
/* test palette handling in IDirect3DTexture_Load */
|
||||
static void TextureLoadTest(void)
|
||||
{
|
||||
@@ -1578,6 +1860,97 @@ static void TextureLoadTest(void)
|
||||
@@ -1284,6 +1566,97 @@ static void TextureLoadTest(void)
|
||||
hr = IDirect3DTexture_Load(Texture2, Texture);
|
||||
ok(hr == DD_OK, "IDirect3DTexture_Load returned %08x\n", hr);
|
||||
ok(hr == DD_OK, "Got hr %#lx.\n", hr);
|
||||
|
||||
+ for (i = 0; i < sizeof(load_tests) / sizeof(load_tests[0]); i++)
|
||||
+ {
|
||||
@@ -400,10 +400,10 @@ index ec4197a..d35d0e0 100644
|
||||
table1[i].peRed = i;
|
||||
table1[i].peGreen = i;
|
||||
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
|
||||
index 0cb1ca4..a2489e4 100644
|
||||
index 2d08718d131..0a2d575e8cc 100644
|
||||
--- a/dlls/ddraw/tests/ddraw2.c
|
||||
+++ b/dlls/ddraw/tests/ddraw2.c
|
||||
@@ -1121,8 +1121,10 @@ static void test_texture_load_ckey(void)
|
||||
@@ -1495,8 +1495,10 @@ static void test_texture_load_ckey(void)
|
||||
IDirectDraw2 *ddraw = NULL;
|
||||
IDirectDrawSurface *src = NULL;
|
||||
IDirectDrawSurface *dst = NULL;
|
||||
@@ -414,7 +414,7 @@ index 0cb1ca4..a2489e4 100644
|
||||
DDSURFACEDESC ddsd;
|
||||
HRESULT hr;
|
||||
DDCOLORKEY ckey;
|
||||
@@ -1134,16 +1136,31 @@ static void test_texture_load_ckey(void)
|
||||
@@ -1508,16 +1510,31 @@ static void test_texture_load_ckey(void)
|
||||
|
||||
memset(&ddsd, 0, sizeof(ddsd));
|
||||
ddsd.dwSize = sizeof(ddsd);
|
||||
@@ -431,10 +431,10 @@ index 0cb1ca4..a2489e4 100644
|
||||
+ U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x000000FF;
|
||||
+
|
||||
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &src, NULL);
|
||||
ok(SUCCEEDED(hr), "Failed to create source texture, hr %#x.\n", hr);
|
||||
ok(SUCCEEDED(hr), "Failed to create source texture, hr %#lx.\n", hr);
|
||||
ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE;
|
||||
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &dst, NULL);
|
||||
ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#x.\n", hr);
|
||||
ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#lx.\n", hr);
|
||||
|
||||
+ U1(ddsd.ddpfPixelFormat).dwRGBBitCount = 16;
|
||||
+ U2(ddsd.ddpfPixelFormat).dwRBitMask = 0xf800;
|
||||
@@ -445,20 +445,20 @@ index 0cb1ca4..a2489e4 100644
|
||||
+ ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#x.\n", hr);
|
||||
+
|
||||
hr = IDirectDrawSurface_QueryInterface(src, &IID_IDirect3DTexture, (void **)&src_tex);
|
||||
ok(SUCCEEDED(hr) || hr == E_NOINTERFACE, "Failed to get Direct3DTexture interface, hr %#x.\n", hr);
|
||||
ok(SUCCEEDED(hr) || hr == E_NOINTERFACE, "Failed to get Direct3DTexture interface, hr %#lx.\n", hr);
|
||||
if (FAILED(hr))
|
||||
@@ -1154,6 +1171,8 @@ static void test_texture_load_ckey(void)
|
||||
@@ -1528,6 +1545,8 @@ static void test_texture_load_ckey(void)
|
||||
}
|
||||
hr = IDirectDrawSurface_QueryInterface(dst, &IID_IDirect3DTexture, (void **)&dst_tex);
|
||||
ok(SUCCEEDED(hr), "Failed to get Direct3DTexture interface, hr %#x.\n", hr);
|
||||
ok(SUCCEEDED(hr), "Failed to get Direct3DTexture interface, hr %#lx.\n", hr);
|
||||
+ hr = IDirectDrawSurface_QueryInterface(dst2, &IID_IDirect3DTexture, (void **)&dst2_tex);
|
||||
+ ok(SUCCEEDED(hr), "Failed to get Direct3DTexture interface, hr %#x.\n", hr);
|
||||
+ ok(SUCCEEDED(hr), "Failed to get Direct3DTexture interface, hr %#lx.\n", hr);
|
||||
|
||||
/* No surface has a color key */
|
||||
hr = IDirect3DTexture_Load(dst_tex, src_tex);
|
||||
@@ -1182,6 +1201,11 @@ static void test_texture_load_ckey(void)
|
||||
ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#x.\n", ckey.dwColorSpaceLowValue);
|
||||
ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#x.\n", ckey.dwColorSpaceHighValue);
|
||||
@@ -1556,6 +1575,11 @@ static void test_texture_load_ckey(void)
|
||||
ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceLowValue);
|
||||
ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceHighValue);
|
||||
|
||||
+ /* Source surface has a color key but destination differs in format */
|
||||
+ ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0x0;
|
||||
@@ -468,8 +468,8 @@ index 0cb1ca4..a2489e4 100644
|
||||
/* Both surfaces have a color key: Dest ckey is overwritten */
|
||||
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0x000000ff;
|
||||
hr = IDirectDrawSurface_SetColorKey(dst, DDCKEY_SRCBLT, &ckey);
|
||||
@@ -1206,8 +1230,10 @@ static void test_texture_load_ckey(void)
|
||||
ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#x.\n", ckey.dwColorSpaceHighValue);
|
||||
@@ -1580,8 +1604,10 @@ static void test_texture_load_ckey(void)
|
||||
ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceHighValue);
|
||||
|
||||
done:
|
||||
+ if (dst2_tex) IDirect3DTexture_Release(dst2_tex);
|
||||
@@ -480,5 +480,5 @@ index 0cb1ca4..a2489e4 100644
|
||||
if (src) IDirectDrawSurface_Release(src);
|
||||
if (ddraw) IDirectDraw2_Release(ddraw);
|
||||
--
|
||||
2.4.2
|
||||
2.35.1
|
||||
|
||||
|
@@ -8,3 +8,4 @@
|
||||
# The Sims Online
|
||||
Fixes: [19153] Resident Evil 1 fails to start (needs IDirect3D3::EnumDevices() to return a device named "RGB Emulation")
|
||||
Depends: ddraw-Device_Caps
|
||||
Disabled: True
|
||||
|
@@ -1 +1,2 @@
|
||||
Fixes: [44052] - Support for font fallback.
|
||||
Disabled: True
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 3e714e2eb10fe17f12b747731c0ce7e18fd4b7a0 Mon Sep 17 00:00:00 2001
|
||||
From 61fb7e02aa6779469e94c79f1132c4991cb27244 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 15:11:12 -0500
|
||||
Subject: [PATCH] server: Create eventfd file descriptors for process objects.
|
||||
@@ -40,16 +40,16 @@ index c7b0323f204..27049ffbdb0 100644
|
||||
{
|
||||
struct esync *esync;
|
||||
diff --git a/server/esync.h b/server/esync.h
|
||||
index 7ca4ca89394..6a0a367124d 100644
|
||||
index 00f9e638d83..8522d8a69ae 100644
|
||||
--- a/server/esync.h
|
||||
+++ b/server/esync.h
|
||||
@@ -20,3 +20,4 @@
|
||||
@@ -22,3 +22,4 @@
|
||||
|
||||
extern int do_esync(void);
|
||||
void esync_init(void);
|
||||
+int esync_create_fd( int initval, int flags );
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index da972a41955..91b26d00ec0 100644
|
||||
index da11b90c613..22ac16fb540 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -63,6 +63,7 @@
|
||||
@@ -77,7 +77,7 @@ index da972a41955..91b26d00ec0 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -684,6 +686,7 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
|
||||
@@ -686,6 +688,7 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
|
||||
process->rawinput_mouse = NULL;
|
||||
process->rawinput_kbd = NULL;
|
||||
memset( &process->image_info, 0, sizeof(process->image_info) );
|
||||
@@ -85,7 +85,7 @@ index da972a41955..91b26d00ec0 100644
|
||||
list_init( &process->kernel_object );
|
||||
list_init( &process->thread_list );
|
||||
list_init( &process->locks );
|
||||
@@ -741,6 +744,9 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
|
||||
@@ -742,6 +745,9 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
|
||||
if (!token_assign_label( process->token, &high_label_sid ))
|
||||
goto error;
|
||||
|
||||
@@ -95,15 +95,15 @@ index da972a41955..91b26d00ec0 100644
|
||||
set_fd_events( process->msg_fd, POLLIN ); /* start listening to events */
|
||||
return process;
|
||||
|
||||
@@ -787,6 +793,7 @@ static void process_destroy( struct object *obj )
|
||||
if (process->token) release_object( process->token );
|
||||
@@ -789,6 +795,7 @@ static void process_destroy( struct object *obj )
|
||||
free( process->rawinput_devices );
|
||||
free( process->dir_cache );
|
||||
free( process->image );
|
||||
+ if (do_esync()) close( process->esync_fd );
|
||||
}
|
||||
|
||||
/* dump a process on stdout for debugging purposes */
|
||||
@@ -804,6 +811,13 @@ static int process_signaled( struct object *obj, struct wait_queue_entry *entry
|
||||
@@ -806,6 +813,13 @@ static int process_signaled( struct object *obj, struct wait_queue_entry *entry
|
||||
return !process->running_threads;
|
||||
}
|
||||
|
||||
@@ -118,10 +118,10 @@ index da972a41955..91b26d00ec0 100644
|
||||
{
|
||||
access = default_map_access( obj, access );
|
||||
diff --git a/server/process.h b/server/process.h
|
||||
index 632faf9c4bf..1ba69b3406e 100644
|
||||
index 97e0d455ece..a0a071d8f88 100644
|
||||
--- a/server/process.h
|
||||
+++ b/server/process.h
|
||||
@@ -90,6 +90,7 @@ struct process
|
||||
@@ -85,6 +85,7 @@ struct process
|
||||
const struct rawinput_device *rawinput_kbd; /* rawinput keyboard device, if any */
|
||||
struct list kernel_object; /* list of kernel object pointers */
|
||||
pe_image_info_t image_info; /* main exe image info */
|
||||
@@ -130,5 +130,5 @@ index 632faf9c4bf..1ba69b3406e 100644
|
||||
|
||||
/* process functions */
|
||||
--
|
||||
2.34.1
|
||||
2.35.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From e0a89702e35941e75ce06f795966c92b3f195ed8 Mon Sep 17 00:00:00 2001
|
||||
From ca6a89f3bfb6aa5d7ac05bb0c469b527ae1a9d9d Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 16:11:23 -0500
|
||||
Subject: [PATCH] server, ntdll: Implement message waits.
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] server, ntdll: Implement message waits.
|
||||
3 files changed, 75 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index fcbe563bb5a..88490e08ef9 100644
|
||||
index 2ae334d8417..608c318c1c7 100644
|
||||
--- a/dlls/ntdll/unix/esync.c
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -482,12 +482,13 @@ static void update_grabbed_object( struct esync *obj )
|
||||
@@ -475,12 +475,13 @@ static void update_grabbed_object( struct esync *obj )
|
||||
|
||||
/* A value of STATUS_NOT_IMPLEMENTED returned from this function means that we
|
||||
* need to delegate to server_select(). */
|
||||
@@ -28,7 +28,7 @@ index fcbe563bb5a..88490e08ef9 100644
|
||||
LONGLONG timeleft;
|
||||
LARGE_INTEGER now;
|
||||
ULONGLONG end;
|
||||
@@ -515,6 +516,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -508,6 +509,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ index fcbe563bb5a..88490e08ef9 100644
|
||||
if (has_esync && has_server)
|
||||
FIXME("Can't wait on esync and server objects at the same time!\n");
|
||||
else if (has_server)
|
||||
@@ -526,6 +530,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -519,6 +523,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
for (i = 0; i < count; i++)
|
||||
TRACE(" %p", handles[i]);
|
||||
|
||||
@@ -48,7 +48,7 @@ index fcbe563bb5a..88490e08ef9 100644
|
||||
if (!timeout)
|
||||
TRACE(", timeout = INFINITE.\n");
|
||||
else
|
||||
@@ -565,7 +572,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -558,7 +565,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
int64_t value;
|
||||
ssize_t size;
|
||||
|
||||
@@ -59,7 +59,7 @@ index fcbe563bb5a..88490e08ef9 100644
|
||||
{
|
||||
/* Don't grab the object, just check if it's signaled. */
|
||||
if (fds[i].revents & POLLIN)
|
||||
@@ -610,6 +619,44 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -603,6 +612,44 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,10 +105,10 @@ index fcbe563bb5a..88490e08ef9 100644
|
||||
{
|
||||
struct stat st;
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index cf00ab99c63..ecbb78cc9bb 100644
|
||||
index 5cf63cbac21..f837944574e 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3734,3 +3734,8 @@ enum esync_type
|
||||
@@ -3797,3 +3797,8 @@ enum esync_type
|
||||
int type;
|
||||
unsigned int shm_idx;
|
||||
@END
|
||||
@@ -118,10 +118,10 @@ index cf00ab99c63..ecbb78cc9bb 100644
|
||||
+ int in_msgwait; /* are we in a message wait? */
|
||||
+@END
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index d34bc284d08..f4edb299dc3 100644
|
||||
index 1702acb8480..9593ae532d4 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -146,6 +146,7 @@ struct msg_queue
|
||||
@@ -144,6 +144,7 @@ struct msg_queue
|
||||
int keystate_lock; /* owns an input keystate lock */
|
||||
unsigned int ignore_post_msg; /* ignore post messages newer than this unique id */
|
||||
int esync_fd; /* esync file descriptor (signalled on message) */
|
||||
@@ -129,7 +129,7 @@ index d34bc284d08..f4edb299dc3 100644
|
||||
};
|
||||
|
||||
struct hotkey
|
||||
@@ -319,6 +320,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -317,6 +318,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
queue->keystate_lock = 0;
|
||||
queue->ignore_post_msg = 0;
|
||||
queue->esync_fd = -1;
|
||||
@@ -137,7 +137,7 @@ index d34bc284d08..f4edb299dc3 100644
|
||||
list_init( &queue->send_result );
|
||||
list_init( &queue->callback_result );
|
||||
list_init( &queue->pending_timers );
|
||||
@@ -1002,6 +1004,10 @@ static int is_queue_hung( struct msg_queue *queue )
|
||||
@@ -1001,6 +1003,10 @@ static int is_queue_hung( struct msg_queue *queue )
|
||||
if (get_wait_queue_thread(entry)->queue == queue)
|
||||
return 0; /* thread is waiting on queue -> not hung */
|
||||
}
|
||||
@@ -148,9 +148,9 @@ index d34bc284d08..f4edb299dc3 100644
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -3416,3 +3422,18 @@ DECL_HANDLER(get_rawinput_devices)
|
||||
devices[i++] = e->device;
|
||||
}
|
||||
@@ -3456,3 +3462,18 @@ DECL_HANDLER(update_rawinput_devices)
|
||||
process->rawinput_mouse = find_rawinput_device( process, 1, 2 );
|
||||
process->rawinput_kbd = find_rawinput_device( process, 1, 6 );
|
||||
}
|
||||
+
|
||||
+DECL_HANDLER(esync_msgwait)
|
||||
@@ -168,5 +168,5 @@ index d34bc284d08..f4edb299dc3 100644
|
||||
+ set_fd_events( queue->fd, req->in_msgwait ? POLLIN : 0 );
|
||||
+}
|
||||
--
|
||||
2.30.2
|
||||
2.35.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 505384ad65984c3fc18c1c1a7b1fd39ecd0186f1 Mon Sep 17 00:00:00 2001
|
||||
From 07694655cf43e87ffc6185a5e7fe8d1bdd8658a4 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Wed, 13 Jun 2018 23:32:04 -0500
|
||||
Subject: [PATCH] kernel32/tests: Add some mutex tests.
|
||||
@@ -8,11 +8,11 @@ Subject: [PATCH] kernel32/tests: Add some mutex tests.
|
||||
1 file changed, 94 insertions(+)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c
|
||||
index ea54cb069df..790b7bfe797 100644
|
||||
index bc85126d9aa..491052d5593 100644
|
||||
--- a/dlls/kernel32/tests/sync.c
|
||||
+++ b/dlls/kernel32/tests/sync.c
|
||||
@@ -177,8 +177,23 @@ static void test_signalandwait(void)
|
||||
CloseHandle(file);
|
||||
@@ -227,8 +227,23 @@ static void test_temporary_objects(void)
|
||||
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError());
|
||||
}
|
||||
|
||||
+static HANDLE mutex, mutex2, mutices[2];
|
||||
@@ -35,7 +35,7 @@ index ea54cb069df..790b7bfe797 100644
|
||||
DWORD wait_ret;
|
||||
BOOL ret;
|
||||
HANDLE hCreated;
|
||||
@@ -289,6 +304,85 @@ todo_wine_if(getenv("WINEESYNC")) /* XFAIL: due to the above */
|
||||
@@ -339,6 +354,85 @@ todo_wine_if(getenv("WINEESYNC")) /* XFAIL: due to the above */
|
||||
CloseHandle(hOpened);
|
||||
|
||||
CloseHandle(hCreated);
|
||||
@@ -122,5 +122,5 @@ index ea54cb069df..790b7bfe797 100644
|
||||
|
||||
static void test_slist(void)
|
||||
--
|
||||
2.28.0
|
||||
2.35.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From cc964cf26e79a89fb3d7345847a23d93368e3eed Mon Sep 17 00:00:00 2001
|
||||
From c4a4d47fb07faee6ef6d20b967e21eafe6a60ea4 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 9 Jul 2019 14:13:28 +1000
|
||||
Subject: [PATCH] user32: Do not enumerate the registry in
|
||||
@@ -13,10 +13,10 @@ not the complete list from the registry.
|
||||
3 files changed, 36 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
|
||||
index 06756b5551e..99abab38ccf 100644
|
||||
index bb7477ed482..55ab8d246e7 100644
|
||||
--- a/dlls/user32/input.c
|
||||
+++ b/dlls/user32/input.c
|
||||
@@ -521,7 +521,6 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout )
|
||||
@@ -494,7 +494,6 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ index 06756b5551e..99abab38ccf 100644
|
||||
* EnableMouseInPointer (USER32.@)
|
||||
*/
|
||||
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
|
||||
index 8b84a39d009..d7520459c6d 100644
|
||||
index 8477645fad5..e92548c7402 100644
|
||||
--- a/dlls/user32/tests/input.c
|
||||
+++ b/dlls/user32/tests/input.c
|
||||
@@ -4481,6 +4481,40 @@ static void test_SendInput(void)
|
||||
@@ -4566,6 +4566,40 @@ static void test_SendInput(void)
|
||||
DestroyWindow( hwnd );
|
||||
}
|
||||
|
||||
@@ -69,19 +69,19 @@ index 8b84a39d009..d7520459c6d 100644
|
||||
START_TEST(input)
|
||||
{
|
||||
char **argv;
|
||||
@@ -4523,6 +4557,7 @@ START_TEST(input)
|
||||
@@ -4608,6 +4642,7 @@ START_TEST(input)
|
||||
test_GetRawInputBuffer();
|
||||
test_RegisterRawInputDevices();
|
||||
test_rawinput(argv[0]);
|
||||
+ test_GetKeyboardLayoutList();
|
||||
test_DefRawInputProc();
|
||||
|
||||
if(pGetMouseMovePointsEx)
|
||||
test_GetMouseMovePointsEx(argv[0]);
|
||||
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
|
||||
index 28fc5a918c8..24782e405a7 100644
|
||||
index f3b724e7010..a971e1ee776 100644
|
||||
--- a/dlls/win32u/input.c
|
||||
+++ b/dlls/win32u/input.c
|
||||
@@ -933,11 +933,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
|
||||
@@ -934,11 +934,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
|
||||
*/
|
||||
UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
{
|
||||
@@ -94,7 +94,7 @@ index 28fc5a918c8..24782e405a7 100644
|
||||
HKL layout;
|
||||
|
||||
TRACE_(keyboard)( "size %d, layouts %p.\n", size, layouts );
|
||||
@@ -951,33 +947,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
@@ -952,33 +948,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
if (size && layouts)
|
||||
{
|
||||
layouts[count - 1] = layout;
|
||||
@@ -129,5 +129,5 @@ index 28fc5a918c8..24782e405a7 100644
|
||||
|
||||
return count;
|
||||
--
|
||||
2.34.1
|
||||
2.37.2
|
||||
|
||||
|
@@ -1,40 +0,0 @@
|
||||
From 1fa010a636a2a30224ce07081d94bd3e6d9597c8 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Eikum <aeikum@codeweavers.com>
|
||||
Date: Thu, 30 Jan 2020 10:16:19 -0600
|
||||
Subject: [PATCH 01/88] winegstreamer: HACK: Use a different gst registry file
|
||||
per architecture
|
||||
|
||||
---
|
||||
dlls/winegstreamer/wg_parser.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
|
||||
index 5a2e970a4dd..40c394c3caf 100644
|
||||
--- a/dlls/winegstreamer/wg_parser.c
|
||||
+++ b/dlls/winegstreamer/wg_parser.c
|
||||
@@ -1556,6 +1556,22 @@ static void init_gstreamer_once(void)
|
||||
int argc = ARRAY_SIZE(args) - 1;
|
||||
char **argv = args;
|
||||
GError *err;
|
||||
+ const char *e;
|
||||
+
|
||||
+ if ((e = getenv("WINE_GST_REGISTRY_DIR")))
|
||||
+ {
|
||||
+ char gst_reg[PATH_MAX];
|
||||
+#if defined(__x86_64__)
|
||||
+ const char *arch = "/registry.x86_64.bin";
|
||||
+#elif defined(__i386__)
|
||||
+ const char *arch = "/registry.i386.bin";
|
||||
+#else
|
||||
+#error Bad arch
|
||||
+#endif
|
||||
+ strcpy(gst_reg, e);
|
||||
+ strcat(gst_reg, arch);
|
||||
+ setenv("GST_REGISTRY_1_0", gst_reg, 1);
|
||||
+ }
|
||||
|
||||
if (!gst_init_check(&argc, &argv, &err))
|
||||
{
|
||||
--
|
||||
2.34.1
|
||||
|
@@ -1,60 +0,0 @@
|
||||
From effc9dd4081fe44b67080b3cb73f51be21e0bd51 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Tue, 28 Jan 2020 14:30:43 -0600
|
||||
Subject: [PATCH 02/88] winegstreamer: HACK: Try harder to register
|
||||
winegstreamer filters.
|
||||
|
||||
---
|
||||
dlls/quartz/filtergraph.c | 17 +++++++++++++++++
|
||||
dlls/winegstreamer/main.c | 2 ++
|
||||
2 files changed, 19 insertions(+)
|
||||
|
||||
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
|
||||
index 1849174cf97..55462244ea9 100644
|
||||
--- a/dlls/quartz/filtergraph.c
|
||||
+++ b/dlls/quartz/filtergraph.c
|
||||
@@ -5600,11 +5600,28 @@ static const IUnknownVtbl IInner_VTable =
|
||||
FilterGraphInner_Release
|
||||
};
|
||||
|
||||
+static BOOL CALLBACK register_winegstreamer_proc(INIT_ONCE *once, void *param, void **ctx)
|
||||
+{
|
||||
+ HMODULE mod = LoadLibraryW(L"winegstreamer.dll");
|
||||
+ if (mod)
|
||||
+ {
|
||||
+ HRESULT (WINAPI *proc)(void) = (void *)GetProcAddress(mod, "DllRegisterServer");
|
||||
+ proc();
|
||||
+ FreeLibrary(mod);
|
||||
+ }
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
static HRESULT filter_graph_common_create(IUnknown *outer, IUnknown **out, BOOL threaded)
|
||||
{
|
||||
+ static INIT_ONCE once = INIT_ONCE_STATIC_INIT;
|
||||
struct filter_graph *object;
|
||||
HRESULT hr;
|
||||
|
||||
+ /* HACK: our build system makes it difficult to load gstreamer on prefix
|
||||
+ * creation, so it won't get registered. Do that here instead. */
|
||||
+ InitOnceExecuteOnce(&once, register_winegstreamer_proc, NULL, NULL);
|
||||
+
|
||||
*out = NULL;
|
||||
|
||||
if (!(object = calloc(1, sizeof(*object))))
|
||||
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c
|
||||
index f85e9995525..95b22abebb7 100644
|
||||
--- a/dlls/winegstreamer/main.c
|
||||
+++ b/dlls/winegstreamer/main.c
|
||||
@@ -564,6 +564,8 @@ HRESULT WINAPI DllRegisterServer(void)
|
||||
|
||||
TRACE(".\n");
|
||||
|
||||
+ init_gstreamer();
|
||||
+
|
||||
if (FAILED(hr = __wine_register_resources()))
|
||||
return hr;
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
@@ -1,50 +0,0 @@
|
||||
From 3487366d10a749104ac47d0dda66ab54843a94a3 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Eikum <aeikum@codeweavers.com>
|
||||
Date: Fri, 18 Dec 2020 14:08:04 -0600
|
||||
Subject: [PATCH 03/88] mfplat: Register winegstreamer interfaces on load
|
||||
|
||||
See also "winegstreamer: HACK: Try harder to register winegstreamer
|
||||
filters."
|
||||
---
|
||||
dlls/mfplat/main.c | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
|
||||
index 7991152f7a7..72ce560c772 100644
|
||||
--- a/dlls/mfplat/main.c
|
||||
+++ b/dlls/mfplat/main.c
|
||||
@@ -1583,6 +1583,18 @@ HRESULT WINAPI MFTGetInfo(CLSID clsid, WCHAR **name, MFT_REGISTER_TYPE_INFO **in
|
||||
return hr;
|
||||
}
|
||||
|
||||
+static BOOL CALLBACK register_winegstreamer_proc(INIT_ONCE *once, void *param, void **ctx)
|
||||
+{
|
||||
+ HMODULE mod = LoadLibraryW(L"winegstreamer.dll");
|
||||
+ if (mod)
|
||||
+ {
|
||||
+ HRESULT (WINAPI *proc)(void) = (void *)GetProcAddress(mod, "DllRegisterServer");
|
||||
+ proc();
|
||||
+ FreeLibrary(mod);
|
||||
+ }
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
/***********************************************************************
|
||||
* MFStartup (mfplat.@)
|
||||
*/
|
||||
@@ -1590,9 +1602,12 @@ HRESULT WINAPI MFStartup(ULONG version, DWORD flags)
|
||||
{
|
||||
#define MF_VERSION_XP MAKELONG( MF_API_VERSION, 1 )
|
||||
#define MF_VERSION_WIN7 MAKELONG( MF_API_VERSION, 2 )
|
||||
+ static INIT_ONCE once = INIT_ONCE_STATIC_INIT;
|
||||
|
||||
TRACE("%#lx, %#lx.\n", version, flags);
|
||||
|
||||
+ InitOnceExecuteOnce(&once, register_winegstreamer_proc, NULL, NULL);
|
||||
+
|
||||
if (version != MF_VERSION_XP && version != MF_VERSION_WIN7)
|
||||
return MF_E_BAD_STARTUP_VERSION;
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
@@ -1,223 +0,0 @@
|
||||
From fb5e9adb5eb72fa5d8369ec2e014985450432329 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Crider <gloriouseggroll@gmail.com>
|
||||
Date: Sat, 19 Feb 2022 16:58:07 -0700
|
||||
Subject: [PATCH 04/88] Revert "winegstreamer: Create static pads on
|
||||
wg_transform struct."
|
||||
|
||||
This reverts commit 71bf5b24d7efabfcacfa707198efc4be0da3e446.
|
||||
---
|
||||
dlls/winegstreamer/gst_private.h | 3 +-
|
||||
dlls/winegstreamer/main.c | 9 ++----
|
||||
dlls/winegstreamer/unixlib.h | 2 --
|
||||
dlls/winegstreamer/wg_format.c | 40 ++----------------------
|
||||
dlls/winegstreamer/wg_transform.c | 51 +------------------------------
|
||||
dlls/winegstreamer/wma_decoder.c | 2 +-
|
||||
6 files changed, 7 insertions(+), 100 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h
|
||||
index a63daaf04b9..8bc9f838d29 100644
|
||||
--- a/dlls/winegstreamer/gst_private.h
|
||||
+++ b/dlls/winegstreamer/gst_private.h
|
||||
@@ -96,8 +96,7 @@ uint64_t wg_parser_stream_get_duration(struct wg_parser_stream *stream);
|
||||
void wg_parser_stream_seek(struct wg_parser_stream *stream, double rate,
|
||||
uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags);
|
||||
|
||||
-struct wg_transform *wg_transform_create(const struct wg_format *input_format,
|
||||
- const struct wg_format *output_format);
|
||||
+struct wg_transform *wg_transform_create(void);
|
||||
void wg_transform_destroy(struct wg_transform *transform);
|
||||
|
||||
unsigned int wg_format_get_max_size(const struct wg_format *format);
|
||||
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c
|
||||
index 95b22abebb7..af5a691371d 100644
|
||||
--- a/dlls/winegstreamer/main.c
|
||||
+++ b/dlls/winegstreamer/main.c
|
||||
@@ -254,14 +254,9 @@ void wg_parser_stream_seek(struct wg_parser_stream *stream, double rate,
|
||||
__wine_unix_call(unix_handle, unix_wg_parser_stream_seek, ¶ms);
|
||||
}
|
||||
|
||||
-struct wg_transform *wg_transform_create(const struct wg_format *input_format,
|
||||
- const struct wg_format *output_format)
|
||||
+struct wg_transform *wg_transform_create(void)
|
||||
{
|
||||
- struct wg_transform_create_params params =
|
||||
- {
|
||||
- .input_format = input_format,
|
||||
- .output_format = output_format,
|
||||
- };
|
||||
+ struct wg_transform_create_params params = {0};
|
||||
|
||||
if (__wine_unix_call(unix_handle, unix_wg_transform_create, ¶ms))
|
||||
return NULL;
|
||||
diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h
|
||||
index 4adbb694766..8e3f5e84bfb 100644
|
||||
--- a/dlls/winegstreamer/unixlib.h
|
||||
+++ b/dlls/winegstreamer/unixlib.h
|
||||
@@ -232,8 +232,6 @@ struct wg_parser_stream_seek_params
|
||||
struct wg_transform_create_params
|
||||
{
|
||||
struct wg_transform *transform;
|
||||
- const struct wg_format *input_format;
|
||||
- const struct wg_format *output_format;
|
||||
};
|
||||
|
||||
enum unix_funcs
|
||||
diff --git a/dlls/winegstreamer/wg_format.c b/dlls/winegstreamer/wg_format.c
|
||||
index 40b9acfefff..8f771bb8abd 100644
|
||||
--- a/dlls/winegstreamer/wg_format.c
|
||||
+++ b/dlls/winegstreamer/wg_format.c
|
||||
@@ -394,43 +394,6 @@ static GstCaps *wg_format_to_caps_video(const struct wg_format *format)
|
||||
return caps;
|
||||
}
|
||||
|
||||
-static GstCaps *wg_format_to_caps_wma(const struct wg_format *format)
|
||||
-{
|
||||
- GstBuffer *buffer;
|
||||
- GstCaps *caps;
|
||||
-
|
||||
- if (!(caps = gst_caps_new_empty_simple("audio/x-wma")))
|
||||
- return NULL;
|
||||
- if (format->u.wma.version)
|
||||
- gst_caps_set_simple(caps, "wmaversion", G_TYPE_INT, format->u.wma.version, NULL);
|
||||
-
|
||||
- if (format->u.wma.bitrate)
|
||||
- gst_caps_set_simple(caps, "bitrate", G_TYPE_INT, format->u.wma.bitrate, NULL);
|
||||
- if (format->u.wma.rate)
|
||||
- gst_caps_set_simple(caps, "rate", G_TYPE_INT, format->u.wma.rate, NULL);
|
||||
- if (format->u.wma.depth)
|
||||
- gst_caps_set_simple(caps, "depth", G_TYPE_INT, format->u.wma.depth, NULL);
|
||||
- if (format->u.wma.channels)
|
||||
- gst_caps_set_simple(caps, "channels", G_TYPE_INT, format->u.wma.channels, NULL);
|
||||
- if (format->u.wma.block_align)
|
||||
- gst_caps_set_simple(caps, "block_align", G_TYPE_INT, format->u.wma.block_align, NULL);
|
||||
-
|
||||
- if (format->u.wma.codec_data_len)
|
||||
- {
|
||||
- if (!(buffer = gst_buffer_new_and_alloc(format->u.wma.codec_data_len)))
|
||||
- {
|
||||
- gst_caps_unref(caps);
|
||||
- return NULL;
|
||||
- }
|
||||
-
|
||||
- gst_buffer_fill(buffer, 0, format->u.wma.codec_data, format->u.wma.codec_data_len);
|
||||
- gst_caps_set_simple(caps, "codec_data", GST_TYPE_BUFFER, buffer, NULL);
|
||||
- gst_buffer_unref(buffer);
|
||||
- }
|
||||
-
|
||||
- return caps;
|
||||
-}
|
||||
-
|
||||
GstCaps *wg_format_to_caps(const struct wg_format *format)
|
||||
{
|
||||
switch (format->major_type)
|
||||
@@ -438,7 +401,8 @@ GstCaps *wg_format_to_caps(const struct wg_format *format)
|
||||
case WG_MAJOR_TYPE_UNKNOWN:
|
||||
return NULL;
|
||||
case WG_MAJOR_TYPE_WMA:
|
||||
- return wg_format_to_caps_wma(format);
|
||||
+ GST_FIXME("WMA format not implemented!\n");
|
||||
+ return NULL;
|
||||
case WG_MAJOR_TYPE_AUDIO:
|
||||
return wg_format_to_caps_audio(format);
|
||||
case WG_MAJOR_TYPE_VIDEO:
|
||||
diff --git a/dlls/winegstreamer/wg_transform.c b/dlls/winegstreamer/wg_transform.c
|
||||
index e4545774428..2f225e5bc55 100644
|
||||
--- a/dlls/winegstreamer/wg_transform.c
|
||||
+++ b/dlls/winegstreamer/wg_transform.c
|
||||
@@ -44,29 +44,13 @@ GST_DEBUG_CATEGORY_EXTERN(wine);
|
||||
|
||||
struct wg_transform
|
||||
{
|
||||
- GstPad *my_src, *my_sink;
|
||||
+ int dummy;
|
||||
};
|
||||
|
||||
-static GstFlowReturn transform_sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *buffer)
|
||||
-{
|
||||
- struct wg_transform *transform = gst_pad_get_element_private(pad);
|
||||
-
|
||||
- GST_INFO("transform %p, buffer %p.", transform, buffer);
|
||||
-
|
||||
- gst_buffer_unref(buffer);
|
||||
-
|
||||
- return GST_FLOW_OK;
|
||||
-}
|
||||
-
|
||||
NTSTATUS wg_transform_destroy(void *args)
|
||||
{
|
||||
struct wg_transform *transform = args;
|
||||
|
||||
- if (transform->my_sink)
|
||||
- g_object_unref(transform->my_sink);
|
||||
- if (transform->my_src)
|
||||
- g_object_unref(transform->my_src);
|
||||
-
|
||||
free(transform);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
@@ -74,10 +58,6 @@ NTSTATUS wg_transform_destroy(void *args)
|
||||
NTSTATUS wg_transform_create(void *args)
|
||||
{
|
||||
struct wg_transform_create_params *params = args;
|
||||
- struct wg_format output_format = *params->output_format;
|
||||
- struct wg_format input_format = *params->input_format;
|
||||
- GstCaps *src_caps = NULL, *sink_caps = NULL;
|
||||
- GstPadTemplate *template = NULL;
|
||||
struct wg_transform *transform;
|
||||
NTSTATUS status;
|
||||
|
||||
@@ -89,38 +69,9 @@ NTSTATUS wg_transform_create(void *args)
|
||||
if (!(transform = calloc(1, sizeof(*transform))))
|
||||
goto done;
|
||||
|
||||
- if (!(src_caps = wg_format_to_caps(&input_format)))
|
||||
- goto done;
|
||||
- if (!(sink_caps = wg_format_to_caps(&output_format)))
|
||||
- goto done;
|
||||
-
|
||||
- if (!(template = gst_pad_template_new("src", GST_PAD_SRC, GST_PAD_ALWAYS, src_caps)))
|
||||
- goto done;
|
||||
- if (!(transform->my_src = gst_pad_new_from_template(template, "src")))
|
||||
- goto done;
|
||||
- g_object_unref(template);
|
||||
- template = NULL;
|
||||
-
|
||||
- if (!(template = gst_pad_template_new("sink", GST_PAD_SINK, GST_PAD_ALWAYS, sink_caps)))
|
||||
- goto done;
|
||||
- if (!(transform->my_sink = gst_pad_new_from_template(template, "sink")))
|
||||
- goto done;
|
||||
- g_object_unref(template);
|
||||
- template = NULL;
|
||||
-
|
||||
- gst_pad_set_element_private(transform->my_sink, transform);
|
||||
- gst_pad_set_chain_function(transform->my_sink, transform_sink_chain_cb);
|
||||
-
|
||||
status = STATUS_SUCCESS;
|
||||
|
||||
done:
|
||||
- if (template)
|
||||
- g_object_unref(template);
|
||||
- if (sink_caps)
|
||||
- gst_caps_unref(sink_caps);
|
||||
- if (src_caps)
|
||||
- gst_caps_unref(src_caps);
|
||||
-
|
||||
if (status)
|
||||
{
|
||||
GST_ERROR("Failed to create winegstreamer transform.");
|
||||
diff --git a/dlls/winegstreamer/wma_decoder.c b/dlls/winegstreamer/wma_decoder.c
|
||||
index 6c198706944..b14261706a7 100644
|
||||
--- a/dlls/winegstreamer/wma_decoder.c
|
||||
+++ b/dlls/winegstreamer/wma_decoder.c
|
||||
@@ -78,7 +78,7 @@ static HRESULT try_create_wg_transform(struct wma_decoder *decoder)
|
||||
if (output_format.major_type == WG_MAJOR_TYPE_UNKNOWN)
|
||||
return MF_E_INVALIDMEDIATYPE;
|
||||
|
||||
- if (!(decoder->wg_transform = wg_transform_create(&input_format, &output_format)))
|
||||
+ if (!(decoder->wg_transform = wg_transform_create()))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
--
|
||||
2.34.1
|
||||
|
@@ -1,293 +0,0 @@
|
||||
From 51f5ec2a0fd00995b4ff155a89e46c7dff8e338b Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Crider <gloriouseggroll@gmail.com>
|
||||
Date: Sat, 19 Feb 2022 16:58:23 -0700
|
||||
Subject: [PATCH 05/88] Revert "winegstreamer: Introduce new wg_transform
|
||||
struct."
|
||||
|
||||
This reverts commit 51a262d368afca3ec1edf50a850dbd5339194280.
|
||||
---
|
||||
dlls/winegstreamer/Makefile.in | 1 -
|
||||
dlls/winegstreamer/gst_private.h | 3 --
|
||||
dlls/winegstreamer/main.c | 14 -----
|
||||
dlls/winegstreamer/unix_private.h | 5 --
|
||||
dlls/winegstreamer/unixlib.h | 8 ---
|
||||
dlls/winegstreamer/wg_parser.c | 13 +----
|
||||
dlls/winegstreamer/wg_transform.c | 88 -------------------------------
|
||||
dlls/winegstreamer/wma_decoder.c | 11 ----
|
||||
8 files changed, 2 insertions(+), 141 deletions(-)
|
||||
delete mode 100644 dlls/winegstreamer/wg_transform.c
|
||||
|
||||
diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in
|
||||
index 0bcdb3eec65..d9805e3d797 100644
|
||||
--- a/dlls/winegstreamer/Makefile.in
|
||||
+++ b/dlls/winegstreamer/Makefile.in
|
||||
@@ -14,7 +14,6 @@ C_SRCS = \
|
||||
quartz_parser.c \
|
||||
wg_format.c \
|
||||
wg_parser.c \
|
||||
- wg_transform.c \
|
||||
wm_asyncreader.c \
|
||||
wm_reader.c \
|
||||
wm_syncreader.c \
|
||||
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h
|
||||
index 8bc9f838d29..3584f465218 100644
|
||||
--- a/dlls/winegstreamer/gst_private.h
|
||||
+++ b/dlls/winegstreamer/gst_private.h
|
||||
@@ -96,9 +96,6 @@ uint64_t wg_parser_stream_get_duration(struct wg_parser_stream *stream);
|
||||
void wg_parser_stream_seek(struct wg_parser_stream *stream, double rate,
|
||||
uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags);
|
||||
|
||||
-struct wg_transform *wg_transform_create(void);
|
||||
-void wg_transform_destroy(struct wg_transform *transform);
|
||||
-
|
||||
unsigned int wg_format_get_max_size(const struct wg_format *format);
|
||||
|
||||
HRESULT avi_splitter_create(IUnknown *outer, IUnknown **out);
|
||||
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c
|
||||
index af5a691371d..51a71d3b4a5 100644
|
||||
--- a/dlls/winegstreamer/main.c
|
||||
+++ b/dlls/winegstreamer/main.c
|
||||
@@ -254,20 +254,6 @@ void wg_parser_stream_seek(struct wg_parser_stream *stream, double rate,
|
||||
__wine_unix_call(unix_handle, unix_wg_parser_stream_seek, ¶ms);
|
||||
}
|
||||
|
||||
-struct wg_transform *wg_transform_create(void)
|
||||
-{
|
||||
- struct wg_transform_create_params params = {0};
|
||||
-
|
||||
- if (__wine_unix_call(unix_handle, unix_wg_transform_create, ¶ms))
|
||||
- return NULL;
|
||||
- return params.transform;
|
||||
-}
|
||||
-
|
||||
-void wg_transform_destroy(struct wg_transform *transform)
|
||||
-{
|
||||
- __wine_unix_call(unix_handle, unix_wg_transform_destroy, transform);
|
||||
-}
|
||||
-
|
||||
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
|
||||
{
|
||||
if (reason == DLL_PROCESS_ATTACH)
|
||||
diff --git a/dlls/winegstreamer/unix_private.h b/dlls/winegstreamer/unix_private.h
|
||||
index f9c4da2f6ea..b483638403d 100644
|
||||
--- a/dlls/winegstreamer/unix_private.h
|
||||
+++ b/dlls/winegstreamer/unix_private.h
|
||||
@@ -25,13 +25,8 @@
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
-extern bool init_gstreamer(void) DECLSPEC_HIDDEN;
|
||||
-
|
||||
extern void wg_format_from_caps(struct wg_format *format, const GstCaps *caps) DECLSPEC_HIDDEN;
|
||||
extern bool wg_format_compare(const struct wg_format *a, const struct wg_format *b) DECLSPEC_HIDDEN;
|
||||
extern GstCaps *wg_format_to_caps(const struct wg_format *format) DECLSPEC_HIDDEN;
|
||||
|
||||
-extern NTSTATUS wg_transform_create(void *args) DECLSPEC_HIDDEN;
|
||||
-extern NTSTATUS wg_transform_destroy(void *args) DECLSPEC_HIDDEN;
|
||||
-
|
||||
#endif /* __WINE_WINEGSTREAMER_UNIX_PRIVATE_H */
|
||||
diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h
|
||||
index 8e3f5e84bfb..45ec606fc6a 100644
|
||||
--- a/dlls/winegstreamer/unixlib.h
|
||||
+++ b/dlls/winegstreamer/unixlib.h
|
||||
@@ -229,11 +229,6 @@ struct wg_parser_stream_seek_params
|
||||
DWORD start_flags, stop_flags;
|
||||
};
|
||||
|
||||
-struct wg_transform_create_params
|
||||
-{
|
||||
- struct wg_transform *transform;
|
||||
-};
|
||||
-
|
||||
enum unix_funcs
|
||||
{
|
||||
unix_wg_parser_create,
|
||||
@@ -262,9 +257,6 @@ enum unix_funcs
|
||||
|
||||
unix_wg_parser_stream_get_duration,
|
||||
unix_wg_parser_stream_seek,
|
||||
-
|
||||
- unix_wg_transform_create,
|
||||
- unix_wg_transform_destroy,
|
||||
};
|
||||
|
||||
#endif /* __WINE_WINEGSTREAMER_UNIXLIB_H */
|
||||
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
|
||||
index 40c394c3caf..66f60d27477 100644
|
||||
--- a/dlls/winegstreamer/wg_parser.c
|
||||
+++ b/dlls/winegstreamer/wg_parser.c
|
||||
@@ -1586,13 +1586,6 @@ static void init_gstreamer_once(void)
|
||||
gst_version_string(), GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_VERSION_MICRO);
|
||||
}
|
||||
|
||||
-bool init_gstreamer(void)
|
||||
-{
|
||||
- static pthread_once_t init_once = PTHREAD_ONCE_INIT;
|
||||
-
|
||||
- return !pthread_once(&init_once, init_gstreamer_once);
|
||||
-}
|
||||
-
|
||||
static NTSTATUS wg_parser_create(void *args)
|
||||
{
|
||||
static const init_gst_cb init_funcs[] =
|
||||
@@ -1603,10 +1596,11 @@ static NTSTATUS wg_parser_create(void *args)
|
||||
[WG_PARSER_WAVPARSE] = wave_parser_init_gst,
|
||||
};
|
||||
|
||||
+ static pthread_once_t once = PTHREAD_ONCE_INIT;
|
||||
struct wg_parser_create_params *params = args;
|
||||
struct wg_parser *parser;
|
||||
|
||||
- if (!init_gstreamer())
|
||||
+ if (pthread_once(&once, init_gstreamer_once))
|
||||
return E_FAIL;
|
||||
|
||||
if (!(parser = calloc(1, sizeof(*parser))))
|
||||
@@ -1673,7 +1667,4 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
|
||||
|
||||
X(wg_parser_stream_get_duration),
|
||||
X(wg_parser_stream_seek),
|
||||
-
|
||||
- X(wg_transform_create),
|
||||
- X(wg_transform_destroy),
|
||||
};
|
||||
diff --git a/dlls/winegstreamer/wg_transform.c b/dlls/winegstreamer/wg_transform.c
|
||||
deleted file mode 100644
|
||||
index 2f225e5bc55..00000000000
|
||||
--- a/dlls/winegstreamer/wg_transform.c
|
||||
+++ /dev/null
|
||||
@@ -1,88 +0,0 @@
|
||||
-/*
|
||||
- * GStreamer transform backend
|
||||
- *
|
||||
- * Copyright 2022 Rémi Bernon 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
|
||||
- */
|
||||
-
|
||||
-#if 0
|
||||
-#pragma makedep unix
|
||||
-#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 "winternl.h"
|
||||
-#include "dshow.h"
|
||||
-
|
||||
-#include "unix_private.h"
|
||||
-
|
||||
-GST_DEBUG_CATEGORY_EXTERN(wine);
|
||||
-#define GST_CAT_DEFAULT wine
|
||||
-
|
||||
-struct wg_transform
|
||||
-{
|
||||
- int dummy;
|
||||
-};
|
||||
-
|
||||
-NTSTATUS wg_transform_destroy(void *args)
|
||||
-{
|
||||
- struct wg_transform *transform = args;
|
||||
-
|
||||
- free(transform);
|
||||
- return STATUS_SUCCESS;
|
||||
-}
|
||||
-
|
||||
-NTSTATUS wg_transform_create(void *args)
|
||||
-{
|
||||
- struct wg_transform_create_params *params = args;
|
||||
- struct wg_transform *transform;
|
||||
- NTSTATUS status;
|
||||
-
|
||||
- if (!init_gstreamer())
|
||||
- return STATUS_UNSUCCESSFUL;
|
||||
-
|
||||
- status = STATUS_NO_MEMORY;
|
||||
-
|
||||
- if (!(transform = calloc(1, sizeof(*transform))))
|
||||
- goto done;
|
||||
-
|
||||
- status = STATUS_SUCCESS;
|
||||
-
|
||||
-done:
|
||||
- if (status)
|
||||
- {
|
||||
- GST_ERROR("Failed to create winegstreamer transform.");
|
||||
- if (transform)
|
||||
- wg_transform_destroy(transform);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- GST_INFO("Created winegstreamer transform %p.", transform);
|
||||
- params->transform = transform;
|
||||
- }
|
||||
-
|
||||
- return status;
|
||||
-}
|
||||
diff --git a/dlls/winegstreamer/wma_decoder.c b/dlls/winegstreamer/wma_decoder.c
|
||||
index b14261706a7..31f735a5b1d 100644
|
||||
--- a/dlls/winegstreamer/wma_decoder.c
|
||||
+++ b/dlls/winegstreamer/wma_decoder.c
|
||||
@@ -53,8 +53,6 @@ struct wma_decoder
|
||||
LONG refcount;
|
||||
IMFMediaType *input_type;
|
||||
IMFMediaType *output_type;
|
||||
-
|
||||
- struct wg_transform *wg_transform;
|
||||
};
|
||||
|
||||
static inline struct wma_decoder *impl_from_IUnknown(IUnknown *iface)
|
||||
@@ -66,10 +64,6 @@ static HRESULT try_create_wg_transform(struct wma_decoder *decoder)
|
||||
{
|
||||
struct wg_format input_format, output_format;
|
||||
|
||||
- if (decoder->wg_transform)
|
||||
- wg_transform_destroy(decoder->wg_transform);
|
||||
- decoder->wg_transform = NULL;
|
||||
-
|
||||
mf_media_type_to_wg_format(decoder->input_type, &input_format);
|
||||
if (input_format.major_type == WG_MAJOR_TYPE_UNKNOWN)
|
||||
return MF_E_INVALIDMEDIATYPE;
|
||||
@@ -78,9 +72,6 @@ static HRESULT try_create_wg_transform(struct wma_decoder *decoder)
|
||||
if (output_format.major_type == WG_MAJOR_TYPE_UNKNOWN)
|
||||
return MF_E_INVALIDMEDIATYPE;
|
||||
|
||||
- if (!(decoder->wg_transform = wg_transform_create()))
|
||||
- return E_FAIL;
|
||||
-
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -128,8 +119,6 @@ static ULONG WINAPI unknown_Release(IUnknown *iface)
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
- if (decoder->wg_transform)
|
||||
- wg_transform_destroy(decoder->wg_transform);
|
||||
if (decoder->input_type)
|
||||
IMFMediaType_Release(decoder->input_type);
|
||||
if (decoder->output_type)
|
||||
--
|
||||
2.34.1
|
||||
|
@@ -1,344 +0,0 @@
|
||||
From 01b1caa979ab811edb7b859bc8f84ee68053a991 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Crider <gloriouseggroll@gmail.com>
|
||||
Date: Sat, 19 Feb 2022 16:58:47 -0700
|
||||
Subject: [PATCH 06/88] Revert "winegstreamer: Introduce new WG_MAJOR_TYPE_WMA
|
||||
major type."
|
||||
|
||||
This reverts commit 76e2883c4ace29279dce8ea58787871046227b1a.
|
||||
---
|
||||
dlls/winegstreamer/mfplat.c | 109 ++++++-----------------------
|
||||
dlls/winegstreamer/quartz_parser.c | 8 ---
|
||||
dlls/winegstreamer/unixlib.h | 12 ----
|
||||
dlls/winegstreamer/wg_format.c | 7 --
|
||||
dlls/winegstreamer/wm_reader.c | 8 ---
|
||||
dlls/winegstreamer/wma_decoder.c | 18 -----
|
||||
6 files changed, 21 insertions(+), 141 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index 9b3fc429d32..a111bbe196d 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -635,10 +635,6 @@ IMFMediaType *mf_media_type_from_wg_format(const struct wg_format *format)
|
||||
case WG_MAJOR_TYPE_UNKNOWN:
|
||||
return NULL;
|
||||
|
||||
- case WG_MAJOR_TYPE_WMA:
|
||||
- FIXME("WMA format not implemented!\n");
|
||||
- return NULL;
|
||||
-
|
||||
case WG_MAJOR_TYPE_AUDIO:
|
||||
return mf_media_type_from_wg_format_audio(format);
|
||||
|
||||
@@ -650,11 +646,17 @@ IMFMediaType *mf_media_type_from_wg_format(const struct wg_format *format)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-static void mf_media_type_to_wg_format_audio(IMFMediaType *type, const GUID *subtype, struct wg_format *format)
|
||||
+static void mf_media_type_to_wg_format_audio(IMFMediaType *type, struct wg_format *format)
|
||||
{
|
||||
UINT32 rate, channels, channel_mask, depth;
|
||||
unsigned int i;
|
||||
+ GUID subtype;
|
||||
|
||||
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)))
|
||||
+ {
|
||||
+ FIXME("Subtype is not set.\n");
|
||||
+ return;
|
||||
+ }
|
||||
if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &rate)))
|
||||
{
|
||||
FIXME("Sample rate is not set.\n");
|
||||
@@ -690,20 +692,26 @@ static void mf_media_type_to_wg_format_audio(IMFMediaType *type, const GUID *sub
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(audio_formats); ++i)
|
||||
{
|
||||
- if (IsEqualGUID(subtype, audio_formats[i].subtype) && depth == audio_formats[i].depth)
|
||||
+ if (IsEqualGUID(&subtype, audio_formats[i].subtype) && depth == audio_formats[i].depth)
|
||||
{
|
||||
format->u.audio.format = audio_formats[i].format;
|
||||
return;
|
||||
}
|
||||
}
|
||||
- FIXME("Unrecognized audio subtype %s, depth %u.\n", debugstr_guid(subtype), depth);
|
||||
+ FIXME("Unrecognized audio subtype %s, depth %u.\n", debugstr_guid(&subtype), depth);
|
||||
}
|
||||
|
||||
-static void mf_media_type_to_wg_format_video(IMFMediaType *type, const GUID *subtype, struct wg_format *format)
|
||||
+static void mf_media_type_to_wg_format_video(IMFMediaType *type, struct wg_format *format)
|
||||
{
|
||||
UINT64 frame_rate, frame_size;
|
||||
unsigned int i;
|
||||
+ GUID subtype;
|
||||
|
||||
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)))
|
||||
+ {
|
||||
+ FIXME("Subtype is not set.\n");
|
||||
+ return;
|
||||
+ }
|
||||
if (FAILED(IMFMediaType_GetUINT64(type, &MF_MT_FRAME_SIZE, &frame_size)))
|
||||
{
|
||||
FIXME("Frame size is not set.\n");
|
||||
@@ -724,80 +732,18 @@ static void mf_media_type_to_wg_format_video(IMFMediaType *type, const GUID *sub
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(video_formats); ++i)
|
||||
{
|
||||
- if (IsEqualGUID(subtype, video_formats[i].subtype))
|
||||
+ if (IsEqualGUID(&subtype, video_formats[i].subtype))
|
||||
{
|
||||
format->u.video.format = video_formats[i].format;
|
||||
return;
|
||||
}
|
||||
}
|
||||
- FIXME("Unrecognized video subtype %s.\n", debugstr_guid(subtype));
|
||||
-}
|
||||
-
|
||||
-static void mf_media_type_to_wg_format_wma(IMFMediaType *type, const GUID *subtype, struct wg_format *format)
|
||||
-{
|
||||
- UINT32 rate, depth, channels, block_align, bytes_per_second, codec_data_len;
|
||||
- BYTE codec_data[64];
|
||||
- UINT32 version;
|
||||
-
|
||||
- if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &rate)))
|
||||
- {
|
||||
- FIXME("Sample rate is not set.\n");
|
||||
- return;
|
||||
- }
|
||||
- if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_NUM_CHANNELS, &channels)))
|
||||
- {
|
||||
- FIXME("Channel count is not set.\n");
|
||||
- return;
|
||||
- }
|
||||
- if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &block_align)))
|
||||
- {
|
||||
- FIXME("Block alignment is not set.\n");
|
||||
- return;
|
||||
- }
|
||||
- if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BITS_PER_SAMPLE, &depth)))
|
||||
- {
|
||||
- FIXME("Depth is not set.\n");
|
||||
- return;
|
||||
- }
|
||||
- if (FAILED(IMFMediaType_GetBlob(type, &MF_MT_USER_DATA, codec_data, sizeof(codec_data), &codec_data_len)))
|
||||
- {
|
||||
- FIXME("Codec data is not set.\n");
|
||||
- return;
|
||||
- }
|
||||
- if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_AVG_BYTES_PER_SECOND, &bytes_per_second)))
|
||||
- {
|
||||
- FIXME("Bitrate is not set.\n");
|
||||
- bytes_per_second = 0;
|
||||
- }
|
||||
-
|
||||
- if (IsEqualGUID(subtype, &MEDIASUBTYPE_MSAUDIO1))
|
||||
- version = 1;
|
||||
- else if (IsEqualGUID(subtype, &MFAudioFormat_WMAudioV8))
|
||||
- version = 2;
|
||||
- else if (IsEqualGUID(subtype, &MFAudioFormat_WMAudioV9))
|
||||
- version = 3;
|
||||
- else if (IsEqualGUID(subtype, &MFAudioFormat_WMAudio_Lossless))
|
||||
- version = 4;
|
||||
- else
|
||||
- {
|
||||
- assert(0);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- format->major_type = WG_MAJOR_TYPE_WMA;
|
||||
- format->u.wma.version = version;
|
||||
- format->u.wma.bitrate = bytes_per_second * 8;
|
||||
- format->u.wma.rate = rate;
|
||||
- format->u.wma.depth = depth;
|
||||
- format->u.wma.channels = channels;
|
||||
- format->u.wma.block_align = block_align;
|
||||
- format->u.wma.codec_data_len = codec_data_len;
|
||||
- memcpy(format->u.wma.codec_data, codec_data, codec_data_len);
|
||||
+ FIXME("Unrecognized video subtype %s.\n", debugstr_guid(&subtype));
|
||||
}
|
||||
|
||||
void mf_media_type_to_wg_format(IMFMediaType *type, struct wg_format *format)
|
||||
{
|
||||
- GUID major_type, subtype;
|
||||
+ GUID major_type;
|
||||
|
||||
memset(format, 0, sizeof(*format));
|
||||
|
||||
@@ -806,24 +752,11 @@ void mf_media_type_to_wg_format(IMFMediaType *type, struct wg_format *format)
|
||||
FIXME("Major type is not set.\n");
|
||||
return;
|
||||
}
|
||||
- if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)))
|
||||
- {
|
||||
- FIXME("Subtype is not set.\n");
|
||||
- return;
|
||||
- }
|
||||
|
||||
if (IsEqualGUID(&major_type, &MFMediaType_Audio))
|
||||
- {
|
||||
- if (IsEqualGUID(&subtype, &MEDIASUBTYPE_MSAUDIO1) ||
|
||||
- IsEqualGUID(&subtype, &MFAudioFormat_WMAudioV8) ||
|
||||
- IsEqualGUID(&subtype, &MFAudioFormat_WMAudioV9) ||
|
||||
- IsEqualGUID(&subtype, &MFAudioFormat_WMAudio_Lossless))
|
||||
- mf_media_type_to_wg_format_wma(type, &subtype, format);
|
||||
- else
|
||||
- mf_media_type_to_wg_format_audio(type, &subtype, format);
|
||||
- }
|
||||
+ mf_media_type_to_wg_format_audio(type, format);
|
||||
else if (IsEqualGUID(&major_type, &MFMediaType_Video))
|
||||
- mf_media_type_to_wg_format_video(type, &subtype, format);
|
||||
+ mf_media_type_to_wg_format_video(type, format);
|
||||
else
|
||||
FIXME("Unrecognized major type %s.\n", debugstr_guid(&major_type));
|
||||
}
|
||||
diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c
|
||||
index e06c55ccfe0..45313ebda27 100644
|
||||
--- a/dlls/winegstreamer/quartz_parser.c
|
||||
+++ b/dlls/winegstreamer/quartz_parser.c
|
||||
@@ -319,10 +319,6 @@ unsigned int wg_format_get_max_size(const struct wg_format *format)
|
||||
break;
|
||||
}
|
||||
|
||||
- case WG_MAJOR_TYPE_WMA:
|
||||
- FIXME("WMA format not implemented!\n");
|
||||
- return 0;
|
||||
-
|
||||
case WG_MAJOR_TYPE_UNKNOWN:
|
||||
FIXME("Cannot guess maximum sample size for unknown format.\n");
|
||||
return 0;
|
||||
@@ -417,10 +413,6 @@ bool amt_from_wg_format(AM_MEDIA_TYPE *mt, const struct wg_format *format, bool
|
||||
case WG_MAJOR_TYPE_UNKNOWN:
|
||||
return false;
|
||||
|
||||
- case WG_MAJOR_TYPE_WMA:
|
||||
- FIXME("WMA format not implemented!\n");
|
||||
- return false;
|
||||
-
|
||||
case WG_MAJOR_TYPE_AUDIO:
|
||||
return amt_from_wg_format_audio(mt, format);
|
||||
|
||||
diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h
|
||||
index 45ec606fc6a..82bb534b938 100644
|
||||
--- a/dlls/winegstreamer/unixlib.h
|
||||
+++ b/dlls/winegstreamer/unixlib.h
|
||||
@@ -37,7 +37,6 @@ struct wg_format
|
||||
WG_MAJOR_TYPE_UNKNOWN,
|
||||
WG_MAJOR_TYPE_VIDEO,
|
||||
WG_MAJOR_TYPE_AUDIO,
|
||||
- WG_MAJOR_TYPE_WMA,
|
||||
} major_type;
|
||||
|
||||
union
|
||||
@@ -89,17 +88,6 @@ struct wg_format
|
||||
uint32_t channel_mask; /* In WinMM format. */
|
||||
uint32_t rate;
|
||||
} audio;
|
||||
- struct
|
||||
- {
|
||||
- uint32_t version;
|
||||
- uint32_t bitrate;
|
||||
- uint32_t rate;
|
||||
- uint32_t depth;
|
||||
- uint32_t channels;
|
||||
- uint32_t block_align;
|
||||
- uint32_t codec_data_len;
|
||||
- unsigned char codec_data[64];
|
||||
- } wma;
|
||||
} u;
|
||||
};
|
||||
|
||||
diff --git a/dlls/winegstreamer/wg_format.c b/dlls/winegstreamer/wg_format.c
|
||||
index 8f771bb8abd..8952acc1c2e 100644
|
||||
--- a/dlls/winegstreamer/wg_format.c
|
||||
+++ b/dlls/winegstreamer/wg_format.c
|
||||
@@ -400,9 +400,6 @@ GstCaps *wg_format_to_caps(const struct wg_format *format)
|
||||
{
|
||||
case WG_MAJOR_TYPE_UNKNOWN:
|
||||
return NULL;
|
||||
- case WG_MAJOR_TYPE_WMA:
|
||||
- GST_FIXME("WMA format not implemented!\n");
|
||||
- return NULL;
|
||||
case WG_MAJOR_TYPE_AUDIO:
|
||||
return wg_format_to_caps_audio(format);
|
||||
case WG_MAJOR_TYPE_VIDEO:
|
||||
@@ -422,10 +419,6 @@ bool wg_format_compare(const struct wg_format *a, const struct wg_format *b)
|
||||
case WG_MAJOR_TYPE_UNKNOWN:
|
||||
return false;
|
||||
|
||||
- case WG_MAJOR_TYPE_WMA:
|
||||
- GST_FIXME("WMA format not implemented!\n");
|
||||
- return false;
|
||||
-
|
||||
case WG_MAJOR_TYPE_AUDIO:
|
||||
return a->u.audio.format == b->u.audio.format
|
||||
&& a->u.audio.channels == b->u.audio.channels
|
||||
diff --git a/dlls/winegstreamer/wm_reader.c b/dlls/winegstreamer/wm_reader.c
|
||||
index 01518c6b9a8..d40afb66afd 100644
|
||||
--- a/dlls/winegstreamer/wm_reader.c
|
||||
+++ b/dlls/winegstreamer/wm_reader.c
|
||||
@@ -1687,9 +1687,6 @@ HRESULT wm_reader_get_output_format_count(struct wm_reader *reader, DWORD output
|
||||
*count = ARRAY_SIZE(video_formats);
|
||||
break;
|
||||
|
||||
- case WG_MAJOR_TYPE_WMA:
|
||||
- FIXME("WMA format not implemented!\n");
|
||||
- /* fallthrough */
|
||||
case WG_MAJOR_TYPE_AUDIO:
|
||||
case WG_MAJOR_TYPE_UNKNOWN:
|
||||
*count = 1;
|
||||
@@ -1736,9 +1733,6 @@ HRESULT wm_reader_get_output_format(struct wm_reader *reader, DWORD output,
|
||||
format.u.audio.format = WG_AUDIO_FORMAT_S16LE;
|
||||
break;
|
||||
|
||||
- case WG_MAJOR_TYPE_WMA:
|
||||
- FIXME("WMA format not implemented!\n");
|
||||
- break;
|
||||
case WG_MAJOR_TYPE_UNKNOWN:
|
||||
break;
|
||||
}
|
||||
@@ -1814,8 +1808,6 @@ static const char *get_major_type_string(enum wg_major_type type)
|
||||
return "video";
|
||||
case WG_MAJOR_TYPE_UNKNOWN:
|
||||
return "unknown";
|
||||
- case WG_MAJOR_TYPE_WMA:
|
||||
- return "wma";
|
||||
}
|
||||
assert(0);
|
||||
return NULL;
|
||||
diff --git a/dlls/winegstreamer/wma_decoder.c b/dlls/winegstreamer/wma_decoder.c
|
||||
index 31f735a5b1d..78316059052 100644
|
||||
--- a/dlls/winegstreamer/wma_decoder.c
|
||||
+++ b/dlls/winegstreamer/wma_decoder.c
|
||||
@@ -60,21 +60,6 @@ static inline struct wma_decoder *impl_from_IUnknown(IUnknown *iface)
|
||||
return CONTAINING_RECORD(iface, struct wma_decoder, IUnknown_inner);
|
||||
}
|
||||
|
||||
-static HRESULT try_create_wg_transform(struct wma_decoder *decoder)
|
||||
-{
|
||||
- struct wg_format input_format, output_format;
|
||||
-
|
||||
- mf_media_type_to_wg_format(decoder->input_type, &input_format);
|
||||
- if (input_format.major_type == WG_MAJOR_TYPE_UNKNOWN)
|
||||
- return MF_E_INVALIDMEDIATYPE;
|
||||
-
|
||||
- mf_media_type_to_wg_format(decoder->output_type, &output_format);
|
||||
- if (output_format.major_type == WG_MAJOR_TYPE_UNKNOWN)
|
||||
- return MF_E_INVALIDMEDIATYPE;
|
||||
-
|
||||
- return S_OK;
|
||||
-}
|
||||
-
|
||||
static HRESULT WINAPI unknown_QueryInterface(IUnknown *iface, REFIID iid, void **out)
|
||||
{
|
||||
struct wma_decoder *decoder = impl_from_IUnknown(iface);
|
||||
@@ -453,9 +438,6 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF
|
||||
if (FAILED(hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *)decoder->output_type)))
|
||||
goto failed;
|
||||
|
||||
- if (FAILED(hr = try_create_wg_transform(decoder)))
|
||||
- goto failed;
|
||||
-
|
||||
return S_OK;
|
||||
|
||||
failed:
|
||||
--
|
||||
2.34.1
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,95 +0,0 @@
|
||||
From 6317747d6b4ec2e94d92bd5f1dd4b73710cf02c4 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Tue, 20 Oct 2020 17:03:24 -0500
|
||||
Subject: [PATCH 09/88] HACK: winegstreamer: Use capssetter to ignore
|
||||
non-default YUV color spaces.
|
||||
|
||||
---
|
||||
dlls/winegstreamer/wg_parser.c | 53 ++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 51 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
|
||||
index 5f3b4375b4c..b93b2c182ae 100644
|
||||
--- a/dlls/winegstreamer/wg_parser.c
|
||||
+++ b/dlls/winegstreamer/wg_parser.c
|
||||
@@ -1176,7 +1176,53 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
|
||||
if (!strcmp(name, "video/x-raw"))
|
||||
{
|
||||
- GstElement *deinterlace, *vconv, *flip, *vconv2;
|
||||
+ GstElement *capssetter, *deinterlace, *vconv, *flip, *vconv2;
|
||||
+
|
||||
+ /* Hack?: Flatten down the colorimetry to default values, without
|
||||
+ * actually modifying the video at all.
|
||||
+ *
|
||||
+ * We want to do color matrix conversions when converting from YUV to
|
||||
+ * RGB or vice versa. We do *not* want to do color matrix conversions
|
||||
+ * when converting YUV <-> YUV or RGB <-> RGB, because these are slow
|
||||
+ * (it essentially means always using the slow path, never going through
|
||||
+ * liborc). However, we have two videoconvert elements, and it's
|
||||
+ * basically impossible to know what conversions each is going to do
|
||||
+ * until caps are negotiated (without depending on some implementation
|
||||
+ * details, and even then it'snot exactly trivial). And setting
|
||||
+ * matrix-mode after caps are negotiated has no effect.
|
||||
+ *
|
||||
+ * Nor can we just retain colorimetry information the way we retain
|
||||
+ * other caps values, because videoconvert automatically clears it if
|
||||
+ * not doing passthrough. I think that this would only happen if we have
|
||||
+ * to do a double conversion, but that is possible. Not likely, but I
|
||||
+ * don't want to have to be the one to find out that there's still a
|
||||
+ * game broken.
|
||||
+ *
|
||||
+ * [Note that we'd actually kind of like to retain colorimetry
|
||||
+ * information, just in case it does ever become relevant to pass that
|
||||
+ * on to the next DirectShow filter. Hence I think the correct solution
|
||||
+ * for upstream is to get videoconvert to Not Do That.]
|
||||
+ *
|
||||
+ * So as a fallback solution, we force an identity transformation of
|
||||
+ * the caps to those with a "default" color matrix—i.e. transform the
|
||||
+ * caps, but not the data. We do this by *pre*pending a capssetter to
|
||||
+ * the front of the chain, and we remove the matrix-mode setting for the
|
||||
+ * videoconvert elements.
|
||||
+ */
|
||||
+ if (!(capssetter = gst_element_factory_make("capssetter", NULL)))
|
||||
+ {
|
||||
+ GST_ERROR("Failed to create capssetter, are %u-bit GStreamer \"good\" plugins installed?\n",
|
||||
+ 8 * (int)sizeof(void *));
|
||||
+ goto out;
|
||||
+ }
|
||||
+ gst_util_set_object_arg(G_OBJECT(capssetter), "join", "true");
|
||||
+ /* Actually, this is invalid, but it causes videoconvert to use default
|
||||
+ * colorimetry as a result. Yes, this is depending on undocumented
|
||||
+ * implementation details. It's a hack.
|
||||
+ *
|
||||
+ * Sadly there doesn't seem to be a way to get capssetter to clear
|
||||
+ * certain fields while leaving others untouched. */
|
||||
+ gst_util_set_object_arg(G_OBJECT(capssetter), "caps", "video/x-raw,colorimetry=0:0:0:0");
|
||||
|
||||
/* DirectShow can express interlaced video, but downstream filters can't
|
||||
* necessarily consume it. In particular, the video renderer can't. */
|
||||
@@ -1202,6 +1248,8 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
goto out;
|
||||
|
||||
/* The bin takes ownership of these elements. */
|
||||
+ gst_bin_add(GST_BIN(parser->container), capssetter);
|
||||
+ gst_element_sync_state_with_parent(capssetter);
|
||||
gst_bin_add(GST_BIN(parser->container), deinterlace);
|
||||
gst_element_sync_state_with_parent(deinterlace);
|
||||
gst_bin_add(GST_BIN(parser->container), vconv);
|
||||
@@ -1211,11 +1259,12 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
gst_bin_add(GST_BIN(parser->container), vconv2);
|
||||
gst_element_sync_state_with_parent(vconv2);
|
||||
|
||||
+ gst_element_link(capssetter, deinterlace);
|
||||
gst_element_link(deinterlace, vconv);
|
||||
gst_element_link(vconv, flip);
|
||||
gst_element_link(flip, vconv2);
|
||||
|
||||
- stream->post_sink = gst_element_get_static_pad(deinterlace, "sink");
|
||||
+ stream->post_sink = gst_element_get_static_pad(capssetter, "sink");
|
||||
stream->post_src = gst_element_get_static_pad(vconv2, "src");
|
||||
stream->flip = flip;
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
@@ -1,97 +0,0 @@
|
||||
From 9d51154a13d10305bfbb8a0e242feef0063e3957 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 6 Jul 2021 14:06:11 +0200
|
||||
Subject: [PATCH 10/88] HACK: quartz: Keep a reference on the IMediaPosition
|
||||
interface.
|
||||
|
||||
In the same way we do for IMediaSeeking. Both interfaces are actually
|
||||
implemented with a shared refcount and releasing both makes the filter
|
||||
be destroyed.
|
||||
|
||||
For Tokyo Xanadu eX+ crash on launch.
|
||||
|
||||
CW-Bug-Id: #18994
|
||||
---
|
||||
dlls/quartz/filtergraph.c | 24 ++++++++++++++++--------
|
||||
1 file changed, 16 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
|
||||
index 55462244ea9..c602d6236ba 100644
|
||||
--- a/dlls/quartz/filtergraph.c
|
||||
+++ b/dlls/quartz/filtergraph.c
|
||||
@@ -61,6 +61,7 @@ struct filter
|
||||
struct list entry;
|
||||
IBaseFilter *filter;
|
||||
IMediaSeeking *seeking;
|
||||
+ IMediaPosition *position;
|
||||
WCHAR *name;
|
||||
BOOL sorting;
|
||||
};
|
||||
@@ -542,6 +543,7 @@ static BOOL has_output_pins(IBaseFilter *filter)
|
||||
|
||||
static void update_seeking(struct filter *filter)
|
||||
{
|
||||
+ IMediaPosition *position;
|
||||
IMediaSeeking *seeking;
|
||||
|
||||
if (!filter->seeking)
|
||||
@@ -560,11 +562,19 @@ static void update_seeking(struct filter *filter)
|
||||
IMediaSeeking_Release(seeking);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ if (!filter->position)
|
||||
+ {
|
||||
+ /* Tokyo Xanadu eX+, same as above, same developer, destroys its filter when
|
||||
+ * its IMediaPosition interface is released, so cache the interface instead
|
||||
+ * of querying for it every time. */
|
||||
+ if (SUCCEEDED(IBaseFilter_QueryInterface(filter->filter, &IID_IMediaPosition, (void **)&position)))
|
||||
+ filter->position = position;
|
||||
+ }
|
||||
}
|
||||
|
||||
static BOOL is_renderer(struct filter *filter)
|
||||
{
|
||||
- IMediaPosition *media_position;
|
||||
IAMFilterMiscFlags *flags;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
@@ -574,16 +584,11 @@ static BOOL is_renderer(struct filter *filter)
|
||||
ret = TRUE;
|
||||
IAMFilterMiscFlags_Release(flags);
|
||||
}
|
||||
- else if (SUCCEEDED(IBaseFilter_QueryInterface(filter->filter, &IID_IMediaPosition, (void **)&media_position)))
|
||||
- {
|
||||
- if (!has_output_pins(filter->filter))
|
||||
- ret = TRUE;
|
||||
- IMediaPosition_Release(media_position);
|
||||
- }
|
||||
else
|
||||
{
|
||||
update_seeking(filter);
|
||||
- if (filter->seeking && !has_output_pins(filter->filter))
|
||||
+ if ((filter->seeking || filter->position) &&
|
||||
+ !has_output_pins(filter->filter))
|
||||
ret = TRUE;
|
||||
}
|
||||
return ret;
|
||||
@@ -654,6 +659,7 @@ static HRESULT WINAPI FilterGraph2_AddFilter(IFilterGraph2 *iface,
|
||||
list_add_head(&graph->filters, &entry->entry);
|
||||
entry->sorting = FALSE;
|
||||
entry->seeking = NULL;
|
||||
+ entry->position = NULL;
|
||||
++graph->version;
|
||||
|
||||
return duplicate_name ? VFW_S_DUPLICATE_NAME : hr;
|
||||
@@ -721,6 +727,8 @@ static HRESULT WINAPI FilterGraph2_RemoveFilter(IFilterGraph2 *iface, IBaseFilte
|
||||
{
|
||||
IBaseFilter_SetSyncSource(pFilter, NULL);
|
||||
IBaseFilter_Release(pFilter);
|
||||
+ if (entry->position)
|
||||
+ IMediaPosition_Release(entry->position);
|
||||
if (entry->seeking)
|
||||
IMediaSeeking_Release(entry->seeking);
|
||||
list_remove(&entry->entry);
|
||||
--
|
||||
2.34.1
|
||||
|
@@ -1,34 +0,0 @@
|
||||
From aaa59bf183211a525221252672fdfc7be6de01e6 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Thu, 18 Mar 2021 16:54:44 -0400
|
||||
Subject: [PATCH 11/88] mfplat: Stub out MFCreateDXGIDeviceManager, to avoid
|
||||
the d3d path.
|
||||
|
||||
---
|
||||
dlls/mfplat/main.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
|
||||
index 72ce560c772..ba2f46693a8 100644
|
||||
--- a/dlls/mfplat/main.c
|
||||
+++ b/dlls/mfplat/main.c
|
||||
@@ -9246,9 +9246,16 @@ static const IMFDXGIDeviceManagerVtbl dxgi_device_manager_vtbl =
|
||||
HRESULT WINAPI MFCreateDXGIDeviceManager(UINT *token, IMFDXGIDeviceManager **manager)
|
||||
{
|
||||
struct dxgi_device_manager *object;
|
||||
+ const char *do_not_create = getenv("PROTON_DO_NOT_CREATE_DXGI_DEVICE_MANAGER");
|
||||
|
||||
TRACE("%p, %p.\n", token, manager);
|
||||
|
||||
+ if (do_not_create && do_not_create[0] != '\0')
|
||||
+ {
|
||||
+ FIXME("stubbing out\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+
|
||||
if (!token || !manager)
|
||||
return E_POINTER;
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,63 +0,0 @@
|
||||
From 75d383ab1c6b3c3872b895164c816d11de1d821c Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 9 Mar 2021 16:53:09 -0500
|
||||
Subject: [PATCH 13/88] winegstreamer: Activate source pad in push mode if it
|
||||
isn't activated in pull mode.
|
||||
|
||||
Since our source pad is not part of any element, gstreamer won't end up activating it
|
||||
directly through the state transition. Instead, if the downstream element doesn't
|
||||
activate the source pad into pull mode during the transition to the READY state,
|
||||
we activate our pad in push mode.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/wg_parser.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
|
||||
index b93b2c182ae..d7412409a27 100644
|
||||
--- a/dlls/winegstreamer/wg_parser.c
|
||||
+++ b/dlls/winegstreamer/wg_parser.c
|
||||
@@ -75,7 +75,7 @@ struct wg_parser
|
||||
pthread_mutex_t mutex;
|
||||
|
||||
pthread_cond_t init_cond;
|
||||
- bool no_more_pads, has_duration, error;
|
||||
+ bool no_more_pads, has_duration, error, pull_mode;
|
||||
|
||||
pthread_cond_t read_cond, read_done_cond;
|
||||
struct
|
||||
@@ -1528,9 +1528,12 @@ static gboolean src_activate_mode_cb(GstPad *pad, GstObject *parent, GstPadMode
|
||||
GST_DEBUG("%s source pad for parser %p in %s mode.",
|
||||
activate ? "Activating" : "Deactivating", parser, gst_pad_mode_get_name(mode));
|
||||
|
||||
+ parser->pull_mode = false;
|
||||
+
|
||||
switch (mode)
|
||||
{
|
||||
case GST_PAD_MODE_PULL:
|
||||
+ parser->pull_mode = activate;
|
||||
return TRUE;
|
||||
case GST_PAD_MODE_PUSH:
|
||||
return activate_push(pad, activate);
|
||||
@@ -1695,6 +1698,8 @@ static NTSTATUS wg_parser_connect(void *args)
|
||||
goto out;
|
||||
|
||||
gst_element_set_state(parser->container, GST_STATE_PAUSED);
|
||||
+ if (!parser->pull_mode)
|
||||
+ gst_pad_set_active(parser->my_src, 1);
|
||||
ret = gst_element_get_state(parser->container, NULL, NULL, -1);
|
||||
if (ret == GST_STATE_CHANGE_FAILURE)
|
||||
{
|
||||
@@ -1833,6 +1838,8 @@ static NTSTATUS wg_parser_disconnect(void *args)
|
||||
pthread_mutex_unlock(&parser->mutex);
|
||||
|
||||
gst_element_set_state(parser->container, GST_STATE_NULL);
|
||||
+ if (!parser->pull_mode)
|
||||
+ gst_pad_set_active(parser->my_src, 0);
|
||||
gst_pad_unlink(parser->my_src, parser->their_sink);
|
||||
gst_object_unref(parser->my_src);
|
||||
gst_object_unref(parser->their_sink);
|
||||
--
|
||||
2.34.1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user