Compare commits

...

16 Commits

Author SHA1 Message Date
Alistair Leslie-Hughes
7ab49f09a2 Release v6.0-rc6 2021-01-09 10:12:38 +11:00
Alistair Leslie-Hughes
a3d08de2b8 Rebase against 7d3186e029fb4cf417fab59483a37d8aece95b5d. 2021-01-09 09:59:05 +11:00
Alistair Leslie-Hughes
1c969cbbed Rebase against 9bc3a9f78bf5e6a09d4e9811f645def4a477f3d0. 2021-01-08 10:04:17 +11:00
Alistair Leslie-Hughes
0e7472e7a3 Added dsound-localder patchset 2021-01-07 13:22:54 +11:00
Alistair Leslie-Hughes
f3e785a3a8 Rebase against 4ac05afd39aff3030e3379ee06e32d6544ef5d62. 2021-01-07 13:15:41 +11:00
Zebediah Figura
dfddef9654 ntdll-NtAlertThreadByThreadId: Reset a thread's Win32 futex entry when waking it.
Avoid a race where two simultaneous calls to RtlWakeAddressSingle() wake the same address.
2021-01-05 19:53:40 -06:00
Alistair Leslie-Hughes
d87ec36ccf Rebase against 221fdb09b4c20da45e9834aa0cae27dcc75ea27b. 2021-01-05 09:57:51 +11:00
Alistair Leslie-Hughes
a3710ff21f Release v6.0-rc5 2021-01-03 10:25:03 +11:00
Alistair Leslie-Hughes
0e67af3d09 Updated dsound-EAX patchset
Enable this feature by default, to allow for more testing.
2021-01-01 13:48:55 +11:00
Zebediah Figura
8b1e0eec1d ntdll-NtAlertThreadByThreadId: Free the address wait entry on thread exit. 2020-12-28 12:36:15 -06:00
Zebediah Figura
b8ca0eae9f ntdll-NtAlertThreadByThreadId: Use a lock-free (list of) arrays to map thread IDs to addresses. 2020-12-28 12:22:10 -06:00
Alistair Leslie-Hughes
350eb136a5 Release v6.0-rc4 2020-12-27 10:59:24 +11:00
Alistair Leslie-Hughes
f40763d8a5 Updated dxdiag-new-dlls patchset 2020-12-27 10:03:16 +11:00
Alistair Leslie-Hughes
4462586c80 Updated mfplat-streaming-support patchset 2020-12-27 10:03:16 +11:00
Zebediah Figura
aae98229b0 libs-Unicode_Collation: Add another bug reference. 2020-12-25 14:02:42 -06:00
Zebediah Figura
7ad10427be server-File_Permissions: Clarify patch 0008 (DACL mapping) a bit.
This code should be effectively identical, but it makes the diff against
upstream a bit clearer.
2020-12-21 22:04:22 -06:00
67 changed files with 906 additions and 11615 deletions

View File

@@ -0,0 +1,25 @@
From 25450e6cf073bde4f26fec40c59224087017f332 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 1 Jan 2021 13:32:48 +1100
Subject: [PATCH] dsound: Enable EAX by default
---
dlls/dsound/dsound_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c
index e12c2208199..bda9a446a08 100644
--- a/dlls/dsound/dsound_main.c
+++ b/dlls/dsound/dsound_main.c
@@ -93,7 +93,7 @@ const WCHAR wine_vxd_drv[] = L"winemm.vxd";
/* All default settings, you most likely don't want to touch these, see wiki on UsefulRegistryKeys */
int ds_hel_buflen = 32768 * 2;
int ds_hq_buffers_max = 4;
-BOOL ds_eax_enabled = FALSE;
+BOOL ds_eax_enabled = TRUE;
static HINSTANCE instance;
#define IS_OPTION_TRUE(ch) \
--
2.29.2

View File

@@ -1,2 +1,3 @@
Fixes: Software support for Environmental Audio Extensions (EAX)
Fixes: [42886] Mushroom Wars - Has no sounds.
Depends: dsound-Fast_Mixer

View File

@@ -0,0 +1,122 @@
From 065142976ed5c7814830579e36612d3c515d90c3 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 5 Jan 2021 11:36:25 +1100
Subject: [PATCH] dsound: IDirectSoundBuffer8 GetStatus return
DSBSTATUS_LOCSOFTWARE for deferred buffers
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=21014
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/dsound/buffer.c | 2 +
dlls/dsound/tests/dsound8.c | 74 +++++++++++++++++++++++++++++++++++++
2 files changed, 76 insertions(+)
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
index 96391ebba03..6393656c9fa 100644
--- a/dlls/dsound/buffer.c
+++ b/dlls/dsound/buffer.c
@@ -421,6 +421,8 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetStatus(IDirectSoundBuffer8 *ifac
if (This->playflags & DSBPLAY_LOOPING)
*status |= DSBSTATUS_LOOPING;
}
+ if (This->dsbd.dwFlags & DSBCAPS_LOCDEFER)
+ *status |= DSBSTATUS_LOCSOFTWARE;
ReleaseSRWLockShared(&This->lock);
TRACE("status=%x\n", *status);
diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c
index 81c5710dbaf..85272dd9b55 100644
--- a/dlls/dsound/tests/dsound8.c
+++ b/dlls/dsound/tests/dsound8.c
@@ -1809,6 +1809,79 @@ static void test_effects(void)
ok(!ref, "Got outstanding refcount %u.\n", ref);
}
+static void test_AcquireResources(void)
+{
+ IDirectSound8 *dsound;
+ IDirectSoundBuffer *primary, *secondary;
+ DSBUFFERDESC bufdesc;
+ WAVEFORMATEX fmt;
+ HRESULT hr;
+
+ hr = DirectSoundCreate8(NULL, &dsound, NULL);
+ ok(hr == DS_OK || hr == DSERR_NODRIVER, "Got hr %#x.\n", hr);
+ if (FAILED(hr))
+ return;
+
+ hr = IDirectSound8_SetCooperativeLevel(dsound, get_hwnd(), DSSCL_PRIORITY);
+ ok(hr == DS_OK, "Got hr %#x.\n", hr);
+
+ bufdesc.dwSize = sizeof(bufdesc);
+ bufdesc.dwFlags = DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_PRIMARYBUFFER;
+ bufdesc.dwBufferBytes = 0;
+ bufdesc.dwReserved = 0;
+ bufdesc.lpwfxFormat = NULL;
+ bufdesc.guid3DAlgorithm = GUID_NULL;
+
+ hr = IDirectSound8_CreateSoundBuffer(dsound, &bufdesc, &primary, NULL);
+ ok(hr == S_OK, "CreateSoundBuffer failed: %08x\n", hr);
+ if(hr != S_OK) {
+ IDirectSound_Release(dsound);
+ return;
+ }
+
+ fmt.wFormatTag = WAVE_FORMAT_PCM;
+ fmt.nChannels = 2;
+ fmt.nSamplesPerSec = 48000;
+ fmt.wBitsPerSample = 16;
+ fmt.nBlockAlign = fmt.nChannels * fmt.wBitsPerSample / 8;
+ fmt.nAvgBytesPerSec = fmt.nBlockAlign * fmt.nSamplesPerSec;
+ fmt.cbSize = 0;
+
+ bufdesc.lpwfxFormat = &fmt;
+ bufdesc.dwBufferBytes = fmt.nSamplesPerSec * fmt.nBlockAlign / 10;
+ bufdesc.dwFlags = DSBCAPS_LOCDEFER | DSBCAPS_CTRLVOLUME;
+
+ /* see if we can create one more */
+ hr = IDirectSound8_CreateSoundBuffer(dsound, &bufdesc, &secondary, NULL);
+ ok(hr == S_OK, "CreateSoundBuffer gave wrong error: %08x\n", hr);
+ if(hr == S_OK) {
+ DWORD status;
+ IDirectSoundBuffer8 *buffer8;
+
+ hr = IDirectSoundBuffer_QueryInterface(secondary, &IID_IDirectSoundBuffer8, (void **)&buffer8);
+ ok(hr == S_OK, "got: %08x\n", hr);
+
+ status = 0xFFFF;
+ hr = IDirectSoundBuffer8_GetStatus(buffer8, &status);
+ ok(hr == S_OK, "got: %08x\n", hr);
+ todo_wine ok(status == 0, "got: %08x\n", status);
+
+ hr = IDirectSoundBuffer8_AcquireResources(buffer8, 0, 0, NULL);
+ ok(hr == S_OK, "got: %08x\n", hr);
+
+ status = 0xFFFF;
+ hr = IDirectSoundBuffer8_GetStatus(buffer8, &status);
+ ok(hr == S_OK, "got: %08x\n", hr);
+ ok(status == DSBSTATUS_LOCSOFTWARE, "got: %08x\n", status);
+
+ IDirectSoundBuffer8_Release(buffer8);
+ IDirectSoundBuffer_Release(secondary);
+ }
+
+ IDirectSoundBuffer_Release(primary);
+ IDirectSound_Release(dsound);
+}
+
START_TEST(dsound8)
{
DWORD cookie;
@@ -1822,6 +1895,7 @@ START_TEST(dsound8)
test_hw_buffers();
test_first_device();
test_primary_flags();
+ test_AcquireResources();
hr = CoRegisterClassObject(&testdmo_clsid, (IUnknown *)&testdmo_cf,
CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie);
--
2.29.2

View File

@@ -0,0 +1 @@
Fixes: [21014] dsound: IDirectSoundBuffer8 GetStatus return DSBSTATUS_LOCSOFTWARE for deferred buffers

View File

@@ -0,0 +1,45 @@
From a615211907b65642807cdad546a0eaf12e39f43c Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sun, 27 Dec 2020 09:57:46 +1100
Subject: [PATCH] dpmodemx: Add stub SPInit
---
dlls/dpmodemx/dpmodemx.spec | 2 +-
dlls/dpmodemx/dpmodemx_main.c | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/dpmodemx/dpmodemx.spec b/dlls/dpmodemx/dpmodemx.spec
index 14fb05053a8..e3beb3f8cc7 100644
--- a/dlls/dpmodemx/dpmodemx.spec
+++ b/dlls/dpmodemx/dpmodemx.spec
@@ -1 +1 @@
-@ stub SPInit
\ No newline at end of file
+@ stdcall SPInit(ptr)
\ No newline at end of file
diff --git a/dlls/dpmodemx/dpmodemx_main.c b/dlls/dpmodemx/dpmodemx_main.c
index f5d7a8340ca..5d322783b40 100644
--- a/dlls/dpmodemx/dpmodemx_main.c
+++ b/dlls/dpmodemx/dpmodemx_main.c
@@ -23,6 +23,8 @@
#include "winbase.h"
#include "wine/debug.h"
+#include "wine/dplaysp.h"
+
WINE_DEFAULT_DEBUG_CHANNEL(dpmodemx);
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
@@ -40,3 +42,9 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
return TRUE;
}
+
+HRESULT WINAPI SPInit( LPSPINITDATA lpspData )
+{
+ FIXME("Currently not implemented.\n");
+ return DPERR_UNAVAILABLE;
+}
--
2.29.2

View File

@@ -1,2 +1,3 @@
Fixes: [5163] Microsoft Office XP 2002 installer reports error 25003 (installation source corrupted), custom action 'CADpc' returns 1603
Fixes: [10767] Fix comparison of punctuation characters in lstrcmp
Fixes: [32490] Graphical issues in Inquisitor

View File

@@ -1,221 +0,0 @@
From ccab220bdd329dea69291405ebeba0f6c17439ad Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Fri, 4 Dec 2020 15:51:00 -0500
Subject: [PATCH] winegstreamer: Reformat type-setting functions to prevent the
need for a conditionally initialized variable.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/winegstreamer/audioconvert.c | 153 ++++++++++++++++--------------
1 file changed, 82 insertions(+), 71 deletions(-)
diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
index 82467b2f4e2..85f44dd8856 100644
--- a/dlls/winegstreamer/audioconvert.c
+++ b/dlls/winegstreamer/audioconvert.c
@@ -276,7 +276,9 @@ fail:
static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
{
+ GUID major_type, subtype;
GstCaps *input_caps;
+ DWORD unused;
HRESULT hr;
struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface);
@@ -286,34 +288,46 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
if (id != 0)
return MF_E_INVALIDSTREAMNUMBER;
- if (type)
+ if (!type)
{
- GUID major_type, subtype;
- DWORD unused;
-
- if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type)))
- return MF_E_INVALIDTYPE;
- if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)))
- return MF_E_INVALIDTYPE;
- if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &unused)))
- return MF_E_INVALIDTYPE;
- if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_NUM_CHANNELS, &unused)))
- return MF_E_INVALIDTYPE;
- if (IsEqualGUID(&subtype, &MFAudioFormat_PCM) && FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BITS_PER_SAMPLE, &unused)))
- return MF_E_INVALIDTYPE;
-
- if (!(IsEqualGUID(&major_type, &MFMediaType_Audio)))
- return MF_E_INVALIDTYPE;
-
- if (!IsEqualGUID(&subtype, &MFAudioFormat_PCM) && !IsEqualGUID(&subtype, &MFAudioFormat_Float))
- return MF_E_INVALIDTYPE;
-
- if (!(input_caps = caps_from_mf_media_type(type)))
- return MF_E_INVALIDTYPE;
-
- gst_caps_unref(input_caps);
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
+ return S_OK;
+
+ EnterCriticalSection(&converter->cs);
+
+ if (converter->input_type)
+ {
+ IMFMediaType_Release(converter->input_type);
+ converter->input_type = NULL;
+ }
+
+ LeaveCriticalSection(&converter->cs);
+
+ return S_OK;
}
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type)))
+ return MF_E_INVALIDTYPE;
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)))
+ return MF_E_INVALIDTYPE;
+ if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &unused)))
+ return MF_E_INVALIDTYPE;
+ if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_NUM_CHANNELS, &unused)))
+ return MF_E_INVALIDTYPE;
+ if (IsEqualGUID(&subtype, &MFAudioFormat_PCM) && FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BITS_PER_SAMPLE, &unused)))
+ return MF_E_INVALIDTYPE;
+
+ if (!(IsEqualGUID(&major_type, &MFMediaType_Audio)))
+ return MF_E_INVALIDTYPE;
+
+ if (!IsEqualGUID(&subtype, &MFAudioFormat_PCM) && !IsEqualGUID(&subtype, &MFAudioFormat_Float))
+ return MF_E_INVALIDTYPE;
+
+ if (!(input_caps = caps_from_mf_media_type(type)))
+ return MF_E_INVALIDTYPE;
+
+ gst_caps_unref(input_caps);
+
if (flags & MFT_SET_TYPE_TEST_ONLY)
return S_OK;
@@ -321,21 +335,13 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
hr = S_OK;
- if (type)
- {
- if (!converter->input_type)
- hr = MFCreateMediaType(&converter->input_type);
+ if (!converter->input_type)
+ hr = MFCreateMediaType(&converter->input_type);
- if (SUCCEEDED(hr))
- hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->input_type);
+ if (SUCCEEDED(hr))
+ hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->input_type);
- if (FAILED(hr))
- {
- IMFMediaType_Release(converter->input_type);
- converter->input_type = NULL;
- }
- }
- else if (converter->input_type)
+ if (FAILED(hr))
{
IMFMediaType_Release(converter->input_type);
converter->input_type = NULL;
@@ -362,33 +368,46 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
if (!converter->input_type)
return MF_E_TRANSFORM_TYPE_NOT_SET;
- if (type)
+ if (!type)
{
- /* validate the type */
-
- if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type)))
- return MF_E_INVALIDTYPE;
- if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)))
- return MF_E_INVALIDTYPE;
- if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_NUM_CHANNELS, &unused)))
- return MF_E_INVALIDTYPE;
- if (IsEqualGUID(&subtype, &MFAudioFormat_PCM) && FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BITS_PER_SAMPLE, &unused)))
- return MF_E_INVALIDTYPE;
- if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &unused)))
- return MF_E_INVALIDTYPE;
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
+ return S_OK;
- if (!(IsEqualGUID(&major_type, &MFMediaType_Audio)))
- return MF_E_INVALIDTYPE;
+ EnterCriticalSection(&converter->cs);
- if (!IsEqualGUID(&subtype, &MFAudioFormat_PCM) && !IsEqualGUID(&subtype, &MFAudioFormat_Float))
- return MF_E_INVALIDTYPE;
+ if (converter->output_type)
+ {
+ IMFMediaType_Release(converter->output_type);
+ converter->output_type = NULL;
+ }
- if (!(output_caps = caps_from_mf_media_type(type)))
- return MF_E_INVALIDTYPE;
+ LeaveCriticalSection(&converter->cs);
- gst_caps_unref(output_caps);
+ return S_OK;
}
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type)))
+ return MF_E_INVALIDTYPE;
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)))
+ return MF_E_INVALIDTYPE;
+ if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_NUM_CHANNELS, &unused)))
+ return MF_E_INVALIDTYPE;
+ if (IsEqualGUID(&subtype, &MFAudioFormat_PCM) && FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BITS_PER_SAMPLE, &unused)))
+ return MF_E_INVALIDTYPE;
+ if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &unused)))
+ return MF_E_INVALIDTYPE;
+
+ if (!(IsEqualGUID(&major_type, &MFMediaType_Audio)))
+ return MF_E_INVALIDTYPE;
+
+ if (!IsEqualGUID(&subtype, &MFAudioFormat_PCM) && !IsEqualGUID(&subtype, &MFAudioFormat_Float))
+ return MF_E_INVALIDTYPE;
+
+ if (!(output_caps = caps_from_mf_media_type(type)))
+ return MF_E_INVALIDTYPE;
+
+ gst_caps_unref(output_caps);
+
if (flags & MFT_SET_TYPE_TEST_ONLY)
return S_OK;
@@ -396,21 +415,13 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
hr = S_OK;
- if (type)
- {
- if (!converter->output_type)
- hr = MFCreateMediaType(&converter->output_type);
+ if (!converter->output_type)
+ hr = MFCreateMediaType(&converter->output_type);
- if (SUCCEEDED(hr))
- hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->output_type);
+ if (SUCCEEDED(hr))
+ hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->output_type);
- if (FAILED(hr))
- {
- IMFMediaType_Release(converter->output_type);
- converter->output_type = NULL;
- }
- }
- else if (converter->output_type)
+ if (FAILED(hr))
{
IMFMediaType_Release(converter->output_type);
converter->output_type = NULL;
--
2.29.2

View File

@@ -1,4 +1,4 @@
From 25ae21745349feace0055c0b962f75b234e1e99a Mon Sep 17 00:00:00 2001
From 0c493f7590ba2d7b90cf44c389378aacae8f6fe0 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Wed, 18 Nov 2020 14:31:00 -0600
Subject: [PATCH] winegstreamer: Implement ::Process(Input/Output) for audio
@@ -6,13 +6,13 @@ Subject: [PATCH] winegstreamer: Implement ::Process(Input/Output) for audio
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/winegstreamer/audioconvert.c | 188 ++++++++++++++++++++++++++++--
dlls/winegstreamer/audioconvert.c | 175 +++++++++++++++++++++++++++++-
dlls/winegstreamer/gst_private.h | 1 +
dlls/winegstreamer/mfplat.c | 69 +++++++++++
3 files changed, 250 insertions(+), 8 deletions(-)
dlls/winegstreamer/mfplat.c | 69 ++++++++++++
3 files changed, 239 insertions(+), 6 deletions(-)
diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
index 85f44dd8856..e16fc6f1a78 100644
index 7fb0dee99f6..631c57d6d55 100644
--- a/dlls/winegstreamer/audioconvert.c
+++ b/dlls/winegstreamer/audioconvert.c
@@ -40,6 +40,8 @@ struct audio_converter
@@ -20,7 +20,7 @@ index 85f44dd8856..e16fc6f1a78 100644
IMFMediaType *output_type;
CRITICAL_SECTION cs;
+ BOOL inflight;
+ GstElement *container, *appsrc, *appsink;
+ GstElement *container, *appsrc, *audioconvert, *resampler, *appsink;
};
static struct audio_converter *impl_audio_converter_from_IMFTransform(IMFTransform *iface)
@@ -32,46 +32,35 @@ index 85f44dd8856..e16fc6f1a78 100644
heap_free(transform);
}
@@ -295,6 +298,9 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
@@ -311,7 +314,8 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
if (!(input_caps = caps_from_mf_media_type(type)))
return MF_E_INVALIDTYPE;
EnterCriticalSection(&converter->cs);
- gst_caps_unref(input_caps);
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
+ gst_caps_unref(input_caps);
}
+ converter->inflight = FALSE;
+ gst_element_set_state(converter->container, GST_STATE_READY);
+
if (converter->input_type)
{
IMFMediaType_Release(converter->input_type);
@@ -326,14 +332,17 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
if (!(input_caps = caps_from_mf_media_type(type)))
return MF_E_INVALIDTYPE;
- gst_caps_unref(input_caps);
-
if (flags & MFT_SET_TYPE_TEST_ONLY)
+ {
+ gst_caps_unref(input_caps);
return S_OK;
+ }
@@ -320,6 +324,7 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
EnterCriticalSection(&converter->cs);
hr = S_OK;
+ converter->inflight = FALSE;
+ gst_element_set_state(converter->container, GST_STATE_READY);
if (!converter->input_type)
hr = MFCreateMediaType(&converter->input_type);
@@ -341,12 +350,18 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
if (SUCCEEDED(hr))
hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->input_type);
+ g_object_set(converter->appsrc, "caps", input_caps, NULL);
+ gst_caps_unref(input_caps);
+
if (FAILED(hr))
if (type)
{
IMFMediaType_Release(converter->input_type);
@@ -329,6 +334,9 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
if (SUCCEEDED(hr))
hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->input_type);
+ g_object_set(converter->appsrc, "caps", input_caps, NULL);
+ gst_caps_unref(input_caps);
+
if (FAILED(hr))
{
IMFMediaType_Release(converter->input_type);
@@ -341,6 +349,9 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
converter->input_type = NULL;
}
@@ -81,46 +70,35 @@ index 85f44dd8856..e16fc6f1a78 100644
LeaveCriticalSection(&converter->cs);
return hr;
@@ -375,6 +390,9 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
@@ -386,7 +397,8 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
if (!(output_caps = caps_from_mf_media_type(type)))
return MF_E_INVALIDTYPE;
EnterCriticalSection(&converter->cs);
- gst_caps_unref(output_caps);
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
+ gst_caps_unref(output_caps);
}
+ converter->inflight = FALSE;
+ gst_element_set_state(converter->container, GST_STATE_READY);
+
if (converter->output_type)
{
IMFMediaType_Release(converter->output_type);
@@ -406,14 +424,17 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
if (!(output_caps = caps_from_mf_media_type(type)))
return MF_E_INVALIDTYPE;
- gst_caps_unref(output_caps);
-
if (flags & MFT_SET_TYPE_TEST_ONLY)
+ {
+ gst_caps_unref(output_caps);
return S_OK;
+ }
@@ -395,6 +407,7 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
EnterCriticalSection(&converter->cs);
hr = S_OK;
+ converter->inflight = FALSE;
+ gst_element_set_state(converter->container, GST_STATE_READY);
if (!converter->output_type)
hr = MFCreateMediaType(&converter->output_type);
@@ -421,12 +442,18 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
if (SUCCEEDED(hr))
hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->output_type);
+ g_object_set(converter->appsink, "caps", output_caps, NULL);
+ gst_caps_unref(output_caps);
+
if (FAILED(hr))
if (type)
{
IMFMediaType_Release(converter->output_type);
@@ -404,6 +417,9 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
if (SUCCEEDED(hr))
hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->output_type);
+ g_object_set(converter->appsink, "caps", output_caps, NULL);
+ gst_caps_unref(output_caps);
+
if (FAILED(hr))
{
IMFMediaType_Release(converter->output_type);
@@ -416,6 +432,9 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
converter->output_type = NULL;
}
@@ -130,7 +108,7 @@ index 85f44dd8856..e16fc6f1a78 100644
LeaveCriticalSection(&converter->cs);
return hr;
@@ -538,17 +565,102 @@ static HRESULT WINAPI audio_converter_ProcessMessage(IMFTransform *iface, MFT_ME
@@ -479,17 +498,102 @@ static HRESULT WINAPI audio_converter_ProcessMessage(IMFTransform *iface, MFT_ME
static HRESULT WINAPI audio_converter_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags)
{
@@ -173,7 +151,7 @@ index 85f44dd8856..e16fc6f1a78 100644
+ gst_buffer_unref(gst_buffer);
+ if (ret != GST_FLOW_OK)
+ {
+ ERR("Couldn't push buffer ret, (%s)\n", gst_flow_get_name(ret));
+ ERR("Couldn't push buffer ret = %d (%s)\n", ret, gst_flow_get_name(ret));
+ LeaveCriticalSection(&converter->cs);
+ return E_FAIL;
+ }
@@ -237,15 +215,7 @@ index 85f44dd8856..e16fc6f1a78 100644
}
static const IMFTransformVtbl audio_converter_vtbl =
@@ -583,6 +695,7 @@ static const IMFTransformVtbl audio_converter_vtbl =
HRESULT audio_converter_create(REFIID riid, void **ret)
{
+ GstElement *audioconvert, *resampler;
struct audio_converter *object;
TRACE("%s %p\n", debugstr_guid(riid), ret);
@@ -596,6 +709,65 @@ HRESULT audio_converter_create(REFIID riid, void **ret)
@@ -537,6 +641,65 @@ HRESULT audio_converter_create(REFIID riid, void **ret)
InitializeCriticalSection(&object->cs);
object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": audio_converter_lock");
@@ -260,23 +230,23 @@ index 85f44dd8856..e16fc6f1a78 100644
+ }
+ gst_bin_add(GST_BIN(object->container), object->appsrc);
+
+ if (!(audioconvert = gst_element_factory_make("audioconvert", NULL)))
+ if (!(object->audioconvert = gst_element_factory_make("audioconvert", NULL)))
+ {
+ ERR("Failed to create audioconvert, are %u-bit Gstreamer \"base\" plugins installed?\n",
+ 8 * (int)sizeof(void *));
+ IMFTransform_Release(&object->IMFTransform_iface);
+ return E_FAIL;
+ }
+ gst_bin_add(GST_BIN(object->container), audioconvert);
+ gst_bin_add(GST_BIN(object->container), object->audioconvert);
+
+ if (!(resampler = gst_element_factory_make("audioresample", NULL)))
+ if (!(object->resampler = gst_element_factory_make("audioresample", NULL)))
+ {
+ ERR("Failed to create audioresample, are %u-bit Gstreamer \"base\" plugins installed?\n",
+ 8 * (int)sizeof(void *));
+ IMFTransform_Release(&object->IMFTransform_iface);
+ return E_FAIL;
+ }
+ gst_bin_add(GST_BIN(object->container), resampler);
+ gst_bin_add(GST_BIN(object->container), object->resampler);
+
+ if (!(object->appsink = gst_element_factory_make("appsink", NULL)))
+ {
@@ -287,21 +257,21 @@ index 85f44dd8856..e16fc6f1a78 100644
+ }
+ gst_bin_add(GST_BIN(object->container), object->appsink);
+
+ if (!gst_element_link(object->appsrc, audioconvert))
+ if (!gst_element_link(object->appsrc, object->audioconvert))
+ {
+ ERR("Failed to link appsrc to audioconvert\n");
+ IMFTransform_Release(&object->IMFTransform_iface);
+ return E_FAIL;
+ }
+
+ if (!gst_element_link(audioconvert, resampler))
+ if (!gst_element_link(object->audioconvert, object->resampler))
+ {
+ ERR("Failed to link audioconvert to resampler\n");
+ IMFTransform_Release(&object->IMFTransform_iface);
+ return E_FAIL;
+ }
+
+ if (!gst_element_link(resampler, object->appsink))
+ if (!gst_element_link(object->resampler, object->appsink))
+ {
+ ERR("Failed to link resampler to appsink\n");
+ IMFTransform_Release(&object->IMFTransform_iface);
@@ -324,7 +294,7 @@ index 9518f721504..14b6a011ac2 100644
HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) DECLSPEC_HIDDEN;
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
index f300988fc5c..b2b5b247dac 100644
index f300988fc5c..883084b2d89 100644
--- a/dlls/winegstreamer/mfplat.c
+++ b/dlls/winegstreamer/mfplat.c
@@ -865,3 +865,72 @@ done:
@@ -332,7 +302,7 @@ index f300988fc5c..b2b5b247dac 100644
return out;
}
+
+GstBuffer *gst_buffer_from_mf_sample(IMFSample *mf_sample)
+GstBuffer* gst_buffer_from_mf_sample(IMFSample *mf_sample)
+{
+ GstBuffer *out = gst_buffer_new();
+ IMFMediaBuffer *mf_buffer = NULL;
@@ -369,7 +339,7 @@ index f300988fc5c..b2b5b247dac 100644
+ memory = gst_allocator_alloc(NULL, buffer_size, NULL);
+ gst_memory_resize(memory, 0, buffer_size);
+
+ if (!gst_memory_map(memory, &map_info, GST_MAP_WRITE))
+ if (!(gst_memory_map(memory, &map_info, GST_MAP_WRITE)))
+ {
+ hr = E_FAIL;
+ goto fail;

View File

@@ -1,4 +1,4 @@
From 3b76c2693af28c4aded7dbf4955baac91578f726 Mon Sep 17 00:00:00 2001
From 13e0d5671caaeae69bde747e547a5bd4524dd2ff Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Wed, 18 Nov 2020 14:32:27 -0600
Subject: [PATCH] winegstreamer: Implement ::Get(Input/Output)StreamInfo for
@@ -6,14 +6,14 @@ Subject: [PATCH] winegstreamer: Implement ::Get(Input/Output)StreamInfo for
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/winegstreamer/audioconvert.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
dlls/winegstreamer/audioconvert.c | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
index e16fc6f1a78..a95fc5506e7 100644
index 631c57d6d55..d204d9582ba 100644
--- a/dlls/winegstreamer/audioconvert.c
+++ b/dlls/winegstreamer/audioconvert.c
@@ -123,16 +123,34 @@ static HRESULT WINAPI audio_converter_GetStreamIDs(IMFTransform *iface, DWORD in
@@ -123,16 +123,31 @@ static HRESULT WINAPI audio_converter_GetStreamIDs(IMFTransform *iface, DWORD in
static HRESULT WINAPI audio_converter_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info)
{
@@ -28,8 +28,6 @@ index e16fc6f1a78..a95fc5506e7 100644
+ info->cbMaxLookahead = 0;
+ info->cbAlignment = 0;
+ info->hnsMaxLatency = 0;
+ /* TODO: this can be calculated using MFCalculateImageSize */
+ info->cbSize = 0;
+
+ return S_OK;
}
@@ -43,10 +41,9 @@ index e16fc6f1a78..a95fc5506e7 100644
+ if (id != 0)
+ return MF_E_INVALIDSTREAMNUMBER;
+
+ info->dwFlags = MFT_OUTPUT_STREAM_PROVIDES_SAMPLES | MFT_OUTPUT_STREAM_WHOLE_SAMPLES;
+ info->cbAlignment = 0;
+ /* TODO: this can be calculated using MFCalculateImageSize */
+ info->dwFlags = MFT_OUTPUT_STREAM_PROVIDES_SAMPLES;
+ info->cbSize = 0;
+ info->cbAlignment = 0;
+
+ return S_OK;
}

View File

@@ -1,7 +1,7 @@
From 5a5f948685d65455b540eb4fb0127a72ca6bc00c Mon Sep 17 00:00:00 2001
From 91a772eb1cb4ec9e86b4ab007743a99a8bd75265 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Wed, 18 Nov 2020 14:34:56 -0600
Subject: [PATCH] winegstreamer: Semi-stub Get*Attributes functions for audio
Subject: [PATCH] winegstreamer: Implement Get*Attributes functions for audio
converter transform.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
@@ -10,7 +10,7 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
index a95fc5506e7..2a5f87fec94 100644
index d204d9582ba..556aba44fc9 100644
--- a/dlls/winegstreamer/audioconvert.c
+++ b/dlls/winegstreamer/audioconvert.c
@@ -37,6 +37,8 @@ struct audio_converter
@@ -33,7 +33,7 @@ index a95fc5506e7..2a5f87fec94 100644
gst_object_unref(transform->container);
heap_free(transform);
}
@@ -155,9 +161,14 @@ static HRESULT WINAPI audio_converter_GetOutputStreamInfo(IMFTransform *iface, D
@@ -152,9 +158,14 @@ static HRESULT WINAPI audio_converter_GetOutputStreamInfo(IMFTransform *iface, D
static HRESULT WINAPI audio_converter_GetAttributes(IMFTransform *iface, IMFAttributes **attributes)
{
@@ -50,7 +50,7 @@ index a95fc5506e7..2a5f87fec94 100644
}
static HRESULT WINAPI audio_converter_GetInputStreamAttributes(IMFTransform *iface, DWORD id,
@@ -171,9 +182,14 @@ static HRESULT WINAPI audio_converter_GetInputStreamAttributes(IMFTransform *ifa
@@ -168,9 +179,14 @@ static HRESULT WINAPI audio_converter_GetInputStreamAttributes(IMFTransform *ifa
static HRESULT WINAPI audio_converter_GetOutputStreamAttributes(IMFTransform *iface, DWORD id,
IMFAttributes **attributes)
{
@@ -67,15 +67,15 @@ index a95fc5506e7..2a5f87fec94 100644
}
static HRESULT WINAPI audio_converter_DeleteInputStream(IMFTransform *iface, DWORD id)
@@ -715,6 +731,7 @@ HRESULT audio_converter_create(REFIID riid, void **ret)
@@ -644,6 +660,7 @@ static const IMFTransformVtbl audio_converter_vtbl =
HRESULT audio_converter_create(REFIID riid, void **ret)
{
GstElement *audioconvert, *resampler;
struct audio_converter *object;
+ HRESULT hr;
TRACE("%s %p\n", debugstr_guid(riid), ret);
@@ -727,6 +744,18 @@ HRESULT audio_converter_create(REFIID riid, void **ret)
@@ -656,6 +673,18 @@ HRESULT audio_converter_create(REFIID riid, void **ret)
InitializeCriticalSection(&object->cs);
object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": audio_converter_lock");

View File

@@ -1,19 +1,18 @@
From 9ea8d5720eb283af1bcf6d69e9804415d56804d1 Mon Sep 17 00:00:00 2001
From b5316e74275511a63372473cb6bb10b8f2f8d2e1 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Tue, 1 Dec 2020 13:16:27 -0500
Subject: [PATCH] winegstreamer: Introduce color conversion transform.
Serves as a wrapper of videoconvert, and exposes the CColorConverterDMO MFT interface.
Serves as a wrapper of videoconvert, and roughly fills the roll of Windows' CColorConverterDMO.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/winegstreamer/Makefile.in | 1 +
dlls/winegstreamer/colorconvert.c | 302 +++++++++++++++++++
dlls/winegstreamer/gst_private.h | 1 +
dlls/winegstreamer/mfplat.c | 2 +
dlls/winegstreamer/mfplat.c | 3 +
dlls/winegstreamer/winegstreamer_classes.idl | 6 +
include/wmcodecdsp.idl | 5 +
6 files changed, 317 insertions(+)
5 files changed, 313 insertions(+)
create mode 100644 dlls/winegstreamer/colorconvert.c
diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in
@@ -348,22 +347,23 @@ index 14b6a011ac2..075e0ce1f0f 100644
#endif /* __GST_PRIVATE_INCLUDED__ */
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
index b2b5b247dac..5ec408eea34 100644
index 883084b2d89..288b79997cd 100644
--- a/dlls/winegstreamer/mfplat.c
+++ b/dlls/winegstreamer/mfplat.c
@@ -26,6 +26,7 @@
#include "gst_private.h"
#include "mfapi.h"
#include "mfidl.h"
+#include "wmcodecdsp.h"
@@ -407,6 +407,8 @@ static const GUID CLSID_GStreamerByteStreamHandler = {0x317df618, 0x5e5a, 0x468a
#include "wine/debug.h"
#include "wine/heap.h"
@@ -417,6 +418,7 @@ class_objects[] =
static const GUID CLSID_WINEAudioConverter = {0x6a170414,0xaad9,0x4693,{0xb8,0x06,0x3a,0x0c,0x47,0xc5,0x70,0xd6}};
+static GUID CLSID_WINEColorConverter = {0x2be8b27f,0xcd60,0x4b8a,{0x95,0xae,0xd1,0x74,0xcc,0x5c,0xba,0xa7}};
+
static const struct class_object
{
const GUID *clsid;
@@ -417,6 +419,7 @@ class_objects[] =
{ &CLSID_VideoProcessorMFT, &video_processor_create },
{ &CLSID_GStreamerByteStreamHandler, &winegstreamer_stream_handler_create },
{ &CLSID_WINEAudioConverter, &audio_converter_create },
+ { &CLSID_CColorConvertDMO, &color_converter_create },
+ { &CLSID_WINEColorConverter, &color_converter_create },
};
HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj)
@@ -381,19 +381,6 @@ index cf1fc69f38a..47c10a09cf0 100644
+ uuid(2be8b27f-cd60-4b8a-95ae-d174cc5cbaa7)
+]
+coclass WINEColorConverter { }
diff --git a/include/wmcodecdsp.idl b/include/wmcodecdsp.idl
index 61381bee6d4..87305422332 100644
--- a/include/wmcodecdsp.idl
+++ b/include/wmcodecdsp.idl
@@ -30,3 +30,8 @@ coclass CMP3DecMediaObject {}
uuid(f447b69e-1884-4a7e-8055-346f74d6edb3)
]
coclass CResamplerMediaObject {}
+
+[
+ uuid(98230571-0087-4204-b020-3282538e57d3)
+]
+coclass CColorConvertDMO {}
--
2.29.2

View File

@@ -1,4 +1,4 @@
From 72a7be6182b55b44a9448d25f285a94dba36dc05 Mon Sep 17 00:00:00 2001
From 18799e737ff065a62ea1c92c9a684940053d9dfb Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Thu, 3 Dec 2020 12:45:48 -0500
Subject: [PATCH] winegstreamer: Register the color conversion transform.
@@ -9,10 +9,10 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
index 5ec408eea34..bab2ccce64c 100644
index 288b79997cd..1b19c43d991 100644
--- a/dlls/winegstreamer/mfplat.c
+++ b/dlls/winegstreamer/mfplat.c
@@ -454,6 +454,26 @@ static const GUID *audio_converter_supported_types[] =
@@ -455,6 +455,26 @@ static const GUID *audio_converter_supported_types[] =
&MFAudioFormat_Float,
};
@@ -39,12 +39,12 @@ index 5ec408eea34..bab2ccce64c 100644
static const struct mft
{
const GUID *clsid;
@@ -481,13 +501,25 @@ mfts[] =
@@ -482,13 +502,25 @@ mfts[] =
audio_converter_supported_types,
NULL
},
+ {
+ &CLSID_CColorConvertDMO,
+ &CLSID_WINEColorConverter,
+ &MFT_CATEGORY_VIDEO_EFFECT,
+ color_converterW,
+ MFT_ENUM_FLAG_SYNCMFT,

View File

@@ -1,4 +1,4 @@
From f23000bf69fd7eb691eb3768f87ed08188f3c8ba Mon Sep 17 00:00:00 2001
From 15b54cf08d296483e6d4c211eeae50db62f70804 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Thu, 3 Dec 2020 12:55:14 -0500
Subject: [PATCH] winegstreamer: Implement ::GetInputAvailableType for color

View File

@@ -1,4 +1,4 @@
From dcc33149b4730c603dfd1c66e2d6ccd03d5e89a9 Mon Sep 17 00:00:00 2001
From 096a5070ac3ce917e6c8ae010e8e80c8ffbde3c4 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Thu, 3 Dec 2020 14:34:07 -0500
Subject: [PATCH] winegstreamer: Implement ::SetInputType for color conversion
@@ -6,11 +6,11 @@ Subject: [PATCH] winegstreamer: Implement ::SetInputType for color conversion
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/winegstreamer/colorconvert.c | 82 ++++++++++++++++++++++++++++++-
1 file changed, 80 insertions(+), 2 deletions(-)
dlls/winegstreamer/colorconvert.c | 76 ++++++++++++++++++++++++++++++-
1 file changed, 74 insertions(+), 2 deletions(-)
diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c
index 9a1d2880234..a7660453766 100644
index 9a1d2880234..5dd48188147 100644
--- a/dlls/winegstreamer/colorconvert.c
+++ b/dlls/winegstreamer/colorconvert.c
@@ -52,6 +52,8 @@ struct color_converter
@@ -31,12 +31,11 @@ index 9a1d2880234..a7660453766 100644
heap_free(transform);
}
@@ -223,9 +227,80 @@ static HRESULT WINAPI color_converter_GetOutputAvailableType(IMFTransform *iface
@@ -223,9 +227,74 @@ static HRESULT WINAPI color_converter_GetOutputAvailableType(IMFTransform *iface
static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
{
- FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags);
+ GUID major_type, subtype;
+ GstCaps *input_caps;
+ unsigned int i;
+ HRESULT hr;
@@ -49,46 +48,33 @@ index 9a1d2880234..a7660453766 100644
+ if (id != 0)
+ return MF_E_INVALIDSTREAMNUMBER;
+
+ if (!type)
+ if (type)
+ {
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
+ return S_OK;
+ GUID major_type, subtype;
+
+ EnterCriticalSection(&converter->cs);
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type)))
+ return MF_E_INVALIDTYPE;
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)))
+ return MF_E_INVALIDTYPE;
+
+ if (converter->input_type)
+ if (!(IsEqualGUID(&major_type, &MFMediaType_Video)))
+ return MF_E_INVALIDTYPE;
+
+ for (i = 0; i < ARRAY_SIZE(raw_types); i++)
+ {
+ IMFMediaType_Release(converter->input_type);
+ converter->input_type = NULL;
+ if (IsEqualGUID(&subtype, raw_types[i]))
+ break;
+ }
+
+ LeaveCriticalSection(&converter->cs);
+ if (i == ARRAY_SIZE(raw_types))
+ return MF_E_INVALIDTYPE;
+
+ return S_OK;
+ if (!(input_caps = caps_from_mf_media_type(type)))
+ return MF_E_INVALIDTYPE;
+
+ gst_caps_unref(input_caps);
+ }
+
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type)))
+ return MF_E_INVALIDTYPE;
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)))
+ return MF_E_INVALIDTYPE;
+
+ if (!(IsEqualGUID(&major_type, &MFMediaType_Video)))
+ return MF_E_INVALIDTYPE;
+
+ for (i = 0; i < ARRAY_SIZE(raw_types); i++)
+ {
+ if (IsEqualGUID(&subtype, raw_types[i]))
+ break;
+ }
+
+ if (i == ARRAY_SIZE(raw_types))
+ return MF_E_INVALIDTYPE;
+
+ if (!(input_caps = caps_from_mf_media_type(type)))
+ return MF_E_INVALIDTYPE;
+
+ gst_caps_unref(input_caps);
+
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
+ return S_OK;
+
@@ -96,13 +82,21 @@ index 9a1d2880234..a7660453766 100644
+
+ hr = S_OK;
+
+ if (!converter->input_type)
+ hr = MFCreateMediaType(&converter->input_type);
+ if (type)
+ {
+ if (!converter->input_type)
+ hr = MFCreateMediaType(&converter->input_type);
+
+ if (SUCCEEDED(hr))
+ hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->input_type);
+ if (SUCCEEDED(hr))
+ hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->input_type);
+
+ if (FAILED(hr))
+ if (FAILED(hr))
+ {
+ IMFMediaType_Release(converter->input_type);
+ converter->input_type = NULL;
+ }
+ }
+ else
+ {
+ IMFMediaType_Release(converter->input_type);
+ converter->input_type = NULL;
@@ -114,7 +108,7 @@ index 9a1d2880234..a7660453766 100644
}
static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
@@ -341,6 +416,9 @@ HRESULT color_converter_create(REFIID riid, void **ret)
@@ -341,6 +410,9 @@ HRESULT color_converter_create(REFIID riid, void **ret)
object->IMFTransform_iface.lpVtbl = &color_converter_vtbl;
object->refcount = 1;

View File

@@ -1,4 +1,4 @@
From 4971b983809a02ce8b61d4098703532deb8d3f29 Mon Sep 17 00:00:00 2001
From 64cfb2a80d7ebc22b12d8b6c1e41cf7a74e15d88 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Thu, 3 Dec 2020 14:45:32 -0500
Subject: [PATCH] winegstreamer: Implement ::GetOutputAvailableType for color
@@ -6,14 +6,27 @@ Subject: [PATCH] winegstreamer: Implement ::GetOutputAvailableType for color
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/winegstreamer/colorconvert.c | 38 +++++++++++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
dlls/winegstreamer/colorconvert.c | 48 +++++++++++++++++++++++++++++--
1 file changed, 46 insertions(+), 2 deletions(-)
diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c
index a7660453766..a7206408603 100644
index 5dd48188147..b80232e195b 100644
--- a/dlls/winegstreamer/colorconvert.c
+++ b/dlls/winegstreamer/colorconvert.c
@@ -220,9 +220,43 @@ static HRESULT WINAPI color_converter_GetInputAvailableType(IMFTransform *iface,
@@ -217,12 +217,56 @@ static HRESULT WINAPI color_converter_GetInputAvailableType(IMFTransform *iface,
return S_OK;
}
+static void copy_attr(IMFMediaType *target, IMFMediaType *source, const GUID *key)
+{
+ PROPVARIANT val;
+
+ if (SUCCEEDED(IMFAttributes_GetItem((IMFAttributes *)source, key, &val)))
+ {
+ IMFAttributes_SetItem((IMFAttributes* )target, key, &val);
+ }
+}
+
static HRESULT WINAPI color_converter_GetOutputAvailableType(IMFTransform *iface, DWORD id, DWORD index,
IMFMediaType **type)
{

View File

@@ -1,4 +1,4 @@
From 95f62008671a1cde75abce167806026ec75be681 Mon Sep 17 00:00:00 2001
From f1714a949175290e9f01bd32fde1dacecfed7946 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Thu, 3 Dec 2020 14:55:41 -0500
Subject: [PATCH] winegstreamer: Implement ::SetOutputType for color conversion
@@ -6,11 +6,11 @@ Subject: [PATCH] winegstreamer: Implement ::SetOutputType for color conversion
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/winegstreamer/colorconvert.c | 76 ++++++++++++++++++++++++++++++-
1 file changed, 74 insertions(+), 2 deletions(-)
dlls/winegstreamer/colorconvert.c | 70 ++++++++++++++++++++++++++++++-
1 file changed, 68 insertions(+), 2 deletions(-)
diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c
index a7206408603..c2665cbdacb 100644
index b80232e195b..e7e84690738 100644
--- a/dlls/winegstreamer/colorconvert.c
+++ b/dlls/winegstreamer/colorconvert.c
@@ -53,6 +53,7 @@ struct color_converter
@@ -21,12 +21,11 @@ index a7206408603..c2665cbdacb 100644
CRITICAL_SECTION cs;
};
@@ -339,9 +340,80 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id
@@ -343,9 +344,74 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id
static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
{
- FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags);
+ GUID major_type, subtype;
+ GstCaps *output_caps;
+ unsigned int i;
+ HRESULT hr;
@@ -39,46 +38,33 @@ index a7206408603..c2665cbdacb 100644
+ if (id != 0)
+ return MF_E_INVALIDSTREAMNUMBER;
+
+ if (!type)
+ if (type)
+ {
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
+ return S_OK;
+ GUID major_type, subtype;
+
+ EnterCriticalSection(&converter->cs);
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type)))
+ return MF_E_INVALIDTYPE;
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)))
+ return MF_E_INVALIDTYPE;
+
+ if (converter->output_type)
+ if (!(IsEqualGUID(&major_type, &MFMediaType_Video)))
+ return MF_E_INVALIDTYPE;
+
+ for (i = 0; i < ARRAY_SIZE(raw_types); i++)
+ {
+ IMFMediaType_Release(converter->output_type);
+ converter->output_type = NULL;
+ if (IsEqualGUID(&subtype, raw_types[i]))
+ break;
+ }
+
+ LeaveCriticalSection(&converter->cs);
+ if (i == ARRAY_SIZE(raw_types))
+ return MF_E_INVALIDTYPE;
+
+ return S_OK;
+ if (!(output_caps = caps_from_mf_media_type(type)))
+ return MF_E_INVALIDTYPE;
+
+ gst_caps_unref(output_caps);
+ }
+
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type)))
+ return MF_E_INVALIDTYPE;
+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)))
+ return MF_E_INVALIDTYPE;
+
+ if (!(IsEqualGUID(&major_type, &MFMediaType_Video)))
+ return MF_E_INVALIDTYPE;
+
+ for (i = 0; i < ARRAY_SIZE(raw_types); i++)
+ {
+ if (IsEqualGUID(&subtype, raw_types[i]))
+ break;
+ }
+
+ if (i == ARRAY_SIZE(raw_types))
+ return MF_E_INVALIDTYPE;
+
+ if (!(output_caps = caps_from_mf_media_type(type)))
+ return MF_E_INVALIDTYPE;
+
+ gst_caps_unref(output_caps);
+
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
+ return S_OK;
+
@@ -86,13 +72,21 @@ index a7206408603..c2665cbdacb 100644
+
+ hr = S_OK;
+
+ if (!converter->output_type)
+ hr = MFCreateMediaType(&converter->output_type);
+ if (type)
+ {
+ if (!converter->output_type)
+ hr = MFCreateMediaType(&converter->output_type);
+
+ if (SUCCEEDED(hr))
+ hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->output_type);
+ if (SUCCEEDED(hr))
+ hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->output_type);
+
+ if (FAILED(hr))
+ if (FAILED(hr))
+ {
+ IMFMediaType_Release(converter->output_type);
+ converter->output_type = NULL;
+ }
+ }
+ else
+ {
+ IMFMediaType_Release(converter->output_type);
+ converter->output_type = NULL;

View File

@@ -1,4 +1,4 @@
From 126c7b1289899ea86527acb20f3bfc296a4dde2f Mon Sep 17 00:00:00 2001
From c94cfbf0ec1c10452c2cf1496f32eeefe5794cea Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Thu, 3 Dec 2020 15:22:20 -0500
Subject: [PATCH] winegstreamer: Implement ::Process(Input/Output) for color
@@ -6,11 +6,11 @@ Subject: [PATCH] winegstreamer: Implement ::Process(Input/Output) for color
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/winegstreamer/colorconvert.c | 172 ++++++++++++++++++++++++++++--
1 file changed, 165 insertions(+), 7 deletions(-)
dlls/winegstreamer/colorconvert.c | 159 +++++++++++++++++++++++++++++-
1 file changed, 154 insertions(+), 5 deletions(-)
diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c
index c2665cbdacb..4aa563ab0d9 100644
index e7e84690738..b77f3358c52 100644
--- a/dlls/winegstreamer/colorconvert.c
+++ b/dlls/winegstreamer/colorconvert.c
@@ -55,6 +55,8 @@ struct color_converter
@@ -18,7 +18,7 @@ index c2665cbdacb..4aa563ab0d9 100644
IMFMediaType *output_type;
CRITICAL_SECTION cs;
+ BOOL inflight;
+ GstElement *container, *appsrc, *appsink;
+ GstElement *container, *appsrc, *videoconvert, *appsink;
};
static struct color_converter *impl_color_converter_from_IMFTransform(IMFTransform *iface)
@@ -30,46 +30,35 @@ index c2665cbdacb..4aa563ab0d9 100644
heap_free(transform);
}
@@ -281,6 +284,9 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id
@@ -307,7 +310,8 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id
if (!(input_caps = caps_from_mf_media_type(type)))
return MF_E_INVALIDTYPE;
EnterCriticalSection(&converter->cs);
- gst_caps_unref(input_caps);
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
+ gst_caps_unref(input_caps);
}
+ converter->inflight = FALSE;
+ gst_element_set_state(converter->container, GST_STATE_READY);
+
if (converter->input_type)
{
IMFMediaType_Release(converter->input_type);
@@ -312,14 +318,17 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id
if (!(input_caps = caps_from_mf_media_type(type)))
return MF_E_INVALIDTYPE;
- gst_caps_unref(input_caps);
-
if (flags & MFT_SET_TYPE_TEST_ONLY)
+ {
+ gst_caps_unref(input_caps);
return S_OK;
+ }
@@ -316,6 +320,7 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id
EnterCriticalSection(&converter->cs);
hr = S_OK;
+ converter->inflight = FALSE;
+ gst_element_set_state(converter->container, GST_STATE_READY);
if (!converter->input_type)
hr = MFCreateMediaType(&converter->input_type);
@@ -327,12 +336,18 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id
if (SUCCEEDED(hr))
hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->input_type);
+ g_object_set(converter->appsrc, "caps", input_caps, NULL);
+ gst_caps_unref(input_caps);
+
if (FAILED(hr))
if (type)
{
IMFMediaType_Release(converter->input_type);
@@ -325,6 +330,9 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id
if (SUCCEEDED(hr))
hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->input_type);
+ g_object_set(converter->appsrc, "caps", input_caps, NULL);
+ gst_caps_unref(input_caps);
+
if (FAILED(hr))
{
IMFMediaType_Release(converter->input_type);
@@ -337,6 +345,9 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id
converter->input_type = NULL;
}
@@ -79,46 +68,35 @@ index c2665cbdacb..4aa563ab0d9 100644
LeaveCriticalSection(&converter->cs);
return hr;
@@ -359,6 +374,9 @@ static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD i
@@ -379,7 +390,8 @@ static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD i
if (!(output_caps = caps_from_mf_media_type(type)))
return MF_E_INVALIDTYPE;
EnterCriticalSection(&converter->cs);
- gst_caps_unref(output_caps);
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
+ gst_caps_unref(output_caps);
}
+ converter->inflight = FALSE;
+ gst_element_set_state(converter->container, GST_STATE_READY);
+
if (converter->output_type)
{
IMFMediaType_Release(converter->output_type);
@@ -390,14 +408,17 @@ static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD i
if (!(output_caps = caps_from_mf_media_type(type)))
return MF_E_INVALIDTYPE;
- gst_caps_unref(output_caps);
-
if (flags & MFT_SET_TYPE_TEST_ONLY)
+ {
+ gst_caps_unref(output_caps);
return S_OK;
+ }
@@ -388,6 +400,7 @@ static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD i
EnterCriticalSection(&converter->cs);
hr = S_OK;
+ converter->inflight = FALSE;
+ gst_element_set_state(converter->container, GST_STATE_READY);
if (!converter->output_type)
hr = MFCreateMediaType(&converter->output_type);
@@ -405,12 +426,18 @@ static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD i
if (SUCCEEDED(hr))
hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->output_type);
+ g_object_set(converter->appsink, "caps", output_caps, NULL);
+ gst_caps_unref(output_caps);
+
if (FAILED(hr))
if (type)
{
IMFMediaType_Release(converter->output_type);
@@ -397,6 +410,9 @@ static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD i
if (SUCCEEDED(hr))
hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->output_type);
+ g_object_set(converter->appsink, "caps", output_caps, NULL);
+ gst_caps_unref(output_caps);
+
if (FAILED(hr))
{
IMFMediaType_Release(converter->output_type);
@@ -409,6 +425,9 @@ static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD i
converter->output_type = NULL;
}
@@ -128,7 +106,7 @@ index c2665cbdacb..4aa563ab0d9 100644
LeaveCriticalSection(&converter->cs);
return hr;
@@ -467,15 +494,102 @@ static HRESULT WINAPI color_converter_ProcessMessage(IMFTransform *iface, MFT_ME
@@ -465,15 +484,102 @@ static HRESULT WINAPI color_converter_ProcessMessage(IMFTransform *iface, MFT_ME
static HRESULT WINAPI color_converter_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags)
{
@@ -171,7 +149,7 @@ index c2665cbdacb..4aa563ab0d9 100644
+ gst_buffer_unref(gst_buffer);
+ if (ret != GST_FLOW_OK)
+ {
+ ERR("Couldn't push buffer, (%s)\n", gst_flow_get_name(ret));
+ ERR("Couldn't push buffer ret = %d (%s)\n", ret, gst_flow_get_name(ret));
+ LeaveCriticalSection(&converter->cs);
+ return E_FAIL;
+ }
@@ -220,7 +198,7 @@ index c2665cbdacb..4aa563ab0d9 100644
+
+ g_signal_emit_by_name(converter->appsink, "pull-sample", &sample);
+
+ converter->inflight = FALSE;
+ converter->inflight = FALSE;
+
+ samples[0].pSample = mf_sample_from_gst_buffer(gst_sample_get_buffer(sample));
+ gst_sample_unref(sample);
@@ -234,15 +212,7 @@ index c2665cbdacb..4aa563ab0d9 100644
return E_NOTIMPL;
}
@@ -513,6 +627,7 @@ static const IMFTransformVtbl color_converter_vtbl =
HRESULT color_converter_create(REFIID riid, void **ret)
{
struct color_converter *object;
+ GstElement *videoconvert;
TRACE("%s %p\n", debugstr_guid(riid), ret);
@@ -525,6 +640,49 @@ HRESULT color_converter_create(REFIID riid, void **ret)
@@ -523,6 +629,49 @@ HRESULT color_converter_create(REFIID riid, void **ret)
InitializeCriticalSection(&object->cs);
object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": color_converter_lock");
@@ -257,14 +227,14 @@ index c2665cbdacb..4aa563ab0d9 100644
+ }
+ gst_bin_add(GST_BIN(object->container), object->appsrc);
+
+ if (!(videoconvert = gst_element_factory_make("videoconvert", NULL)))
+ if (!(object->videoconvert = gst_element_factory_make("videoconvert", NULL)))
+ {
+ ERR("Failed to create videoconvert, are %u-bit Gstreamer \"base\" plugins installed?\n",
+ 8 * (int)sizeof(void *));
+ IMFTransform_Release(&object->IMFTransform_iface);
+ return E_FAIL;
+ }
+ gst_bin_add(GST_BIN(object->container), videoconvert);
+ gst_bin_add(GST_BIN(object->container), object->videoconvert);
+
+ if (!(object->appsink = gst_element_factory_make("appsink", NULL)))
+ {
@@ -275,14 +245,14 @@ index c2665cbdacb..4aa563ab0d9 100644
+ }
+ gst_bin_add(GST_BIN(object->container), object->appsink);
+
+ if (!gst_element_link(object->appsrc, videoconvert))
+ if (!gst_element_link(object->appsrc, object->videoconvert))
+ {
+ ERR("Failed to link appsrc to videoconvert\n");
+ IMFTransform_Release(&object->IMFTransform_iface);
+ return E_FAIL;
+ }
+
+ if (!gst_element_link(videoconvert, object->appsink))
+ if (!gst_element_link(object->videoconvert, object->appsink))
+ {
+ ERR("Failed to link videoconvert to appsink\n");
+ IMFTransform_Release(&object->IMFTransform_iface);

View File

@@ -1,4 +1,4 @@
From b1eba110c4c5d4d6797f23c54bb339056b03dbc9 Mon Sep 17 00:00:00 2001
From d68df1b4131caa500cea5c4241be3c55b2728d4c Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Thu, 3 Dec 2020 16:02:20 -0500
Subject: [PATCH] winegstreamer: Implement ::ProcessMessage for color
@@ -10,10 +10,10 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c
index 4aa563ab0d9..bbc6cf83905 100644
index b77f3358c52..c07ef22acc3 100644
--- a/dlls/winegstreamer/colorconvert.c
+++ b/dlls/winegstreamer/colorconvert.c
@@ -487,9 +487,16 @@ static HRESULT WINAPI color_converter_ProcessEvent(IMFTransform *iface, DWORD id
@@ -477,9 +477,16 @@ static HRESULT WINAPI color_converter_ProcessEvent(IMFTransform *iface, DWORD id
static HRESULT WINAPI color_converter_ProcessMessage(IMFTransform *iface, MFT_MESSAGE_TYPE message, ULONG_PTR param)
{

View File

@@ -1,4 +1,4 @@
From 37119259d559a7ccc529d57e869d2b6bb8b2e6fa Mon Sep 17 00:00:00 2001
From e8eef3f90da399a077f5853e2a399c7e27a6418e Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Thu, 3 Dec 2020 15:28:42 -0500
Subject: [PATCH] winegstreamer: Implement ::Get(Input/Output)StreamInfo for
@@ -6,14 +6,14 @@ Subject: [PATCH] winegstreamer: Implement ::Get(Input/Output)StreamInfo for
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/winegstreamer/colorconvert.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
dlls/winegstreamer/colorconvert.c | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c
index bbc6cf83905..5bfe194ffcc 100644
index c07ef22acc3..43b8dddeee7 100644
--- a/dlls/winegstreamer/colorconvert.c
+++ b/dlls/winegstreamer/colorconvert.c
@@ -138,16 +138,34 @@ static HRESULT WINAPI color_converter_GetStreamIDs(IMFTransform *iface, DWORD in
@@ -138,16 +138,31 @@ static HRESULT WINAPI color_converter_GetStreamIDs(IMFTransform *iface, DWORD in
static HRESULT WINAPI color_converter_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info)
{
@@ -28,8 +28,6 @@ index bbc6cf83905..5bfe194ffcc 100644
+ info->cbMaxLookahead = 0;
+ info->cbAlignment = 0;
+ info->hnsMaxLatency = 0;
+ /* TODO: this can be calculated using MFCalculateImageSize */
+ info->cbSize = 0;
+
+ return S_OK;
}
@@ -43,10 +41,9 @@ index bbc6cf83905..5bfe194ffcc 100644
+ if (id != 0)
+ return MF_E_INVALIDSTREAMNUMBER;
+
+ info->dwFlags = MFT_OUTPUT_STREAM_PROVIDES_SAMPLES | MFT_OUTPUT_STREAM_WHOLE_SAMPLES;
+ info->cbAlignment = 0;
+ /* TODO: this can be calculated using MFCalculateImageSize */
+ info->dwFlags = MFT_OUTPUT_STREAM_PROVIDES_SAMPLES;
+ info->cbSize = 0;
+ info->cbAlignment = 0;
+
+ return S_OK;
}

View File

@@ -1,7 +1,7 @@
From ce99ae246416151f46a778ccbc6eeb9f95f509c2 Mon Sep 17 00:00:00 2001
From 7bc3f13dd779e7b998a877012c83a8ca9e7aba4f Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Thu, 3 Dec 2020 15:37:10 -0500
Subject: [PATCH] winegstreamer: Semi-stub Get*Attributes functions for color
Subject: [PATCH] winegstreamer: Implement Get*Attributes functions for color
converter transform.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
@@ -10,7 +10,7 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c
index 5bfe194ffcc..c4e72b3d0ff 100644
index 43b8dddeee7..9e6ece796f3 100644
--- a/dlls/winegstreamer/colorconvert.c
+++ b/dlls/winegstreamer/colorconvert.c
@@ -52,6 +52,8 @@ struct color_converter
@@ -33,7 +33,7 @@ index 5bfe194ffcc..c4e72b3d0ff 100644
gst_object_unref(transform->container);
heap_free(transform);
}
@@ -170,9 +176,14 @@ static HRESULT WINAPI color_converter_GetOutputStreamInfo(IMFTransform *iface, D
@@ -167,9 +173,14 @@ static HRESULT WINAPI color_converter_GetOutputStreamInfo(IMFTransform *iface, D
static HRESULT WINAPI color_converter_GetAttributes(IMFTransform *iface, IMFAttributes **attributes)
{
@@ -50,7 +50,7 @@ index 5bfe194ffcc..c4e72b3d0ff 100644
}
static HRESULT WINAPI color_converter_GetInputStreamAttributes(IMFTransform *iface, DWORD id,
@@ -186,9 +197,14 @@ static HRESULT WINAPI color_converter_GetInputStreamAttributes(IMFTransform *ifa
@@ -183,9 +194,14 @@ static HRESULT WINAPI color_converter_GetInputStreamAttributes(IMFTransform *ifa
static HRESULT WINAPI color_converter_GetOutputStreamAttributes(IMFTransform *iface, DWORD id,
IMFAttributes **attributes)
{
@@ -67,15 +67,15 @@ index 5bfe194ffcc..c4e72b3d0ff 100644
}
static HRESULT WINAPI color_converter_DeleteInputStream(IMFTransform *iface, DWORD id)
@@ -653,6 +669,7 @@ HRESULT color_converter_create(REFIID riid, void **ret)
@@ -639,6 +655,7 @@ static const IMFTransformVtbl color_converter_vtbl =
HRESULT color_converter_create(REFIID riid, void **ret)
{
struct color_converter *object;
GstElement *videoconvert;
+ HRESULT hr;
TRACE("%s %p\n", debugstr_guid(riid), ret);
@@ -665,6 +682,18 @@ HRESULT color_converter_create(REFIID riid, void **ret)
@@ -651,6 +668,18 @@ HRESULT color_converter_create(REFIID riid, void **ret)
InitializeCriticalSection(&object->cs);
object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": color_converter_lock");

Some files were not shown because too many files have changed in this diff Show More