mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Updated mfplat-streaming-support patchset
This commit is contained in:
parent
e015f0590c
commit
a8684593e2
@ -0,0 +1,28 @@
|
||||
From dc2ee56fbd2ed96f69ab5ccad4ff7666165760d4 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Wed, 9 Dec 2020 11:46:58 -0500
|
||||
Subject: [PATCH] winegstreamer: Correct mistaken enum value in ProcessMessage.
|
||||
|
||||
This is the message session relies on succeeding.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/audioconvert.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
|
||||
index c5762bfdc60..82467b2f4e2 100644
|
||||
--- a/dlls/winegstreamer/audioconvert.c
|
||||
+++ b/dlls/winegstreamer/audioconvert.c
|
||||
@@ -517,7 +517,7 @@ static HRESULT WINAPI audio_converter_ProcessMessage(IMFTransform *iface, MFT_ME
|
||||
|
||||
switch(message)
|
||||
{
|
||||
- case MFT_MESSAGE_NOTIFY_START_OF_STREAM:
|
||||
+ case MFT_MESSAGE_NOTIFY_BEGIN_STREAMING:
|
||||
return S_OK;
|
||||
default:
|
||||
FIXME("Unhandled message type %x.\n", message);
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,221 @@
|
||||
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
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0c493f7590ba2d7b90cf44c389378aacae8f6fe0 Mon Sep 17 00:00:00 2001
|
||||
From 25ae21745349feace0055c0b962f75b234e1e99a 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 | 175 +++++++++++++++++++++++++++++-
|
||||
dlls/winegstreamer/audioconvert.c | 188 ++++++++++++++++++++++++++++--
|
||||
dlls/winegstreamer/gst_private.h | 1 +
|
||||
dlls/winegstreamer/mfplat.c | 69 ++++++++++++
|
||||
3 files changed, 239 insertions(+), 6 deletions(-)
|
||||
dlls/winegstreamer/mfplat.c | 69 +++++++++++
|
||||
3 files changed, 250 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
|
||||
index 7fb0dee99f6..631c57d6d55 100644
|
||||
index 85f44dd8856..e16fc6f1a78 100644
|
||||
--- a/dlls/winegstreamer/audioconvert.c
|
||||
+++ b/dlls/winegstreamer/audioconvert.c
|
||||
@@ -40,6 +40,8 @@ struct audio_converter
|
||||
@ -20,7 +20,7 @@ index 7fb0dee99f6..631c57d6d55 100644
|
||||
IMFMediaType *output_type;
|
||||
CRITICAL_SECTION cs;
|
||||
+ BOOL inflight;
|
||||
+ GstElement *container, *appsrc, *audioconvert, *resampler, *appsink;
|
||||
+ GstElement *container, *appsrc, *appsink;
|
||||
};
|
||||
|
||||
static struct audio_converter *impl_audio_converter_from_IMFTransform(IMFTransform *iface)
|
||||
@ -32,35 +32,46 @@ index 7fb0dee99f6..631c57d6d55 100644
|
||||
heap_free(transform);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -295,6 +298,9 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
|
||||
|
||||
- gst_caps_unref(input_caps);
|
||||
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
|
||||
+ gst_caps_unref(input_caps);
|
||||
}
|
||||
EnterCriticalSection(&converter->cs);
|
||||
|
||||
+ 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)
|
||||
@@ -320,6 +324,7 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
|
||||
+ {
|
||||
+ gst_caps_unref(input_caps);
|
||||
return S_OK;
|
||||
+ }
|
||||
|
||||
EnterCriticalSection(&converter->cs);
|
||||
|
||||
hr = S_OK;
|
||||
+ converter->inflight = FALSE;
|
||||
+ gst_element_set_state(converter->container, GST_STATE_READY);
|
||||
|
||||
if (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);
|
||||
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);
|
||||
+ 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
|
||||
if (FAILED(hr))
|
||||
{
|
||||
IMFMediaType_Release(converter->input_type);
|
||||
converter->input_type = NULL;
|
||||
}
|
||||
|
||||
@ -70,35 +81,46 @@ index 7fb0dee99f6..631c57d6d55 100644
|
||||
LeaveCriticalSection(&converter->cs);
|
||||
|
||||
return hr;
|
||||
@@ -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;
|
||||
@@ -375,6 +390,9 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
|
||||
|
||||
- gst_caps_unref(output_caps);
|
||||
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
|
||||
+ gst_caps_unref(output_caps);
|
||||
}
|
||||
EnterCriticalSection(&converter->cs);
|
||||
|
||||
+ 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)
|
||||
@@ -395,6 +407,7 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
|
||||
+ {
|
||||
+ gst_caps_unref(output_caps);
|
||||
return S_OK;
|
||||
+ }
|
||||
|
||||
EnterCriticalSection(&converter->cs);
|
||||
|
||||
hr = S_OK;
|
||||
+ converter->inflight = FALSE;
|
||||
+ gst_element_set_state(converter->container, GST_STATE_READY);
|
||||
|
||||
if (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);
|
||||
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);
|
||||
+ 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
|
||||
if (FAILED(hr))
|
||||
{
|
||||
IMFMediaType_Release(converter->output_type);
|
||||
converter->output_type = NULL;
|
||||
}
|
||||
|
||||
@ -108,7 +130,7 @@ index 7fb0dee99f6..631c57d6d55 100644
|
||||
LeaveCriticalSection(&converter->cs);
|
||||
|
||||
return hr;
|
||||
@@ -479,17 +498,102 @@ static HRESULT WINAPI audio_converter_ProcessMessage(IMFTransform *iface, MFT_ME
|
||||
@@ -538,17 +565,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)
|
||||
{
|
||||
@ -151,7 +173,7 @@ index 7fb0dee99f6..631c57d6d55 100644
|
||||
+ gst_buffer_unref(gst_buffer);
|
||||
+ if (ret != GST_FLOW_OK)
|
||||
+ {
|
||||
+ ERR("Couldn't push buffer ret = %d (%s)\n", ret, gst_flow_get_name(ret));
|
||||
+ ERR("Couldn't push buffer ret, (%s)\n", gst_flow_get_name(ret));
|
||||
+ LeaveCriticalSection(&converter->cs);
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
@ -215,7 +237,15 @@ index 7fb0dee99f6..631c57d6d55 100644
|
||||
}
|
||||
|
||||
static const IMFTransformVtbl audio_converter_vtbl =
|
||||
@@ -537,6 +641,65 @@ HRESULT audio_converter_create(REFIID riid, void **ret)
|
||||
@@ -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)
|
||||
InitializeCriticalSection(&object->cs);
|
||||
object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": audio_converter_lock");
|
||||
|
||||
@ -230,23 +260,23 @@ index 7fb0dee99f6..631c57d6d55 100644
|
||||
+ }
|
||||
+ gst_bin_add(GST_BIN(object->container), object->appsrc);
|
||||
+
|
||||
+ if (!(object->audioconvert = gst_element_factory_make("audioconvert", NULL)))
|
||||
+ if (!(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), object->audioconvert);
|
||||
+ gst_bin_add(GST_BIN(object->container), audioconvert);
|
||||
+
|
||||
+ if (!(object->resampler = gst_element_factory_make("audioresample", NULL)))
|
||||
+ if (!(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), object->resampler);
|
||||
+ gst_bin_add(GST_BIN(object->container), resampler);
|
||||
+
|
||||
+ if (!(object->appsink = gst_element_factory_make("appsink", NULL)))
|
||||
+ {
|
||||
@ -257,21 +287,21 @@ index 7fb0dee99f6..631c57d6d55 100644
|
||||
+ }
|
||||
+ gst_bin_add(GST_BIN(object->container), object->appsink);
|
||||
+
|
||||
+ if (!gst_element_link(object->appsrc, object->audioconvert))
|
||||
+ if (!gst_element_link(object->appsrc, audioconvert))
|
||||
+ {
|
||||
+ ERR("Failed to link appsrc to audioconvert\n");
|
||||
+ IMFTransform_Release(&object->IMFTransform_iface);
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+
|
||||
+ if (!gst_element_link(object->audioconvert, object->resampler))
|
||||
+ if (!gst_element_link(audioconvert, resampler))
|
||||
+ {
|
||||
+ ERR("Failed to link audioconvert to resampler\n");
|
||||
+ IMFTransform_Release(&object->IMFTransform_iface);
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+
|
||||
+ if (!gst_element_link(object->resampler, object->appsink))
|
||||
+ if (!gst_element_link(resampler, object->appsink))
|
||||
+ {
|
||||
+ ERR("Failed to link resampler to appsink\n");
|
||||
+ IMFTransform_Release(&object->IMFTransform_iface);
|
||||
@ -294,7 +324,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..883084b2d89 100644
|
||||
index f300988fc5c..b2b5b247dac 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -865,3 +865,72 @@ done:
|
||||
@ -302,7 +332,7 @@ index f300988fc5c..883084b2d89 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;
|
||||
@ -339,7 +369,7 @@ index f300988fc5c..883084b2d89 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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 13e0d5671caaeae69bde747e547a5bd4524dd2ff Mon Sep 17 00:00:00 2001
|
||||
From 3b76c2693af28c4aded7dbf4955baac91578f726 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 | 23 +++++++++++++++++++----
|
||||
1 file changed, 19 insertions(+), 4 deletions(-)
|
||||
dlls/winegstreamer/audioconvert.c | 26 ++++++++++++++++++++++----
|
||||
1 file changed, 22 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
|
||||
index 631c57d6d55..d204d9582ba 100644
|
||||
index e16fc6f1a78..a95fc5506e7 100644
|
||||
--- a/dlls/winegstreamer/audioconvert.c
|
||||
+++ b/dlls/winegstreamer/audioconvert.c
|
||||
@@ -123,16 +123,31 @@ static HRESULT WINAPI audio_converter_GetStreamIDs(IMFTransform *iface, DWORD in
|
||||
@@ -123,16 +123,34 @@ 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,6 +28,8 @@ index 631c57d6d55..d204d9582ba 100644
|
||||
+ info->cbMaxLookahead = 0;
|
||||
+ info->cbAlignment = 0;
|
||||
+ info->hnsMaxLatency = 0;
|
||||
+ /* TODO: this can be calculated using MFCalculateImageSize */
|
||||
+ info->cbSize = 0;
|
||||
+
|
||||
+ return S_OK;
|
||||
}
|
||||
@ -41,9 +43,10 @@ index 631c57d6d55..d204d9582ba 100644
|
||||
+ if (id != 0)
|
||||
+ return MF_E_INVALIDSTREAMNUMBER;
|
||||
+
|
||||
+ info->dwFlags = MFT_OUTPUT_STREAM_PROVIDES_SAMPLES;
|
||||
+ info->cbSize = 0;
|
||||
+ info->dwFlags = MFT_OUTPUT_STREAM_PROVIDES_SAMPLES | MFT_OUTPUT_STREAM_WHOLE_SAMPLES;
|
||||
+ info->cbAlignment = 0;
|
||||
+ /* TODO: this can be calculated using MFCalculateImageSize */
|
||||
+ info->cbSize = 0;
|
||||
+
|
||||
+ return S_OK;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 91a772eb1cb4ec9e86b4ab007743a99a8bd75265 Mon Sep 17 00:00:00 2001
|
||||
From 5a5f948685d65455b540eb4fb0127a72ca6bc00c 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: Implement Get*Attributes functions for audio
|
||||
Subject: [PATCH] winegstreamer: Semi-stub 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 d204d9582ba..556aba44fc9 100644
|
||||
index a95fc5506e7..2a5f87fec94 100644
|
||||
--- a/dlls/winegstreamer/audioconvert.c
|
||||
+++ b/dlls/winegstreamer/audioconvert.c
|
||||
@@ -37,6 +37,8 @@ struct audio_converter
|
||||
@ -33,7 +33,7 @@ index d204d9582ba..556aba44fc9 100644
|
||||
gst_object_unref(transform->container);
|
||||
heap_free(transform);
|
||||
}
|
||||
@@ -152,9 +158,14 @@ static HRESULT WINAPI audio_converter_GetOutputStreamInfo(IMFTransform *iface, D
|
||||
@@ -155,9 +161,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 d204d9582ba..556aba44fc9 100644
|
||||
}
|
||||
|
||||
static HRESULT WINAPI audio_converter_GetInputStreamAttributes(IMFTransform *iface, DWORD id,
|
||||
@@ -168,9 +179,14 @@ static HRESULT WINAPI audio_converter_GetInputStreamAttributes(IMFTransform *ifa
|
||||
@@ -171,9 +182,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 d204d9582ba..556aba44fc9 100644
|
||||
}
|
||||
|
||||
static HRESULT WINAPI audio_converter_DeleteInputStream(IMFTransform *iface, DWORD id)
|
||||
@@ -644,6 +660,7 @@ static const IMFTransformVtbl audio_converter_vtbl =
|
||||
HRESULT audio_converter_create(REFIID riid, void **ret)
|
||||
@@ -715,6 +731,7 @@ 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);
|
||||
|
||||
@@ -656,6 +673,18 @@ HRESULT audio_converter_create(REFIID riid, void **ret)
|
||||
@@ -727,6 +744,18 @@ HRESULT audio_converter_create(REFIID riid, void **ret)
|
||||
InitializeCriticalSection(&object->cs);
|
||||
object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": audio_converter_lock");
|
||||
|
@ -1,18 +1,19 @@
|
||||
From b5316e74275511a63372473cb6bb10b8f2f8d2e1 Mon Sep 17 00:00:00 2001
|
||||
From 9ea8d5720eb283af1bcf6d69e9804415d56804d1 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 roughly fills the roll of Windows' CColorConverterDMO.
|
||||
Serves as a wrapper of videoconvert, and exposes the CColorConverterDMO MFT interface.
|
||||
|
||||
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 | 3 +
|
||||
dlls/winegstreamer/mfplat.c | 2 +
|
||||
dlls/winegstreamer/winegstreamer_classes.idl | 6 +
|
||||
5 files changed, 313 insertions(+)
|
||||
include/wmcodecdsp.idl | 5 +
|
||||
6 files changed, 317 insertions(+)
|
||||
create mode 100644 dlls/winegstreamer/colorconvert.c
|
||||
|
||||
diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in
|
||||
@ -347,23 +348,22 @@ index 14b6a011ac2..075e0ce1f0f 100644
|
||||
|
||||
#endif /* __GST_PRIVATE_INCLUDED__ */
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index 883084b2d89..288b79997cd 100644
|
||||
index b2b5b247dac..5ec408eea34 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -407,6 +407,8 @@ static const GUID CLSID_GStreamerByteStreamHandler = {0x317df618, 0x5e5a, 0x468a
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "gst_private.h"
|
||||
#include "mfapi.h"
|
||||
#include "mfidl.h"
|
||||
+#include "wmcodecdsp.h"
|
||||
|
||||
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[] =
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
@@ -417,6 +418,7 @@ class_objects[] =
|
||||
{ &CLSID_VideoProcessorMFT, &video_processor_create },
|
||||
{ &CLSID_GStreamerByteStreamHandler, &winegstreamer_stream_handler_create },
|
||||
{ &CLSID_WINEAudioConverter, &audio_converter_create },
|
||||
+ { &CLSID_WINEColorConverter, &color_converter_create },
|
||||
+ { &CLSID_CColorConvertDMO, &color_converter_create },
|
||||
};
|
||||
|
||||
HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj)
|
||||
@ -381,6 +381,19 @@ 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 18799e737ff065a62ea1c92c9a684940053d9dfb Mon Sep 17 00:00:00 2001
|
||||
From 72a7be6182b55b44a9448d25f285a94dba36dc05 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 288b79997cd..1b19c43d991 100644
|
||||
index 5ec408eea34..bab2ccce64c 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -455,6 +455,26 @@ static const GUID *audio_converter_supported_types[] =
|
||||
@@ -454,6 +454,26 @@ static const GUID *audio_converter_supported_types[] =
|
||||
&MFAudioFormat_Float,
|
||||
};
|
||||
|
||||
@ -39,12 +39,12 @@ index 288b79997cd..1b19c43d991 100644
|
||||
static const struct mft
|
||||
{
|
||||
const GUID *clsid;
|
||||
@@ -482,13 +502,25 @@ mfts[] =
|
||||
@@ -481,13 +501,25 @@ mfts[] =
|
||||
audio_converter_supported_types,
|
||||
NULL
|
||||
},
|
||||
+ {
|
||||
+ &CLSID_WINEColorConverter,
|
||||
+ &CLSID_CColorConvertDMO,
|
||||
+ &MFT_CATEGORY_VIDEO_EFFECT,
|
||||
+ color_converterW,
|
||||
+ MFT_ENUM_FLAG_SYNCMFT,
|
@ -1,4 +1,4 @@
|
||||
From 15b54cf08d296483e6d4c211eeae50db62f70804 Mon Sep 17 00:00:00 2001
|
||||
From f23000bf69fd7eb691eb3768f87ed08188f3c8ba 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
|
@ -1,4 +1,4 @@
|
||||
From 096a5070ac3ce917e6c8ae010e8e80c8ffbde3c4 Mon Sep 17 00:00:00 2001
|
||||
From dcc33149b4730c603dfd1c66e2d6ccd03d5e89a9 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 | 76 ++++++++++++++++++++++++++++++-
|
||||
1 file changed, 74 insertions(+), 2 deletions(-)
|
||||
dlls/winegstreamer/colorconvert.c | 82 ++++++++++++++++++++++++++++++-
|
||||
1 file changed, 80 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c
|
||||
index 9a1d2880234..5dd48188147 100644
|
||||
index 9a1d2880234..a7660453766 100644
|
||||
--- a/dlls/winegstreamer/colorconvert.c
|
||||
+++ b/dlls/winegstreamer/colorconvert.c
|
||||
@@ -52,6 +52,8 @@ struct color_converter
|
||||
@ -31,11 +31,12 @@ index 9a1d2880234..5dd48188147 100644
|
||||
heap_free(transform);
|
||||
}
|
||||
|
||||
@@ -223,9 +227,74 @@ static HRESULT WINAPI color_converter_GetOutputAvailableType(IMFTransform *iface
|
||||
@@ -223,9 +227,80 @@ 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;
|
||||
@ -48,33 +49,46 @@ index 9a1d2880234..5dd48188147 100644
|
||||
+ if (id != 0)
|
||||
+ return MF_E_INVALIDSTREAMNUMBER;
|
||||
+
|
||||
+ if (type)
|
||||
+ if (!type)
|
||||
+ {
|
||||
+ GUID major_type, subtype;
|
||||
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
|
||||
+ 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;
|
||||
+ EnterCriticalSection(&converter->cs);
|
||||
+
|
||||
+ if (!(IsEqualGUID(&major_type, &MFMediaType_Video)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(raw_types); i++)
|
||||
+ if (converter->input_type)
|
||||
+ {
|
||||
+ if (IsEqualGUID(&subtype, raw_types[i]))
|
||||
+ break;
|
||||
+ IMFMediaType_Release(converter->input_type);
|
||||
+ converter->input_type = NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (i == ARRAY_SIZE(raw_types))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+ LeaveCriticalSection(&converter->cs);
|
||||
+
|
||||
+ if (!(input_caps = caps_from_mf_media_type(type)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+
|
||||
+ gst_caps_unref(input_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 (!(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;
|
||||
+
|
||||
@ -82,21 +96,13 @@ index 9a1d2880234..5dd48188147 100644
|
||||
+
|
||||
+ 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 (FAILED(hr))
|
||||
+ {
|
||||
+ IMFMediaType_Release(converter->input_type);
|
||||
+ converter->input_type = NULL;
|
||||
@ -108,7 +114,7 @@ index 9a1d2880234..5dd48188147 100644
|
||||
}
|
||||
|
||||
static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
|
||||
@@ -341,6 +410,9 @@ HRESULT color_converter_create(REFIID riid, void **ret)
|
||||
@@ -341,6 +416,9 @@ HRESULT color_converter_create(REFIID riid, void **ret)
|
||||
object->IMFTransform_iface.lpVtbl = &color_converter_vtbl;
|
||||
object->refcount = 1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 64cfb2a80d7ebc22b12d8b6c1e41cf7a74e15d88 Mon Sep 17 00:00:00 2001
|
||||
From 4971b983809a02ce8b61d4098703532deb8d3f29 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,27 +6,14 @@ Subject: [PATCH] winegstreamer: Implement ::GetOutputAvailableType for color
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/colorconvert.c | 48 +++++++++++++++++++++++++++++--
|
||||
1 file changed, 46 insertions(+), 2 deletions(-)
|
||||
dlls/winegstreamer/colorconvert.c | 38 +++++++++++++++++++++++++++++--
|
||||
1 file changed, 36 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c
|
||||
index 5dd48188147..b80232e195b 100644
|
||||
index a7660453766..a7206408603 100644
|
||||
--- a/dlls/winegstreamer/colorconvert.c
|
||||
+++ b/dlls/winegstreamer/colorconvert.c
|
||||
@@ -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);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
@@ -220,9 +220,43 @@ static HRESULT WINAPI color_converter_GetInputAvailableType(IMFTransform *iface,
|
||||
static HRESULT WINAPI color_converter_GetOutputAvailableType(IMFTransform *iface, DWORD id, DWORD index,
|
||||
IMFMediaType **type)
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
From f1714a949175290e9f01bd32fde1dacecfed7946 Mon Sep 17 00:00:00 2001
|
||||
From 95f62008671a1cde75abce167806026ec75be681 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 | 70 ++++++++++++++++++++++++++++++-
|
||||
1 file changed, 68 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 b80232e195b..e7e84690738 100644
|
||||
index a7206408603..c2665cbdacb 100644
|
||||
--- a/dlls/winegstreamer/colorconvert.c
|
||||
+++ b/dlls/winegstreamer/colorconvert.c
|
||||
@@ -53,6 +53,7 @@ struct color_converter
|
||||
@ -21,11 +21,12 @@ index b80232e195b..e7e84690738 100644
|
||||
CRITICAL_SECTION cs;
|
||||
};
|
||||
|
||||
@@ -343,9 +344,74 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id
|
||||
@@ -339,9 +340,80 @@ 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;
|
||||
@ -38,33 +39,46 @@ index b80232e195b..e7e84690738 100644
|
||||
+ if (id != 0)
|
||||
+ return MF_E_INVALIDSTREAMNUMBER;
|
||||
+
|
||||
+ if (type)
|
||||
+ if (!type)
|
||||
+ {
|
||||
+ GUID major_type, subtype;
|
||||
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
|
||||
+ 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;
|
||||
+ EnterCriticalSection(&converter->cs);
|
||||
+
|
||||
+ if (!(IsEqualGUID(&major_type, &MFMediaType_Video)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(raw_types); i++)
|
||||
+ if (converter->output_type)
|
||||
+ {
|
||||
+ if (IsEqualGUID(&subtype, raw_types[i]))
|
||||
+ break;
|
||||
+ IMFMediaType_Release(converter->output_type);
|
||||
+ converter->output_type = NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (i == ARRAY_SIZE(raw_types))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+ LeaveCriticalSection(&converter->cs);
|
||||
+
|
||||
+ if (!(output_caps = caps_from_mf_media_type(type)))
|
||||
+ return MF_E_INVALIDTYPE;
|
||||
+
|
||||
+ 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 (!(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;
|
||||
+
|
||||
@ -72,21 +86,13 @@ index b80232e195b..e7e84690738 100644
|
||||
+
|
||||
+ 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 (FAILED(hr))
|
||||
+ {
|
||||
+ IMFMediaType_Release(converter->output_type);
|
||||
+ converter->output_type = NULL;
|
@ -1,4 +1,4 @@
|
||||
From c94cfbf0ec1c10452c2cf1496f32eeefe5794cea Mon Sep 17 00:00:00 2001
|
||||
From 126c7b1289899ea86527acb20f3bfc296a4dde2f 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 | 159 +++++++++++++++++++++++++++++-
|
||||
1 file changed, 154 insertions(+), 5 deletions(-)
|
||||
dlls/winegstreamer/colorconvert.c | 172 ++++++++++++++++++++++++++++--
|
||||
1 file changed, 165 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c
|
||||
index e7e84690738..b77f3358c52 100644
|
||||
index c2665cbdacb..4aa563ab0d9 100644
|
||||
--- a/dlls/winegstreamer/colorconvert.c
|
||||
+++ b/dlls/winegstreamer/colorconvert.c
|
||||
@@ -55,6 +55,8 @@ struct color_converter
|
||||
@ -18,7 +18,7 @@ index e7e84690738..b77f3358c52 100644
|
||||
IMFMediaType *output_type;
|
||||
CRITICAL_SECTION cs;
|
||||
+ BOOL inflight;
|
||||
+ GstElement *container, *appsrc, *videoconvert, *appsink;
|
||||
+ GstElement *container, *appsrc, *appsink;
|
||||
};
|
||||
|
||||
static struct color_converter *impl_color_converter_from_IMFTransform(IMFTransform *iface)
|
||||
@ -30,35 +30,46 @@ index e7e84690738..b77f3358c52 100644
|
||||
heap_free(transform);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -281,6 +284,9 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id
|
||||
|
||||
- gst_caps_unref(input_caps);
|
||||
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
|
||||
+ gst_caps_unref(input_caps);
|
||||
}
|
||||
EnterCriticalSection(&converter->cs);
|
||||
|
||||
+ 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)
|
||||
@@ -316,6 +320,7 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id
|
||||
+ {
|
||||
+ gst_caps_unref(input_caps);
|
||||
return S_OK;
|
||||
+ }
|
||||
|
||||
EnterCriticalSection(&converter->cs);
|
||||
|
||||
hr = S_OK;
|
||||
+ converter->inflight = FALSE;
|
||||
+ gst_element_set_state(converter->container, GST_STATE_READY);
|
||||
|
||||
if (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);
|
||||
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);
|
||||
+ 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
|
||||
if (FAILED(hr))
|
||||
{
|
||||
IMFMediaType_Release(converter->input_type);
|
||||
converter->input_type = NULL;
|
||||
}
|
||||
|
||||
@ -68,35 +79,46 @@ index e7e84690738..b77f3358c52 100644
|
||||
LeaveCriticalSection(&converter->cs);
|
||||
|
||||
return hr;
|
||||
@@ -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;
|
||||
@@ -359,6 +374,9 @@ static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD i
|
||||
|
||||
- gst_caps_unref(output_caps);
|
||||
+ if (flags & MFT_SET_TYPE_TEST_ONLY)
|
||||
+ gst_caps_unref(output_caps);
|
||||
}
|
||||
EnterCriticalSection(&converter->cs);
|
||||
|
||||
+ 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)
|
||||
@@ -388,6 +400,7 @@ static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD i
|
||||
+ {
|
||||
+ gst_caps_unref(output_caps);
|
||||
return S_OK;
|
||||
+ }
|
||||
|
||||
EnterCriticalSection(&converter->cs);
|
||||
|
||||
hr = S_OK;
|
||||
+ converter->inflight = FALSE;
|
||||
+ gst_element_set_state(converter->container, GST_STATE_READY);
|
||||
|
||||
if (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);
|
||||
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);
|
||||
+ 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
|
||||
if (FAILED(hr))
|
||||
{
|
||||
IMFMediaType_Release(converter->output_type);
|
||||
converter->output_type = NULL;
|
||||
}
|
||||
|
||||
@ -106,7 +128,7 @@ index e7e84690738..b77f3358c52 100644
|
||||
LeaveCriticalSection(&converter->cs);
|
||||
|
||||
return hr;
|
||||
@@ -465,15 +484,102 @@ static HRESULT WINAPI color_converter_ProcessMessage(IMFTransform *iface, MFT_ME
|
||||
@@ -467,15 +494,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)
|
||||
{
|
||||
@ -149,7 +171,7 @@ index e7e84690738..b77f3358c52 100644
|
||||
+ gst_buffer_unref(gst_buffer);
|
||||
+ if (ret != GST_FLOW_OK)
|
||||
+ {
|
||||
+ ERR("Couldn't push buffer ret = %d (%s)\n", ret, gst_flow_get_name(ret));
|
||||
+ ERR("Couldn't push buffer, (%s)\n", gst_flow_get_name(ret));
|
||||
+ LeaveCriticalSection(&converter->cs);
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
@ -198,7 +220,7 @@ index e7e84690738..b77f3358c52 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);
|
||||
@ -212,7 +234,15 @@ index e7e84690738..b77f3358c52 100644
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
@@ -523,6 +629,49 @@ HRESULT color_converter_create(REFIID riid, void **ret)
|
||||
@@ -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)
|
||||
InitializeCriticalSection(&object->cs);
|
||||
object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": color_converter_lock");
|
||||
|
||||
@ -227,14 +257,14 @@ index e7e84690738..b77f3358c52 100644
|
||||
+ }
|
||||
+ gst_bin_add(GST_BIN(object->container), object->appsrc);
|
||||
+
|
||||
+ if (!(object->videoconvert = gst_element_factory_make("videoconvert", NULL)))
|
||||
+ if (!(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), object->videoconvert);
|
||||
+ gst_bin_add(GST_BIN(object->container), videoconvert);
|
||||
+
|
||||
+ if (!(object->appsink = gst_element_factory_make("appsink", NULL)))
|
||||
+ {
|
||||
@ -245,14 +275,14 @@ index e7e84690738..b77f3358c52 100644
|
||||
+ }
|
||||
+ gst_bin_add(GST_BIN(object->container), object->appsink);
|
||||
+
|
||||
+ if (!gst_element_link(object->appsrc, object->videoconvert))
|
||||
+ if (!gst_element_link(object->appsrc, videoconvert))
|
||||
+ {
|
||||
+ ERR("Failed to link appsrc to videoconvert\n");
|
||||
+ IMFTransform_Release(&object->IMFTransform_iface);
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+
|
||||
+ if (!gst_element_link(object->videoconvert, object->appsink))
|
||||
+ if (!gst_element_link(videoconvert, object->appsink))
|
||||
+ {
|
||||
+ ERR("Failed to link videoconvert to appsink\n");
|
||||
+ IMFTransform_Release(&object->IMFTransform_iface);
|
@ -1,4 +1,4 @@
|
||||
From d68df1b4131caa500cea5c4241be3c55b2728d4c Mon Sep 17 00:00:00 2001
|
||||
From b1eba110c4c5d4d6797f23c54bb339056b03dbc9 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 b77f3358c52..c07ef22acc3 100644
|
||||
index 4aa563ab0d9..bbc6cf83905 100644
|
||||
--- a/dlls/winegstreamer/colorconvert.c
|
||||
+++ b/dlls/winegstreamer/colorconvert.c
|
||||
@@ -477,9 +477,16 @@ static HRESULT WINAPI color_converter_ProcessEvent(IMFTransform *iface, DWORD id
|
||||
@@ -487,9 +487,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)
|
||||
{
|
||||
@ -23,7 +23,7 @@ index b77f3358c52..c07ef22acc3 100644
|
||||
- return E_NOTIMPL;
|
||||
+ switch(message)
|
||||
+ {
|
||||
+ case MFT_MESSAGE_NOTIFY_START_OF_STREAM:
|
||||
+ case MFT_MESSAGE_NOTIFY_BEGIN_STREAMING:
|
||||
+ return S_OK;
|
||||
+ default:
|
||||
+ FIXME("Unhandled message type %x.\n", message);
|
@ -1,4 +1,4 @@
|
||||
From e8eef3f90da399a077f5853e2a399c7e27a6418e Mon Sep 17 00:00:00 2001
|
||||
From 37119259d559a7ccc529d57e869d2b6bb8b2e6fa 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 | 23 +++++++++++++++++++----
|
||||
1 file changed, 19 insertions(+), 4 deletions(-)
|
||||
dlls/winegstreamer/colorconvert.c | 26 ++++++++++++++++++++++----
|
||||
1 file changed, 22 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c
|
||||
index c07ef22acc3..43b8dddeee7 100644
|
||||
index bbc6cf83905..5bfe194ffcc 100644
|
||||
--- a/dlls/winegstreamer/colorconvert.c
|
||||
+++ b/dlls/winegstreamer/colorconvert.c
|
||||
@@ -138,16 +138,31 @@ static HRESULT WINAPI color_converter_GetStreamIDs(IMFTransform *iface, DWORD in
|
||||
@@ -138,16 +138,34 @@ 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,6 +28,8 @@ index c07ef22acc3..43b8dddeee7 100644
|
||||
+ info->cbMaxLookahead = 0;
|
||||
+ info->cbAlignment = 0;
|
||||
+ info->hnsMaxLatency = 0;
|
||||
+ /* TODO: this can be calculated using MFCalculateImageSize */
|
||||
+ info->cbSize = 0;
|
||||
+
|
||||
+ return S_OK;
|
||||
}
|
||||
@ -41,9 +43,10 @@ index c07ef22acc3..43b8dddeee7 100644
|
||||
+ if (id != 0)
|
||||
+ return MF_E_INVALIDSTREAMNUMBER;
|
||||
+
|
||||
+ info->dwFlags = MFT_OUTPUT_STREAM_PROVIDES_SAMPLES;
|
||||
+ info->cbSize = 0;
|
||||
+ info->dwFlags = MFT_OUTPUT_STREAM_PROVIDES_SAMPLES | MFT_OUTPUT_STREAM_WHOLE_SAMPLES;
|
||||
+ info->cbAlignment = 0;
|
||||
+ /* TODO: this can be calculated using MFCalculateImageSize */
|
||||
+ info->cbSize = 0;
|
||||
+
|
||||
+ return S_OK;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
From 7bc3f13dd779e7b998a877012c83a8ca9e7aba4f Mon Sep 17 00:00:00 2001
|
||||
From ce99ae246416151f46a778ccbc6eeb9f95f509c2 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: Implement Get*Attributes functions for color
|
||||
Subject: [PATCH] winegstreamer: Semi-stub 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 43b8dddeee7..9e6ece796f3 100644
|
||||
index 5bfe194ffcc..c4e72b3d0ff 100644
|
||||
--- a/dlls/winegstreamer/colorconvert.c
|
||||
+++ b/dlls/winegstreamer/colorconvert.c
|
||||
@@ -52,6 +52,8 @@ struct color_converter
|
||||
@ -33,7 +33,7 @@ index 43b8dddeee7..9e6ece796f3 100644
|
||||
gst_object_unref(transform->container);
|
||||
heap_free(transform);
|
||||
}
|
||||
@@ -167,9 +173,14 @@ static HRESULT WINAPI color_converter_GetOutputStreamInfo(IMFTransform *iface, D
|
||||
@@ -170,9 +176,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 43b8dddeee7..9e6ece796f3 100644
|
||||
}
|
||||
|
||||
static HRESULT WINAPI color_converter_GetInputStreamAttributes(IMFTransform *iface, DWORD id,
|
||||
@@ -183,9 +194,14 @@ static HRESULT WINAPI color_converter_GetInputStreamAttributes(IMFTransform *ifa
|
||||
@@ -186,9 +197,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 43b8dddeee7..9e6ece796f3 100644
|
||||
}
|
||||
|
||||
static HRESULT WINAPI color_converter_DeleteInputStream(IMFTransform *iface, DWORD id)
|
||||
@@ -639,6 +655,7 @@ static const IMFTransformVtbl color_converter_vtbl =
|
||||
HRESULT color_converter_create(REFIID riid, void **ret)
|
||||
@@ -653,6 +669,7 @@ HRESULT color_converter_create(REFIID riid, void **ret)
|
||||
{
|
||||
struct color_converter *object;
|
||||
GstElement *videoconvert;
|
||||
+ HRESULT hr;
|
||||
|
||||
TRACE("%s %p\n", debugstr_guid(riid), ret);
|
||||
|
||||
@@ -651,6 +668,18 @@ HRESULT color_converter_create(REFIID riid, void **ret)
|
||||
@@ -665,6 +682,18 @@ HRESULT color_converter_create(REFIID riid, void **ret)
|
||||
InitializeCriticalSection(&object->cs);
|
||||
object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": color_converter_lock");
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 54919766d0ad2cf17e8cc6a8783794312964677c Mon Sep 17 00:00:00 2001
|
||||
From b8a39fad1ce3137765760c98d36ac030e6e47f25 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Thu, 3 Dec 2020 15:43:21 -0500
|
||||
Subject: [PATCH] winegstreamer: Implement Get(Input/Output)CurrentType
|
||||
@ -10,10 +10,10 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
1 file changed, 54 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c
|
||||
index 9e6ece796f3..c7b1fae393f 100644
|
||||
index c4e72b3d0ff..8b459b0cc18 100644
|
||||
--- a/dlls/winegstreamer/colorconvert.c
|
||||
+++ b/dlls/winegstreamer/colorconvert.c
|
||||
@@ -466,16 +466,66 @@ static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD i
|
||||
@@ -479,16 +479,66 @@ static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD i
|
||||
|
||||
static HRESULT WINAPI color_converter_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
From 1472041682ce09e0e8bdda78ed0366fba6aa41a0 Mon Sep 17 00:00:00 2001
|
||||
From b4945173bc1dd6c0fd7229c5492b3e08d76f336d Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Thu, 7 May 2020 13:09:47 -0500
|
||||
Subject: [PATCH] winegstreamer: Implement IMFMediaSource::Stop.
|
@ -1,4 +1,4 @@
|
||||
From fbf25644246c31e0116b319a1876c89697c07bc5 Mon Sep 17 00:00:00 2001
|
||||
From f100f20f4079d0f1d7bc34c5667b9af3a26a316f Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Wed, 25 Nov 2020 12:29:50 -0500
|
||||
Subject: [PATCH] winegstreamer: Set MF_MT_ALL_SAMPLES_INDEPENDENT attribute on
|
||||
@ -10,10 +10,10 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index 1b19c43d991..f4a0c5b00f0 100644
|
||||
index bab2ccce64c..3a63c9ddc99 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -604,6 +604,7 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps)
|
||||
@@ -603,6 +603,7 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps)
|
||||
unsigned int i;
|
||||
|
||||
IMFMediaType_SetUINT32(media_type, &MF_MT_COMPRESSED, FALSE);
|
@ -1,4 +1,4 @@
|
||||
From f85db2dd85e074dcb3373d711a937c00c3a5bc73 Mon Sep 17 00:00:00 2001
|
||||
From ca4c81b98b9275e5b19b39ffd7819eb7027e12df Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 11 Aug 2020 13:41:15 -0500
|
||||
Subject: [PATCH] winegstreamer: Implement MF_SD_LANGUAGE.
|
||||
@ -9,10 +9,10 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
1 file changed, 29 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index fd7f1a7f55e..2c6b82c43b4 100644
|
||||
index 655e765fee7..c7af077db8a 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -1636,11 +1636,12 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
@@ -1387,11 +1387,12 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
|
||||
for (i = 0; i < object->stream_count; i++)
|
||||
{
|
||||
@ -28,7 +28,7 @@ index fd7f1a7f55e..2c6b82c43b4 100644
|
||||
if (stream_pres_time > total_pres_time)
|
||||
total_pres_time = stream_pres_time;
|
||||
}
|
||||
@@ -1648,6 +1649,31 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
@@ -1399,6 +1400,31 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
{
|
||||
WARN("Unable to get presentation time of stream %u\n", i);
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
From 539f0ad63d83dd1f60a9a54063f3cb108d71f794 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Mon, 30 Nov 2020 11:56:48 -0500
|
||||
Subject: [PATCH] mf: Add invalid connect method test.
|
||||
|
||||
Nikolay stripped out this test in his updated version of the patchset, which is fine. But I think it's useful to have it somewhere.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/mf/tests/mf.c | 28 ++++++++++++++++++++++++++++
|
||||
1 file changed, 28 insertions(+)
|
||||
|
||||
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
|
||||
index 8272064466f..32ae84b837b 100644
|
||||
--- a/dlls/mf/tests/mf.c
|
||||
+++ b/dlls/mf/tests/mf.c
|
||||
@@ -1824,6 +1824,34 @@ static void test_topology_loader(void)
|
||||
LOADER_TODO,
|
||||
},
|
||||
|
||||
+ {
|
||||
+ /* MP3 -> PCM */
|
||||
+ &MFMediaType_Audio,
|
||||
+ {
|
||||
+ {
|
||||
+ { &MF_MT_SUBTYPE, WAVE_FORMAT_MPEGLAYER3 },
|
||||
+ { &MF_MT_AUDIO_NUM_CHANNELS, 2 },
|
||||
+ { &MF_MT_AUDIO_SAMPLES_PER_SECOND, 44100 },
|
||||
+ { &MF_MT_AUDIO_AVG_BYTES_PER_SECOND, 16000 },
|
||||
+ { &MF_MT_AUDIO_BLOCK_ALIGNMENT, 1 },
|
||||
+ }
|
||||
+ },
|
||||
+ {
|
||||
+ {
|
||||
+ { &MF_MT_SUBTYPE, WAVE_FORMAT_PCM },
|
||||
+ { &MF_MT_AUDIO_NUM_CHANNELS, 1 },
|
||||
+ { &MF_MT_AUDIO_SAMPLES_PER_SECOND, 44100 },
|
||||
+ { &MF_MT_AUDIO_AVG_BYTES_PER_SECOND, 44100 },
|
||||
+ { &MF_MT_AUDIO_BLOCK_ALIGNMENT, 1 },
|
||||
+ { &MF_MT_AUDIO_BITS_PER_SAMPLE, 8 },
|
||||
+ }
|
||||
+ },
|
||||
+
|
||||
+ MF_CONNECT_ALLOW_DECODER &~ MF_CONNECT_ALLOW_CONVERTER,
|
||||
+ MF_E_INVALIDMEDIATYPE,
|
||||
+ LOADER_TODO,
|
||||
+ },
|
||||
+
|
||||
{
|
||||
/* MP3 -> PCM */
|
||||
&MFMediaType_Audio,
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,26 @@
|
||||
From cdc81d57ebaa32b6f6ec8837a0e6d05502826dfb Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Fri, 4 Dec 2020 16:16:20 -0500
|
||||
Subject: [PATCH] winegstreamer: Report streams backwards.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/media_source.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index c7af077db8a..d03900aebdf 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -1371,7 +1371,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
descriptors = heap_alloc(object->stream_count * sizeof(IMFStreamDescriptor*));
|
||||
for (i = 0; i < object->stream_count; i++)
|
||||
{
|
||||
- IMFMediaStream_GetStreamDescriptor(&object->streams[i]->IMFMediaStream_iface, &descriptors[i]);
|
||||
+ IMFMediaStream_GetStreamDescriptor(&object->streams[i]->IMFMediaStream_iface, &descriptors[object->stream_count - 1 - i]);
|
||||
}
|
||||
|
||||
if (FAILED(hr = MFCreatePresentationDescriptor(object->stream_count, descriptors, &object->pres_desc)))
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,71 +0,0 @@
|
||||
From dd7243f4ee9f7bee1019621c974f98737b760905 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Wed, 2 Dec 2020 17:12:22 -0500
|
||||
Subject: [PATCH] Allow for compressed types.
|
||||
|
||||
---
|
||||
dlls/winegstreamer/mfplat.c | 28 ++++++++++++++++++----------
|
||||
1 file changed, 18 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index f4a0c5b00f0..8d2d8996f22 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -779,22 +779,20 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type)
|
||||
{
|
||||
DWORD rate = -1, channels = -1, channel_mask = -1;
|
||||
|
||||
- if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &rate)))
|
||||
- {
|
||||
- ERR("Sample rate not set.\n");
|
||||
- return NULL;
|
||||
- }
|
||||
- if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_NUM_CHANNELS, &channels)))
|
||||
- {
|
||||
- ERR("Channel count not set.\n");
|
||||
- return NULL;
|
||||
- }
|
||||
+ IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &rate);
|
||||
+ IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_NUM_CHANNELS, &channels);
|
||||
IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_CHANNEL_MASK, &channel_mask);
|
||||
|
||||
if (IsEqualGUID(&subtype, &MFAudioFormat_Float))
|
||||
{
|
||||
GstAudioInfo float_info;
|
||||
|
||||
+ if (rate == -1 || channels == -1)
|
||||
+ {
|
||||
+ ERR("Incomplete media type.\n");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
gst_audio_info_set_format(&float_info, GST_AUDIO_FORMAT_F32LE, rate, channels, NULL);
|
||||
output = gst_audio_info_to_caps(&float_info);
|
||||
}
|
||||
@@ -804,6 +802,12 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type)
|
||||
GstAudioInfo pcm_info;
|
||||
DWORD bits_per_sample;
|
||||
|
||||
+ if (rate == -1 || channels == -1)
|
||||
+ {
|
||||
+ ERR("Incomplete media type.\n");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
if (SUCCEEDED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BITS_PER_SAMPLE, &bits_per_sample)))
|
||||
{
|
||||
pcm_format = gst_audio_format_build_integer(bits_per_sample > 8, G_LITTLE_ENDIAN, bits_per_sample, bits_per_sample);
|
||||
@@ -823,6 +827,10 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+ if (rate != -1)
|
||||
+ gst_caps_set_simple(output, "rate", G_TYPE_INT, rate, NULL);
|
||||
+ if (channels != -1)
|
||||
+ gst_caps_set_simple(output, "channels", G_TYPE_INT, channels, NULL);
|
||||
if (channel_mask != -1)
|
||||
gst_caps_set_simple(output, "channel-mask", GST_TYPE_BITMASK, (guint64) channel_mask, NULL);
|
||||
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,33 +1,26 @@
|
||||
From cda7c0339af6bf5c4d903ef844844ca0d4332d73 Mon Sep 17 00:00:00 2001
|
||||
From ed3b35cdd86ba24e24507377652927e032ce25cb Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 5 May 2020 15:35:16 -0500
|
||||
Subject: [PATCH] Report streams backwards and only select one of each stream
|
||||
type.
|
||||
Date: Fri, 4 Dec 2020 16:17:11 -0500
|
||||
Subject: [PATCH] winegstreamer: In the default configuration, select one
|
||||
stream of each major type.
|
||||
|
||||
---
|
||||
dlls/winegstreamer/media_source.c | 24 ++++++++++++++++++++++--
|
||||
1 file changed, 22 insertions(+), 2 deletions(-)
|
||||
dlls/winegstreamer/media_source.c | 22 +++++++++++++++++++++-
|
||||
1 file changed, 21 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index 2156e07a13c..fd7f1a7f55e 100644
|
||||
index d03900aebdf..dc15ec8d5ca 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -1486,6 +1486,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
@@ -1262,6 +1262,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
GstStaticPadTemplate src_template =
|
||||
GST_STATIC_PAD_TEMPLATE("mf_src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY);
|
||||
|
||||
+ BOOL video_selected = FALSE, audio_selected = FALSE;
|
||||
IMFStreamDescriptor **descriptors = NULL;
|
||||
IMFAttributes *byte_stream_attributes;
|
||||
struct media_source *object;
|
||||
@@ -1600,15 +1601,34 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
descriptors = heap_alloc(object->stream_count * sizeof(IMFStreamDescriptor*));
|
||||
for (i = 0; i < object->stream_count; i++)
|
||||
{
|
||||
- IMFMediaStream_GetStreamDescriptor(&object->streams[i]->IMFMediaStream_iface, &descriptors[i]);
|
||||
+ IMFMediaStream_GetStreamDescriptor(&object->streams[i]->IMFMediaStream_iface, &descriptors[object->stream_count - 1 - i]);
|
||||
}
|
||||
|
||||
gint64 total_pres_time = 0;
|
||||
@@ -1377,9 +1378,28 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
if (FAILED(hr = MFCreatePresentationDescriptor(object->stream_count, descriptors, &object->pres_desc)))
|
||||
goto fail;
|
||||
|
@ -1,32 +0,0 @@
|
||||
From 3b4148fbc1338e6a202d852491eba1362c905bfc Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Wed, 14 Oct 2020 11:07:05 -0500
|
||||
Subject: [PATCH] mf/session: Unconditionally deliver NULL (EOS) samples.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/mf/session.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/mf/session.c b/dlls/mf/session.c
|
||||
index 1a7439a13c3..07e29cd013f 100644
|
||||
--- a/dlls/mf/session.c
|
||||
+++ b/dlls/mf/session.c
|
||||
@@ -2858,11 +2858,12 @@ static void session_deliver_sample_to_node(struct media_session *session, IMFTop
|
||||
LIST_FOR_EACH_ENTRY_SAFE(sample_entry, sample_entry2, &topo_node->u.transform.outputs[i].samples,
|
||||
struct sample, entry)
|
||||
{
|
||||
- if (!topo_node->u.transform.outputs[i].requests)
|
||||
+ if (!topo_node->u.transform.outputs[i].requests && sample_entry->sample)
|
||||
break;
|
||||
|
||||
session_deliver_sample_to_node(session, downstream_node, downstream_input, sample_entry->sample);
|
||||
- topo_node->u.transform.outputs[i].requests--;
|
||||
+ if (sample_entry->sample)
|
||||
+ topo_node->u.transform.outputs[i].requests--;
|
||||
|
||||
transform_release_sample(sample_entry);
|
||||
}
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,42 +0,0 @@
|
||||
From e1c9fe73263c2220be53482d195264832842279e Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Thu, 2 Apr 2020 15:42:18 -0500
|
||||
Subject: [PATCH] mf/session: Request more samples when a transform needs them.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/mf/session.c | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/mf/session.c b/dlls/mf/session.c
|
||||
index 07e29cd013f..5a08a2eb6c6 100644
|
||||
--- a/dlls/mf/session.c
|
||||
+++ b/dlls/mf/session.c
|
||||
@@ -2759,6 +2759,8 @@ static HRESULT transform_node_pull_samples(const struct media_session *session,
|
||||
return hr;
|
||||
}
|
||||
|
||||
+static HRESULT session_request_sample_from_node(struct media_session *session, IMFTopologyNode *node, DWORD output);
|
||||
+
|
||||
static void session_deliver_sample_to_node(struct media_session *session, IMFTopologyNode *node, unsigned int input,
|
||||
IMFSample *sample)
|
||||
{
|
||||
@@ -2834,7 +2836,14 @@ static void session_deliver_sample_to_node(struct media_session *session, IMFTop
|
||||
WARN("Drain command failed for transform, hr %#x.\n", hr);
|
||||
}
|
||||
|
||||
- transform_node_pull_samples(session, topo_node);
|
||||
+ if (transform_node_pull_samples(session, topo_node) == MF_E_TRANSFORM_NEED_MORE_INPUT && !drain)
|
||||
+ {
|
||||
+ IMFTopologyNode *upstream_node;
|
||||
+ DWORD upstream_output;
|
||||
+
|
||||
+ if (SUCCEEDED(IMFTopologyNode_GetInput(node, input, &upstream_node, &upstream_output)))
|
||||
+ session_request_sample_from_node(session, upstream_node, upstream_output);
|
||||
+ }
|
||||
|
||||
/* Remaining unprocessed input has been discarded, now queue markers for every output. */
|
||||
if (drain)
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,27 +0,0 @@
|
||||
From b25ab6a73f44bdab1a4ce782a27a8b3f1213cf64 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Thu, 15 Oct 2020 12:18:10 -0500
|
||||
Subject: [PATCH] HACK: Flush decoder when changing times.
|
||||
|
||||
---
|
||||
dlls/mf/session.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/dlls/mf/session.c b/dlls/mf/session.c
|
||||
index 5a08a2eb6c6..a6bc7803390 100644
|
||||
--- a/dlls/mf/session.c
|
||||
+++ b/dlls/mf/session.c
|
||||
@@ -2326,7 +2326,10 @@ static void session_set_presentation_clock(struct media_session *session)
|
||||
LIST_FOR_EACH_ENTRY(node, &session->presentation.nodes, struct topo_node, entry)
|
||||
{
|
||||
if (node->type == MF_TOPOLOGY_TRANSFORM_NODE)
|
||||
+ {
|
||||
+ IMFTransform_ProcessMessage(node->object.transform, MFT_MESSAGE_COMMAND_FLUSH, 0);
|
||||
IMFTransform_ProcessMessage(node->object.transform, MFT_MESSAGE_NOTIFY_START_OF_STREAM, 0);
|
||||
+ }
|
||||
}
|
||||
|
||||
if (!(session->presentation.flags & SESSION_FLAG_PRESENTATION_CLOCK_SET))
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,163 +0,0 @@
|
||||
From 8b681e5bd589b330790a0e887f5dbcd380e84a05 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Mon, 2 Nov 2020 09:56:54 -0600
|
||||
Subject: [PATCH] winegstreamer: Add IMFSeekInfo::GetNearestKeyFrames stub.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/media_source.c | 111 ++++++++++++++++++++++++++++++
|
||||
1 file changed, 111 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index 655e765fee7..a0bce3cfe9d 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -92,6 +92,8 @@ struct source_async_command
|
||||
struct media_source
|
||||
{
|
||||
IMFMediaSource IMFMediaSource_iface;
|
||||
+ IMFGetService IMFGetService_iface;
|
||||
+ IMFSeekInfo IMFSeekInfo_iface;
|
||||
IMFAsyncCallback async_commands_callback;
|
||||
LONG ref;
|
||||
DWORD async_commands_queue;
|
||||
@@ -124,6 +126,16 @@ static inline struct media_source *impl_from_IMFMediaSource(IMFMediaSource *ifac
|
||||
return CONTAINING_RECORD(iface, struct media_source, IMFMediaSource_iface);
|
||||
}
|
||||
|
||||
+static inline struct media_source *impl_from_IMFGetService(IMFGetService *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct media_source, IMFGetService_iface);
|
||||
+}
|
||||
+
|
||||
+static inline struct media_source *impl_from_IMFSeekInfo(IMFSeekInfo *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct media_source, IMFSeekInfo_iface);
|
||||
+}
|
||||
+
|
||||
static inline struct media_source *impl_from_async_commands_callback_IMFAsyncCallback(IMFAsyncCallback *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, struct media_source, async_commands_callback);
|
||||
@@ -978,6 +990,10 @@ static HRESULT WINAPI media_source_QueryInterface(IMFMediaSource *iface, REFIID
|
||||
{
|
||||
*out = &source->IMFMediaSource_iface;
|
||||
}
|
||||
+ else if(IsEqualIID(riid, &IID_IMFGetService))
|
||||
+ {
|
||||
+ *out = &source->IMFGetService_iface;
|
||||
+ }
|
||||
else
|
||||
{
|
||||
FIXME("(%s, %p)\n", debugstr_guid(riid), out);
|
||||
@@ -1212,6 +1228,99 @@ static const IMFMediaSourceVtbl IMFMediaSource_vtbl =
|
||||
media_source_Shutdown,
|
||||
};
|
||||
|
||||
+static HRESULT WINAPI source_get_service_QueryInterface(IMFGetService *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct media_source *source = impl_from_IMFGetService(iface);
|
||||
+ return IMFMediaSource_QueryInterface(&source->IMFMediaSource_iface, riid, obj);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI source_get_service_AddRef(IMFGetService *iface)
|
||||
+{
|
||||
+ struct media_source *source = impl_from_IMFGetService(iface);
|
||||
+ return IMFMediaSource_AddRef(&source->IMFMediaSource_iface);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI source_get_service_Release(IMFGetService *iface)
|
||||
+{
|
||||
+ struct media_source *source = impl_from_IMFGetService(iface);
|
||||
+ return IMFMediaSource_Release(&source->IMFMediaSource_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI source_get_service_GetService(IMFGetService *iface, REFGUID service, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct media_source *source = impl_from_IMFGetService(iface);
|
||||
+
|
||||
+ TRACE("(%p)->(%s, %s, %p)\n", source, debugstr_guid(service), debugstr_guid(riid), obj);
|
||||
+
|
||||
+ if (source->state == SOURCE_SHUTDOWN)
|
||||
+ return MF_E_SHUTDOWN;
|
||||
+
|
||||
+ *obj = NULL;
|
||||
+
|
||||
+ if (IsEqualIID(service, &MF_SCRUBBING_SERVICE))
|
||||
+ {
|
||||
+ if (IsEqualIID(riid, &IID_IMFSeekInfo))
|
||||
+ {
|
||||
+ *obj = &source->IMFSeekInfo_iface;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (*obj)
|
||||
+ IUnknown_AddRef((IUnknown*) *obj);
|
||||
+
|
||||
+ return *obj ? S_OK : E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static const IMFGetServiceVtbl IMFGetService_vtbl =
|
||||
+{
|
||||
+ source_get_service_QueryInterface,
|
||||
+ source_get_service_AddRef,
|
||||
+ source_get_service_Release,
|
||||
+ source_get_service_GetService,
|
||||
+};
|
||||
+
|
||||
+static HRESULT WINAPI source_seek_info_QueryInterface(IMFSeekInfo *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct media_source *source = impl_from_IMFSeekInfo(iface);
|
||||
+ return IMFMediaSource_QueryInterface(&source->IMFMediaSource_iface, riid, obj);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI source_seek_info_AddRef(IMFSeekInfo *iface)
|
||||
+{
|
||||
+ struct media_source *source = impl_from_IMFSeekInfo(iface);
|
||||
+ return IMFMediaSource_AddRef(&source->IMFMediaSource_iface);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI source_seek_info_Release(IMFSeekInfo *iface)
|
||||
+{
|
||||
+ struct media_source *source = impl_from_IMFSeekInfo(iface);
|
||||
+ return IMFMediaSource_Release(&source->IMFMediaSource_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI source_seek_info_GetNearestKeyFrames(IMFSeekInfo *iface, const GUID *format,
|
||||
+ const PROPVARIANT *position, PROPVARIANT *prev_frame, PROPVARIANT *next_frame)
|
||||
+{
|
||||
+ struct media_source *source = impl_from_IMFSeekInfo(iface);
|
||||
+
|
||||
+ FIXME("(%p)->(%s, %p, %p, %p) - semi-stub\n", source, debugstr_guid(format), position, prev_frame, next_frame);
|
||||
+
|
||||
+ if (source->state == SOURCE_SHUTDOWN)
|
||||
+ return MF_E_SHUTDOWN;
|
||||
+
|
||||
+ PropVariantCopy(prev_frame, position);
|
||||
+ PropVariantCopy(next_frame, position);
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static const IMFSeekInfoVtbl IMFSeekInfo_vtbl =
|
||||
+{
|
||||
+ source_seek_info_QueryInterface,
|
||||
+ source_seek_info_AddRef,
|
||||
+ source_seek_info_Release,
|
||||
+ source_seek_info_GetNearestKeyFrames,
|
||||
+};
|
||||
+
|
||||
static void stream_added(GstElement *element, GstPad *pad, gpointer user)
|
||||
{
|
||||
struct media_source *source = user;
|
||||
@@ -1283,6 +1392,8 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
object->IMFMediaSource_iface.lpVtbl = &IMFMediaSource_vtbl;
|
||||
+ object->IMFGetService_iface.lpVtbl = &IMFGetService_vtbl;
|
||||
+ object->IMFSeekInfo_iface.lpVtbl = &IMFSeekInfo_vtbl;
|
||||
object->async_commands_callback.lpVtbl = &source_async_commands_callback_vtbl;
|
||||
object->ref = 1;
|
||||
object->byte_stream = bytestream;
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,122 +0,0 @@
|
||||
From 18dea0ccadf90b4ac523dc1073c3870fdd6bcf6a Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Fri, 6 Nov 2020 10:06:23 -0600
|
||||
Subject: [PATCH] winegstreamer: Fixup raw audio caps to be compatible with
|
||||
IMFMediaType.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/gst_private.h | 1 +
|
||||
dlls/winegstreamer/media_source.c | 7 +++-
|
||||
dlls/winegstreamer/mfplat.c | 57 +++++++++++++++++++++++++++++++
|
||||
3 files changed, 64 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h
|
||||
index 075e0ce1f0f..dcf76554b6d 100644
|
||||
--- a/dlls/winegstreamer/gst_private.h
|
||||
+++ b/dlls/winegstreamer/gst_private.h
|
||||
@@ -79,6 +79,7 @@ extern HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj)
|
||||
extern HRESULT mfplat_DllRegisterServer(void) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) DECLSPEC_HIDDEN;
|
||||
+GstCaps *make_mf_compatible_caps(GstCaps *caps) DECLSPEC_HIDDEN;
|
||||
IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) DECLSPEC_HIDDEN;
|
||||
GstCaps *caps_from_mf_media_type(IMFMediaType *type) DECLSPEC_HIDDEN;
|
||||
IMFSample *mf_sample_from_gst_buffer(GstBuffer *in) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index a0bce3cfe9d..5f3457e50b0 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -891,15 +891,20 @@ fail:
|
||||
|
||||
static HRESULT media_stream_init_desc(struct media_stream *stream)
|
||||
{
|
||||
- GstCaps *current_caps = gst_pad_get_current_caps(stream->their_src);
|
||||
+ GstCaps *base_caps = gst_pad_get_current_caps(stream->their_src);
|
||||
IMFMediaTypeHandler *type_handler = NULL;
|
||||
IMFMediaType **stream_types = NULL;
|
||||
IMFMediaType *stream_type = NULL;
|
||||
+ GstCaps *current_caps = make_mf_compatible_caps(base_caps);
|
||||
DWORD type_count = 0;
|
||||
const gchar *major_type;
|
||||
unsigned int i;
|
||||
HRESULT hr;
|
||||
|
||||
+ gst_caps_unref(base_caps);
|
||||
+ if (!current_caps)
|
||||
+ return E_FAIL;
|
||||
+
|
||||
major_type = gst_structure_get_name(gst_caps_get_structure(current_caps, 0));
|
||||
|
||||
if (!strcmp(major_type, "video/x-raw"))
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index 8d2d8996f22..a2873907437 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -710,6 +710,63 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps)
|
||||
return media_type;
|
||||
}
|
||||
|
||||
+GstCaps *make_mf_compatible_caps(GstCaps *caps)
|
||||
+{
|
||||
+ GstCaps *ret;
|
||||
+ IMFMediaType *media_type;
|
||||
+ GstStructure *structure;
|
||||
+ const char *mime_type;
|
||||
+
|
||||
+ if (gst_caps_get_size(caps) != 1)
|
||||
+ return NULL;
|
||||
+
|
||||
+ /* Optimization: Don't copy caps if no transformation is needed */
|
||||
+ if ((media_type = mf_media_type_from_caps(caps)))
|
||||
+ {
|
||||
+ IMFMediaType_Release(media_type);
|
||||
+ return gst_caps_ref(caps);
|
||||
+ }
|
||||
+
|
||||
+ ret = gst_caps_copy(caps);
|
||||
+ structure = gst_caps_get_structure(ret, 0);
|
||||
+ mime_type = gst_structure_get_name(structure);
|
||||
+
|
||||
+ if (!strcmp(mime_type, "audio/x-raw"))
|
||||
+ {
|
||||
+ const char *format;
|
||||
+ if ((format = gst_structure_get_string(structure, "format")))
|
||||
+ {
|
||||
+ char type;
|
||||
+ unsigned int bits_per_sample;
|
||||
+ char endian[2];
|
||||
+ char new_format[6];
|
||||
+
|
||||
+ if (strlen(format) <= 5 && (sscanf(format, "%c%u%2c", &type, &bits_per_sample, endian) >= 2))
|
||||
+ {
|
||||
+ if (type == 'U' || type == 'S')
|
||||
+ type = bits_per_sample == 8 ? 'U' : 'S';
|
||||
+
|
||||
+ if (endian[0] == 'B')
|
||||
+ endian[0] = 'L';
|
||||
+
|
||||
+ sprintf(new_format, "%c%u%.2s", type, bits_per_sample, bits_per_sample > 8 ? endian : 0);
|
||||
+ gst_caps_set_simple(caps, "format", G_TYPE_STRING, new_format, NULL);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if ((media_type = mf_media_type_from_caps(ret)))
|
||||
+ IMFMediaType_Release(media_type);
|
||||
+
|
||||
+ if (!media_type)
|
||||
+ {
|
||||
+ gst_caps_unref(ret);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
GstCaps *caps_from_mf_media_type(IMFMediaType *type)
|
||||
{
|
||||
GUID major_type;
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,45 +0,0 @@
|
||||
From fe0175d8676cbd15ddeac07876e726ef76eef7b5 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Mon, 2 Nov 2020 10:18:27 -0600
|
||||
Subject: [PATCH] winegstreamer: Set MF_PD_MIME_TYPE on source's presentation
|
||||
descriptor.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/media_source.c | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index 5f3457e50b0..1bbbb2ffd81 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -1377,6 +1377,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
GST_STATIC_PAD_TEMPLATE("mf_src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY);
|
||||
|
||||
IMFStreamDescriptor **descriptors = NULL;
|
||||
+ IMFAttributes *byte_stream_attributes;
|
||||
struct media_source *object;
|
||||
gint64 total_pres_time = 0;
|
||||
DWORD bytestream_caps;
|
||||
@@ -1520,6 +1521,18 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
if (object->stream_count)
|
||||
IMFPresentationDescriptor_SetUINT64(object->pres_desc, &MF_PD_DURATION, total_pres_time / 100);
|
||||
|
||||
+ if (SUCCEEDED(IMFByteStream_QueryInterface(object->byte_stream, &IID_IMFAttributes, (void **)&byte_stream_attributes)))
|
||||
+ {
|
||||
+ WCHAR *mimeW = NULL;
|
||||
+ DWORD length;
|
||||
+ if (SUCCEEDED(IMFAttributes_GetAllocatedString(byte_stream_attributes, &MF_BYTESTREAM_CONTENT_TYPE, &mimeW, &length)))
|
||||
+ {
|
||||
+ IMFPresentationDescriptor_SetString(object->pres_desc, &MF_PD_MIME_TYPE, mimeW);
|
||||
+ CoTaskMemFree(mimeW);
|
||||
+ }
|
||||
+ IMFAttributes_Release(byte_stream_attributes);
|
||||
+ }
|
||||
+
|
||||
object->state = SOURCE_STOPPED;
|
||||
|
||||
*out_media_source = object;
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,141 +0,0 @@
|
||||
From 7bb33ab950fe2fdddcd5e7409827be982044f813 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 15 Sep 2020 14:25:26 -0500
|
||||
Subject: [PATCH] winegstreamer: Insert parser into pipeline to rectify type
|
||||
differences.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/media_source.c | 95 ++++++++++++++++++++++++++++++-
|
||||
1 file changed, 92 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index 1bbbb2ffd81..aecf4f27375 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -791,8 +791,17 @@ static const IMFMediaStreamVtbl media_stream_vtbl =
|
||||
media_stream_RequestSample
|
||||
};
|
||||
|
||||
-/* Setup a chain of elements which should hopefully allow transformations to any IMFMediaType
|
||||
- the user throws at us through gstreamer's caps negotiation. */
|
||||
+/* There are two paths this function can take.
|
||||
+ 1) In the first path, we are acting as a real media source, purely demuxing the input data,
|
||||
+ in whichever format it may be in, and passing it along. However, there can be different ways
|
||||
+ to interpret the same streams. Subtypes in MF usually carry an implicit meaning, so we define
|
||||
+ what caps an IMFMediaType corresponds to in mfplat.c, and insert a parser between decodebin
|
||||
+ and the appsink, which usually can resolve these differences. As an example, MFVideoFormat_H264
|
||||
+ implies stream-format=byte-stream, and inserting h264parse can transform stream-format=avc
|
||||
+ into stream-format=byte-stream.
|
||||
+ 2) In the second path, we are dealing with x-raw output from decodebin. In this case, we just
|
||||
+ have to setup a chain of elements which should hopefully allow transformations to any IMFMediaType
|
||||
+ the user throws at us through gstreamer's caps negotiation.*/
|
||||
static HRESULT media_stream_connect_to_sink(struct media_stream *stream)
|
||||
{
|
||||
GstCaps *source_caps = gst_pad_query_caps(stream->their_src, NULL);
|
||||
@@ -832,7 +841,68 @@ static HRESULT media_stream_connect_to_sink(struct media_stream *stream)
|
||||
}
|
||||
else
|
||||
{
|
||||
- stream->my_sink = gst_element_get_static_pad(stream->appsink, "sink");
|
||||
+ GstElement *parser = NULL;
|
||||
+ GstCaps *target_caps;
|
||||
+
|
||||
+ assert(gst_caps_is_fixed(source_caps));
|
||||
+
|
||||
+ if (!(target_caps = make_mf_compatible_caps(source_caps)))
|
||||
+ {
|
||||
+ gst_caps_unref(source_caps);
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+
|
||||
+ g_object_set(stream->appsink, "caps", target_caps, NULL);
|
||||
+
|
||||
+ if (!(gst_caps_is_equal(source_caps, target_caps)))
|
||||
+ {
|
||||
+ GList *parser_list_one, *parser_list_two;
|
||||
+ GstElementFactory *parser_factory;
|
||||
+
|
||||
+ parser_list_one = gst_element_factory_list_get_elements(GST_ELEMENT_FACTORY_TYPE_PARSER, 1);
|
||||
+
|
||||
+ parser_list_two = gst_element_factory_list_filter(parser_list_one, source_caps, GST_PAD_SINK, 0);
|
||||
+ gst_plugin_feature_list_free(parser_list_one);
|
||||
+ parser_list_one = parser_list_two;
|
||||
+
|
||||
+ parser_list_two = gst_element_factory_list_filter(parser_list_one, target_caps, GST_PAD_SRC, 0);
|
||||
+ gst_plugin_feature_list_free(parser_list_one);
|
||||
+ parser_list_one = parser_list_two;
|
||||
+ gst_caps_unref(target_caps);
|
||||
+
|
||||
+ if (!(g_list_length(parser_list_one)))
|
||||
+ {
|
||||
+ gst_plugin_feature_list_free(parser_list_one);
|
||||
+ ERR("Failed to find parser for stream\n");
|
||||
+ gst_caps_unref(source_caps);
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+
|
||||
+ parser_factory = g_list_first(parser_list_one)->data;
|
||||
+ TRACE("Found parser %s.\n", GST_ELEMENT_NAME(parser_factory));
|
||||
+
|
||||
+ parser = gst_element_factory_create(parser_factory, NULL);
|
||||
+
|
||||
+ gst_plugin_feature_list_free(parser_list_one);
|
||||
+
|
||||
+ if (!parser)
|
||||
+ {
|
||||
+ gst_caps_unref(source_caps);
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+
|
||||
+ gst_bin_add(GST_BIN(stream->parent_source->container), parser);
|
||||
+
|
||||
+ assert(gst_element_link(parser, stream->appsink));
|
||||
+
|
||||
+ gst_element_sync_state_with_parent(parser);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ gst_caps_unref(target_caps);
|
||||
+ }
|
||||
+
|
||||
+ stream->my_sink = gst_element_get_static_pad(parser ? parser : stream->appsink, "sink");
|
||||
}
|
||||
|
||||
if (gst_pad_link(stream->their_src, stream->my_sink) != GST_PAD_LINK_OK)
|
||||
@@ -1326,6 +1396,23 @@ static const IMFSeekInfoVtbl IMFSeekInfo_vtbl =
|
||||
source_seek_info_GetNearestKeyFrames,
|
||||
};
|
||||
|
||||
+/* If this callback is extended to use any significant win32 APIs, a wrapper function
|
||||
+ should be added */
|
||||
+gboolean stream_found(GstElement *bin, GstPad *pad, GstCaps *caps, gpointer user)
|
||||
+{
|
||||
+ GstCaps *target_caps;
|
||||
+
|
||||
+ /* if the stream can be converted into an MF compatible type, we'll go that route
|
||||
+ otherwise, we'll rely on decodebin for the whole process */
|
||||
+
|
||||
+ if ((target_caps = make_mf_compatible_caps(caps)))
|
||||
+ {
|
||||
+ gst_caps_unref(target_caps);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
static void stream_added(GstElement *element, GstPad *pad, gpointer user)
|
||||
{
|
||||
struct media_source *source = user;
|
||||
@@ -1445,6 +1532,8 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
|
||||
gst_bin_add(GST_BIN(object->container), object->decodebin);
|
||||
|
||||
+ if(!GetEnvironmentVariableA("MF_DECODE_IN_SOURCE", NULL, 0))
|
||||
+ g_signal_connect(object->decodebin, "autoplug-continue", G_CALLBACK(stream_found), object);
|
||||
g_signal_connect(object->decodebin, "pad-added", G_CALLBACK(mf_src_stream_added_wrapper), object);
|
||||
g_signal_connect(object->decodebin, "pad-removed", G_CALLBACK(mf_src_stream_removed_wrapper), object);
|
||||
g_signal_connect(object->decodebin, "no-more-pads", G_CALLBACK(mf_src_no_more_pads_wrapper), object);
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,113 +0,0 @@
|
||||
From d95e8d8349b884800066c9af1ea9a7c7492ca02c Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 24 Mar 2020 16:00:26 -0500
|
||||
Subject: [PATCH] winegstreamer: Translate H.264 caps to attributes.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/mfplat.c | 75 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 75 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index a2873907437..afce3d9831a 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 "codecapi.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
@@ -629,6 +630,74 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps)
|
||||
}
|
||||
}
|
||||
}
|
||||
+ else if (!(strcmp(mime_type, "video/x-h264")))
|
||||
+ {
|
||||
+ const char *profile, *level;
|
||||
+
|
||||
+ /* validation */
|
||||
+ if (strcmp(gst_structure_get_string(info, "stream-format"), "byte-stream"))
|
||||
+ return NULL;
|
||||
+ if (strcmp(gst_structure_get_string(info, "alignment"), "au"))
|
||||
+ return NULL;
|
||||
+ if (gst_structure_get_value(info, "codec-data"))
|
||||
+ return NULL;
|
||||
+
|
||||
+ /* conversion */
|
||||
+ IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFVideoFormat_H264);
|
||||
+ IMFMediaType_SetUINT32(media_type, &MF_MT_COMPRESSED, TRUE);
|
||||
+
|
||||
+ if ((profile = gst_structure_get_string(info, "profile")))
|
||||
+ {
|
||||
+ if (!(strcmp(profile, "main")))
|
||||
+ IMFMediaType_SetUINT32(media_type, &MF_MT_MPEG2_PROFILE, eAVEncH264VProfile_Main);
|
||||
+ else if (!(strcmp(profile, "high")))
|
||||
+ IMFMediaType_SetUINT32(media_type, &MF_MT_MPEG2_PROFILE, eAVEncH264VProfile_High);
|
||||
+ else if (!(strcmp(profile, "high-4:4:4")))
|
||||
+ IMFMediaType_SetUINT32(media_type, &MF_MT_MPEG2_PROFILE, eAVEncH264VProfile_444);
|
||||
+ else
|
||||
+ FIXME("Unrecognized profile %s\n", profile);
|
||||
+ }
|
||||
+ if ((level = gst_structure_get_string(info, "level")))
|
||||
+ {
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ const static struct
|
||||
+ {
|
||||
+ const char *name;
|
||||
+ enum eAVEncH264VLevel val;
|
||||
+ } levels[] =
|
||||
+ {
|
||||
+ {"1", eAVEncH264VLevel1},
|
||||
+ {"1.1", eAVEncH264VLevel1_1},
|
||||
+ {"1.2", eAVEncH264VLevel1_2},
|
||||
+ {"1.3", eAVEncH264VLevel1_3},
|
||||
+ {"2", eAVEncH264VLevel2},
|
||||
+ {"2.1", eAVEncH264VLevel2_1},
|
||||
+ {"2.2", eAVEncH264VLevel2_2},
|
||||
+ {"3", eAVEncH264VLevel3},
|
||||
+ {"3.1", eAVEncH264VLevel3_1},
|
||||
+ {"3.2", eAVEncH264VLevel3_2},
|
||||
+ {"4", eAVEncH264VLevel4},
|
||||
+ {"4.1", eAVEncH264VLevel4_1},
|
||||
+ {"4.2", eAVEncH264VLevel4_2},
|
||||
+ {"5", eAVEncH264VLevel5},
|
||||
+ {"5.1", eAVEncH264VLevel5_1},
|
||||
+ {"5.2", eAVEncH264VLevel5_2},
|
||||
+ };
|
||||
+ for (i = 0 ; i < ARRAY_SIZE(levels); i++)
|
||||
+ {
|
||||
+ if (!(strcmp(level, levels[i].name)))
|
||||
+ {
|
||||
+ IMFMediaType_SetUINT32(media_type, &MF_MT_MPEG2_LEVEL, levels[i].val);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ if (i == ARRAY_SIZE(levels))
|
||||
+ {
|
||||
+ FIXME("Unrecognized level %s", level);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
{
|
||||
FIXME("Unrecognized video format %s\n", mime_type);
|
||||
@@ -754,6 +823,12 @@ GstCaps *make_mf_compatible_caps(GstCaps *caps)
|
||||
}
|
||||
}
|
||||
}
|
||||
+ else if (!strcmp(mime_type, "video/x-h264"))
|
||||
+ {
|
||||
+ gst_caps_set_simple(ret, "stream-format", G_TYPE_STRING, "byte-stream", NULL);
|
||||
+ gst_caps_set_simple(ret, "alignment", G_TYPE_STRING, "au", NULL);
|
||||
+ gst_structure_remove_field(structure, "codec_data");
|
||||
+ }
|
||||
|
||||
if ((media_type = mf_media_type_from_caps(ret)))
|
||||
IMFMediaType_Release(media_type);
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,82 +0,0 @@
|
||||
From 10dcfecc84651a4c2a270960c585c735ff09ec1c Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 24 Mar 2020 16:01:20 -0500
|
||||
Subject: [PATCH] winegstreamer: Translate WMV caps to attributes.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/mfplat.c | 51 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 51 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index afce3d9831a..6906fd3faeb 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -564,6 +564,24 @@ uncompressed_video_formats[] =
|
||||
{&MFVideoFormat_RGB555, GST_VIDEO_FORMAT_BGR15},
|
||||
};
|
||||
|
||||
+static void codec_data_to_user_data(GstStructure *structure, IMFMediaType *type)
|
||||
+{
|
||||
+ const GValue *codec_data;
|
||||
+
|
||||
+ if ((codec_data = gst_structure_get_value(structure, "codec_data")))
|
||||
+ {
|
||||
+ GstBuffer *codec_data_buffer = gst_value_get_buffer(codec_data);
|
||||
+ if (codec_data_buffer)
|
||||
+ {
|
||||
+ gsize codec_data_size = gst_buffer_get_size(codec_data_buffer);
|
||||
+ gpointer codec_data_raw = heap_alloc(codec_data_size);
|
||||
+ gst_buffer_extract(codec_data_buffer, 0, codec_data_raw, codec_data_size);
|
||||
+ IMFMediaType_SetBlob(type, &MF_MT_USER_DATA, codec_data_raw, codec_data_size);
|
||||
+ heap_free(codec_data_raw);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* returns NULL if doesn't match exactly */
|
||||
IMFMediaType *mf_media_type_from_caps(const GstCaps *caps)
|
||||
{
|
||||
@@ -698,6 +716,39 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps)
|
||||
}
|
||||
}
|
||||
}
|
||||
+ else if (!(strcmp(mime_type, "video/x-wmv")))
|
||||
+ {
|
||||
+ gint wmv_version;
|
||||
+ const char *format;
|
||||
+
|
||||
+ if (gst_structure_get_int(info, "wmvversion", &wmv_version))
|
||||
+ {
|
||||
+ switch (wmv_version)
|
||||
+ {
|
||||
+ case 1:
|
||||
+ IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFVideoFormat_WMV1);
|
||||
+ break;
|
||||
+ case 2:
|
||||
+ IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFVideoFormat_WMV2);
|
||||
+ break;
|
||||
+ case 3:
|
||||
+ IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFVideoFormat_WMV3);
|
||||
+ break;
|
||||
+ default:
|
||||
+ FIXME("Unrecognized wmvversion %d\n", wmv_version);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if ((format = gst_structure_get_string(info, "format")))
|
||||
+ {
|
||||
+ if (!(strcmp(format, "WVC1")))
|
||||
+ IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFVideoFormat_WVC1);
|
||||
+ else
|
||||
+ FIXME("Unrecognized format %s\n", format);
|
||||
+ }
|
||||
+
|
||||
+ codec_data_to_user_data(info, media_type);
|
||||
+ }
|
||||
else
|
||||
{
|
||||
FIXME("Unrecognized video format %s\n", mime_type);
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,139 +0,0 @@
|
||||
From 90d881fc889fdaedc7e44c0bee5e54634c0d065c Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 24 Mar 2020 16:02:27 -0500
|
||||
Subject: [PATCH] winegstreamer: Translate AAC caps to attributes.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/mfplat.c | 108 ++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 108 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index 6906fd3faeb..66048f359e5 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -564,6 +564,15 @@ uncompressed_video_formats[] =
|
||||
{&MFVideoFormat_RGB555, GST_VIDEO_FORMAT_BGR15},
|
||||
};
|
||||
|
||||
+struct aac_user_data
|
||||
+{
|
||||
+ WORD payload_type;
|
||||
+ WORD profile_level_indication;
|
||||
+ WORD struct_type;
|
||||
+ WORD reserved;
|
||||
+ /* audio-specific-config is stored here */
|
||||
+};
|
||||
+
|
||||
static void codec_data_to_user_data(GstStructure *structure, IMFMediaType *type)
|
||||
{
|
||||
const GValue *codec_data;
|
||||
@@ -814,6 +823,105 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps)
|
||||
|
||||
IMFMediaType_SetUINT32(media_type, &MF_MT_AUDIO_BITS_PER_SAMPLE, depth);
|
||||
}
|
||||
+ else if (!(strcmp(mime_type, "audio/mpeg")))
|
||||
+ {
|
||||
+ int mpeg_version = -1;
|
||||
+
|
||||
+ IMFMediaType_SetUINT32(media_type, &MF_MT_COMPRESSED, TRUE);
|
||||
+
|
||||
+ if (!(gst_structure_get_int(info, "mpegversion", &mpeg_version)))
|
||||
+ ERR("Failed to get mpegversion\n");
|
||||
+ switch (mpeg_version)
|
||||
+ {
|
||||
+ case 2:
|
||||
+ case 4:
|
||||
+ {
|
||||
+ const char *format, *profile, *level;
|
||||
+ DWORD profile_level_indication = 0;
|
||||
+ const GValue *codec_data;
|
||||
+ DWORD asc_size = 0;
|
||||
+ struct aac_user_data *user_data = NULL;
|
||||
+
|
||||
+ IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFAudioFormat_AAC);
|
||||
+ IMFMediaType_SetUINT32(media_type, &MF_MT_AUDIO_BITS_PER_SAMPLE, 16);
|
||||
+
|
||||
+ codec_data = gst_structure_get_value(info, "codec_data");
|
||||
+ if (codec_data)
|
||||
+ {
|
||||
+ GstBuffer *codec_data_buffer = gst_value_get_buffer(codec_data);
|
||||
+ if (codec_data_buffer)
|
||||
+ {
|
||||
+ if ((asc_size = gst_buffer_get_size(codec_data_buffer)) >= 2)
|
||||
+ {
|
||||
+ user_data = heap_alloc_zero(sizeof(*user_data)+asc_size);
|
||||
+ gst_buffer_extract(codec_data_buffer, 0, (gpointer)(user_data + 1), asc_size);
|
||||
+ }
|
||||
+ else
|
||||
+ ERR("Unexpected buffer size\n");
|
||||
+ }
|
||||
+ else
|
||||
+ ERR("codec_data not a buffer\n");
|
||||
+ }
|
||||
+ else
|
||||
+ ERR("codec_data not found\n");
|
||||
+ if (!user_data)
|
||||
+ user_data = heap_alloc_zero(sizeof(*user_data));
|
||||
+
|
||||
+ if ((format = gst_structure_get_string(info, "stream-format")))
|
||||
+ {
|
||||
+ DWORD payload_type = -1;
|
||||
+ if (!(strcmp(format, "raw")))
|
||||
+ payload_type = 0;
|
||||
+ else if (!(strcmp(format, "adts")))
|
||||
+ payload_type = 1;
|
||||
+ else if (!(strcmp(format, "adif")))
|
||||
+ payload_type = 2;
|
||||
+ else if (!(strcmp(format, "loas")))
|
||||
+ payload_type = 3;
|
||||
+ else
|
||||
+ FIXME("Unrecognized stream-format\n");
|
||||
+ if (payload_type != -1)
|
||||
+ {
|
||||
+ IMFMediaType_SetUINT32(media_type, &MF_MT_AAC_PAYLOAD_TYPE, payload_type);
|
||||
+ user_data->payload_type = payload_type;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ ERR("Stream format not present\n");
|
||||
+ }
|
||||
+
|
||||
+ profile = gst_structure_get_string(info, "profile");
|
||||
+ level = gst_structure_get_string(info, "level");
|
||||
+ /* Data from http://archive.is/whp6P#45% */
|
||||
+ if (profile && level)
|
||||
+ {
|
||||
+ if (!(strcmp(profile, "lc")) && !(strcmp(level, "2")))
|
||||
+ profile_level_indication = 0x29;
|
||||
+ else if (!(strcmp(profile, "lc")) && !(strcmp(level, "4")))
|
||||
+ profile_level_indication = 0x2A;
|
||||
+ else if (!(strcmp(profile, "lc")) && !(strcmp(level, "5")))
|
||||
+ profile_level_indication = 0x2B;
|
||||
+ else
|
||||
+ FIXME("Unhandled profile/level combo\n");
|
||||
+ }
|
||||
+ else
|
||||
+ ERR("Profile or level not present\n");
|
||||
+
|
||||
+ if (profile_level_indication)
|
||||
+ {
|
||||
+ IMFMediaType_SetUINT32(media_type, &MF_MT_AAC_AUDIO_PROFILE_LEVEL_INDICATION, profile_level_indication);
|
||||
+ user_data->profile_level_indication = profile_level_indication;
|
||||
+ }
|
||||
+
|
||||
+ IMFMediaType_SetBlob(media_type, &MF_MT_USER_DATA, (BYTE *)user_data, sizeof(*user_data) + asc_size);
|
||||
+ heap_free(user_data);
|
||||
+ break;
|
||||
+ }
|
||||
+ default:
|
||||
+ FIXME("Unhandled mpegversion %d\n", mpeg_version);
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
{
|
||||
FIXME("Unrecognized audio format %s\n", mime_type);
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,40 +0,0 @@
|
||||
From c4955ec1798428fe9941cdbb9fed146f3d29dbe2 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Wed, 25 Mar 2020 13:36:19 -0500
|
||||
Subject: [PATCH] winegstreamer: Translate MPEG-4 Section-2 caps to attributes.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/mfplat.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index 66048f359e5..090952e7d2b 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -758,6 +758,22 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps)
|
||||
|
||||
codec_data_to_user_data(info, media_type);
|
||||
}
|
||||
+ else if (!(strcmp(mime_type, "video/mpeg")))
|
||||
+ {
|
||||
+ gint mpegversion;
|
||||
+ if (gst_structure_get_int(info, "mpegversion", &mpegversion))
|
||||
+ {
|
||||
+ if (mpegversion == 4)
|
||||
+ {
|
||||
+ IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFVideoFormat_M4S2);
|
||||
+ IMFMediaType_SetUINT32(media_type, &MF_MT_COMPRESSED, TRUE);
|
||||
+
|
||||
+ codec_data_to_user_data(info, media_type);
|
||||
+ }
|
||||
+ else
|
||||
+ FIXME("Unrecognized mpeg version %d\n", mpegversion);
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
{
|
||||
FIXME("Unrecognized video format %s\n", mime_type);
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,48 +0,0 @@
|
||||
From 56ac324cb533bde61e25bc86a29440aec7111764 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 12 May 2020 17:05:41 -0500
|
||||
Subject: [PATCH] winegstreamer: Translate WMA caps to attributes.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/mfplat.c | 24 ++++++++++++++++++++++++
|
||||
1 file changed, 24 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index 090952e7d2b..b2f8f0b83c1 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -938,6 +938,30 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps)
|
||||
FIXME("Unhandled mpegversion %d\n", mpeg_version);
|
||||
}
|
||||
}
|
||||
+ else if (!(strcmp(mime_type, "audio/x-wma")))
|
||||
+ {
|
||||
+ gint wma_version, block_align;
|
||||
+
|
||||
+ if (gst_structure_get_int(info, "wmaversion", &wma_version))
|
||||
+ {
|
||||
+ switch (wma_version)
|
||||
+ {
|
||||
+ case 2:
|
||||
+ IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFAudioFormat_WMAudioV8);
|
||||
+ break;
|
||||
+ case 3:
|
||||
+ IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFAudioFormat_WMAudioV9);
|
||||
+ break;
|
||||
+ default:
|
||||
+ FIXME("Unrecognized wmaversion %d\n", wma_version);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (gst_structure_get_int(info, "block_align", &block_align))
|
||||
+ IMFMediaType_SetUINT32(media_type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, block_align);
|
||||
+
|
||||
+ codec_data_to_user_data(info, media_type);
|
||||
+ }
|
||||
else
|
||||
{
|
||||
FIXME("Unrecognized audio format %s\n", mime_type);
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,128 +0,0 @@
|
||||
From 6ace23bd172cb48c7e326fd3013624a73cdf8c10 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 24 Mar 2020 16:18:40 -0500
|
||||
Subject: [PATCH] winegstreamer: Translate H.264 attributes to caps.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/mfplat.c | 90 +++++++++++++++++++++++++++++--------
|
||||
1 file changed, 71 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index b2f8f0b83c1..e02f0dfbc5c 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -1056,10 +1056,6 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type)
|
||||
{
|
||||
UINT64 frame_rate = 0, frame_size = 0;
|
||||
DWORD width, height;
|
||||
- GstVideoFormat format = GST_VIDEO_FORMAT_UNKNOWN;
|
||||
- GUID subtype_base;
|
||||
- GstVideoInfo info;
|
||||
- unsigned int i;
|
||||
|
||||
if (FAILED(IMFMediaType_GetUINT64(type, &MF_MT_FRAME_SIZE, &frame_size)))
|
||||
return NULL;
|
||||
@@ -1068,28 +1064,84 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type)
|
||||
|
||||
output = gst_caps_new_empty_simple("video/x-raw");
|
||||
|
||||
- for (i = 0; i < ARRAY_SIZE(uncompressed_video_formats); i++)
|
||||
+ if (IsEqualGUID(&subtype, &MFVideoFormat_H264))
|
||||
{
|
||||
- if (IsEqualGUID(uncompressed_video_formats[i].subtype, &subtype))
|
||||
+ enum eAVEncH264VProfile h264_profile;
|
||||
+ enum eAVEncH264VLevel h264_level;
|
||||
+ output = gst_caps_new_empty_simple("video/x-h264");
|
||||
+ gst_caps_set_simple(output, "stream-format", G_TYPE_STRING, "byte-stream", NULL);
|
||||
+ gst_caps_set_simple(output, "alignment", G_TYPE_STRING, "au", NULL);
|
||||
+
|
||||
+ if (SUCCEEDED(IMFMediaType_GetUINT32(type, &MF_MT_MPEG2_PROFILE, &h264_profile)))
|
||||
+ {
|
||||
+ const char *profile = NULL;
|
||||
+ switch (h264_profile)
|
||||
+ {
|
||||
+ case eAVEncH264VProfile_Main: profile = "main"; break;
|
||||
+ case eAVEncH264VProfile_High: profile = "high"; break;
|
||||
+ case eAVEncH264VProfile_444: profile = "high-4:4:4"; break;
|
||||
+ default: FIXME("Unknown profile %u\n", h264_profile);
|
||||
+ }
|
||||
+ if (profile)
|
||||
+ gst_caps_set_simple(output, "profile", G_TYPE_STRING, profile, NULL);
|
||||
+ }
|
||||
+ if (SUCCEEDED(IMFMediaType_GetUINT32(type, &MF_MT_MPEG2_LEVEL, &h264_level)))
|
||||
{
|
||||
- format = uncompressed_video_formats[i].format;
|
||||
- break;
|
||||
+ const char *level = NULL;
|
||||
+ switch (h264_level)
|
||||
+ {
|
||||
+ case eAVEncH264VLevel1: level = "1"; break;
|
||||
+ case eAVEncH264VLevel1_1: level = "1.1"; break;
|
||||
+ case eAVEncH264VLevel1_2: level = "1.2"; break;
|
||||
+ case eAVEncH264VLevel1_3: level = "1.3"; break;
|
||||
+ case eAVEncH264VLevel2: level = "2"; break;
|
||||
+ case eAVEncH264VLevel2_1: level = "2.1"; break;
|
||||
+ case eAVEncH264VLevel2_2: level = "2.2"; break;
|
||||
+ case eAVEncH264VLevel3: level = "3"; break;
|
||||
+ case eAVEncH264VLevel3_1: level = "3.1"; break;
|
||||
+ case eAVEncH264VLevel3_2: level = "3.2"; break;
|
||||
+ case eAVEncH264VLevel4: level = "4"; break;
|
||||
+ case eAVEncH264VLevel4_1: level = "4.1"; break;
|
||||
+ case eAVEncH264VLevel4_2: level = "4.2"; break;
|
||||
+ case eAVEncH264VLevel5: level = "5"; break;
|
||||
+ case eAVEncH264VLevel5_1: level = "5.1"; break;
|
||||
+ case eAVEncH264VLevel5_2: level = "5.2"; break;
|
||||
+ default: FIXME("Unknown level %u\n", h264_level);
|
||||
+ }
|
||||
+ if (level)
|
||||
+ gst_caps_set_simple(output, "level", G_TYPE_STRING, level, NULL);
|
||||
}
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ GstVideoFormat format = GST_VIDEO_FORMAT_UNKNOWN;
|
||||
+ GUID subtype_base;
|
||||
+ GstVideoInfo info;
|
||||
+ unsigned int i;
|
||||
|
||||
- subtype_base = subtype;
|
||||
- subtype_base.Data1 = 0;
|
||||
- if (format == GST_VIDEO_FORMAT_UNKNOWN && IsEqualGUID(&MFVideoFormat_Base, &subtype_base))
|
||||
- format = gst_video_format_from_fourcc(subtype.Data1);
|
||||
+ for (i = 0; i < ARRAY_SIZE(uncompressed_video_formats); i++)
|
||||
+ {
|
||||
+ if (IsEqualGUID(uncompressed_video_formats[i].subtype, &subtype))
|
||||
+ {
|
||||
+ format = uncompressed_video_formats[i].format;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- if (format == GST_VIDEO_FORMAT_UNKNOWN)
|
||||
- {
|
||||
- FIXME("Unrecognized format %s\n", debugstr_guid(&subtype));
|
||||
- return NULL;
|
||||
- }
|
||||
+ subtype_base = subtype;
|
||||
+ subtype_base.Data1 = 0;
|
||||
+ if (format == GST_VIDEO_FORMAT_UNKNOWN && IsEqualGUID(&MFVideoFormat_Base, &subtype_base))
|
||||
+ format = gst_video_format_from_fourcc(subtype.Data1);
|
||||
|
||||
- gst_video_info_set_format(&info, format, width, height);
|
||||
- output = gst_video_info_to_caps(&info);
|
||||
+ if (format == GST_VIDEO_FORMAT_UNKNOWN)
|
||||
+ {
|
||||
+ FIXME("Unrecognized format %s\n", debugstr_guid(&subtype));
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ gst_video_info_set_format(&info, format, width, height);
|
||||
+ output = gst_video_info_to_caps(&info);
|
||||
+ }
|
||||
|
||||
if (frame_size)
|
||||
{
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,82 +0,0 @@
|
||||
From 5f71506e9482e475bb636a4d3738734afe004443 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 24 Mar 2020 16:20:17 -0500
|
||||
Subject: [PATCH] winegstreamer: Translate WMV attributes to caps.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/mfplat.c | 51 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 51 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index e02f0dfbc5c..2456d633c6c 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -1041,6 +1041,21 @@ GstCaps *make_mf_compatible_caps(GstCaps *caps)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static void user_data_to_codec_data(IMFMediaType *type, GstCaps *caps)
|
||||
+{
|
||||
+ BYTE *user_data;
|
||||
+ DWORD user_data_size;
|
||||
+
|
||||
+ if (SUCCEEDED(IMFMediaType_GetAllocatedBlob(type, &MF_MT_USER_DATA, &user_data, &user_data_size)))
|
||||
+ {
|
||||
+ GstBuffer *codec_data_buffer = gst_buffer_new_allocate(NULL, user_data_size, NULL);
|
||||
+ gst_buffer_fill(codec_data_buffer, 0, user_data, user_data_size);
|
||||
+ gst_caps_set_simple(caps, "codec_data", GST_TYPE_BUFFER, codec_data_buffer, NULL);
|
||||
+ gst_buffer_unref(codec_data_buffer);
|
||||
+ CoTaskMemFree(user_data);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
GstCaps *caps_from_mf_media_type(IMFMediaType *type)
|
||||
{
|
||||
GUID major_type;
|
||||
@@ -1112,6 +1127,42 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type)
|
||||
gst_caps_set_simple(output, "level", G_TYPE_STRING, level, NULL);
|
||||
}
|
||||
}
|
||||
+ else if (IsEqualGUID(&subtype, &MFVideoFormat_WMV1))
|
||||
+ {
|
||||
+ output = gst_caps_new_empty_simple("video/x-wmv");
|
||||
+ gst_caps_set_simple(output, "format", G_TYPE_STRING, "WMV1", NULL);
|
||||
+
|
||||
+ gst_caps_set_simple(output, "wmvversion", G_TYPE_INT, 1, NULL);
|
||||
+
|
||||
+ user_data_to_codec_data(type, output);
|
||||
+ }
|
||||
+ else if (IsEqualGUID(&subtype, &MFVideoFormat_WMV2))
|
||||
+ {
|
||||
+ output = gst_caps_new_empty_simple("video/x-wmv");
|
||||
+ gst_caps_set_simple(output, "format", G_TYPE_STRING, "WMV2", NULL);
|
||||
+
|
||||
+ gst_caps_set_simple(output, "wmvversion", G_TYPE_INT, 2, NULL);
|
||||
+
|
||||
+ user_data_to_codec_data(type, output);
|
||||
+ }
|
||||
+ else if (IsEqualGUID(&subtype, &MFVideoFormat_WMV3))
|
||||
+ {
|
||||
+ output = gst_caps_new_empty_simple("video/x-wmv");
|
||||
+ gst_caps_set_simple(output, "format", G_TYPE_STRING, "WMV3", NULL);
|
||||
+
|
||||
+ gst_caps_set_simple(output, "wmvversion", G_TYPE_INT, 3, NULL);
|
||||
+
|
||||
+ user_data_to_codec_data(type, output);
|
||||
+ }
|
||||
+ else if (IsEqualGUID(&subtype, &MFVideoFormat_WVC1))
|
||||
+ {
|
||||
+ output = gst_caps_new_empty_simple("video/x-wmv");
|
||||
+ gst_caps_set_simple(output, "format", G_TYPE_STRING, "WVC1", NULL);
|
||||
+
|
||||
+ gst_caps_set_simple(output, "wmvversion", G_TYPE_INT, 3, NULL);
|
||||
+
|
||||
+ user_data_to_codec_data(type, output);
|
||||
+ }
|
||||
else
|
||||
{
|
||||
GstVideoFormat format = GST_VIDEO_FORMAT_UNKNOWN;
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,90 +0,0 @@
|
||||
From 09b135accfd48e079d6a2a3862e647b66b872b15 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 21 Apr 2020 10:31:02 -0500
|
||||
Subject: [PATCH] winegstreamer: Translate AAC attributes to caps.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/mfplat.c | 66 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 66 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index 2456d633c6c..b1f83f4fa6c 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -1255,6 +1255,72 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
+ else if (IsEqualGUID(&subtype, &MFAudioFormat_AAC))
|
||||
+ {
|
||||
+ DWORD payload_type, indication;
|
||||
+ struct aac_user_data *user_data;
|
||||
+ UINT32 user_data_size;
|
||||
+ output = gst_caps_new_empty_simple("audio/mpeg");
|
||||
+
|
||||
+ /* Unsure of how to differentiate between mpegversion 2 and 4 */
|
||||
+ gst_caps_set_simple(output, "mpegversion", G_TYPE_INT, 4, NULL);
|
||||
+
|
||||
+ if (SUCCEEDED(IMFMediaType_GetUINT32(type, &MF_MT_AAC_PAYLOAD_TYPE, &payload_type)))
|
||||
+ {
|
||||
+ switch (payload_type)
|
||||
+ {
|
||||
+ case 0:
|
||||
+ gst_caps_set_simple(output, "stream-format", G_TYPE_STRING, "raw", NULL);
|
||||
+ break;
|
||||
+ case 1:
|
||||
+ gst_caps_set_simple(output, "stream-format", G_TYPE_STRING, "adts", NULL);
|
||||
+ break;
|
||||
+ case 2:
|
||||
+ gst_caps_set_simple(output, "stream-format", G_TYPE_STRING, "adif", NULL);
|
||||
+ break;
|
||||
+ case 3:
|
||||
+ gst_caps_set_simple(output, "stream-format", G_TYPE_STRING, "loas", NULL);
|
||||
+ break;
|
||||
+ default:
|
||||
+ gst_caps_set_simple(output, "stream-format", G_TYPE_STRING, "raw", NULL);
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ gst_caps_set_simple(output, "stream-format", G_TYPE_STRING, "raw", NULL);
|
||||
+
|
||||
+ if (SUCCEEDED(IMFMediaType_GetUINT32(type, &MF_MT_AAC_AUDIO_PROFILE_LEVEL_INDICATION, &indication)))
|
||||
+ {
|
||||
+ const char *profile, *level;
|
||||
+ switch (indication)
|
||||
+ {
|
||||
+ case 0x29: profile = "lc"; level = "2"; break;
|
||||
+ case 0x2A: profile = "lc"; level = "4"; break;
|
||||
+ case 0x2B: profile = "lc"; level = "5"; break;
|
||||
+ default:
|
||||
+ {
|
||||
+ profile = level = NULL;
|
||||
+ FIXME("Unrecognized profile-level-indication %u\n", indication);
|
||||
+ }
|
||||
+ }
|
||||
+ if (profile)
|
||||
+ gst_caps_set_simple(output, "profile", G_TYPE_STRING, profile, NULL);
|
||||
+ if (level)
|
||||
+ gst_caps_set_simple(output, "level", G_TYPE_STRING, level, NULL);
|
||||
+ }
|
||||
+
|
||||
+ if (SUCCEEDED(IMFMediaType_GetAllocatedBlob(type, &MF_MT_USER_DATA, (BYTE **) &user_data, &user_data_size)))
|
||||
+ {
|
||||
+ if (user_data_size > sizeof(*user_data))
|
||||
+ {
|
||||
+ GstBuffer *audio_specific_config = gst_buffer_new_allocate(NULL, user_data_size - sizeof(*user_data), NULL);
|
||||
+ gst_buffer_fill(audio_specific_config, 0, user_data + 1, user_data_size - sizeof(*user_data));
|
||||
+
|
||||
+ gst_caps_set_simple(output, "codec_data", GST_TYPE_BUFFER, audio_specific_config, NULL);
|
||||
+ gst_buffer_unref(audio_specific_config);
|
||||
+ }
|
||||
+ CoTaskMemFree(user_data);
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
{
|
||||
FIXME("Unrecognized subtype %s\n", debugstr_guid(&subtype));
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,32 +0,0 @@
|
||||
From 9638f311e7d31f5e4aa80e173c31396d774afb75 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Mon, 11 May 2020 16:03:09 -0500
|
||||
Subject: [PATCH] winegstreamer: Translate MPEG-4 Section-2 attributes to caps.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/mfplat.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index b1f83f4fa6c..8906e472766 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -1163,6 +1163,14 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type)
|
||||
|
||||
user_data_to_codec_data(type, output);
|
||||
}
|
||||
+ else if (IsEqualGUID(&subtype, &MFVideoFormat_M4S2))
|
||||
+ {
|
||||
+ output = gst_caps_new_empty_simple("video/mpeg");
|
||||
+ gst_caps_set_simple(output, "mpegversion", G_TYPE_INT, 4, NULL);
|
||||
+ gst_caps_set_simple(output, "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
|
||||
+
|
||||
+ user_data_to_codec_data(type, output);
|
||||
+ }
|
||||
else
|
||||
{
|
||||
GstVideoFormat format = GST_VIDEO_FORMAT_UNKNOWN;
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,39 +0,0 @@
|
||||
From e16c1d7b27467663a90eb23863d8110627ec3ad1 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 12 May 2020 17:05:59 -0500
|
||||
Subject: [PATCH] winegstreamer: Translate WMA attributes to caps.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/mfplat.c | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index 8906e472766..bf3486d2be8 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -1329,6 +1329,21 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type)
|
||||
CoTaskMemFree(user_data);
|
||||
}
|
||||
}
|
||||
+ else if (IsEqualGUID(&subtype, &MFAudioFormat_WMAudioV9) ||
|
||||
+ IsEqualGUID(&subtype, &MFAudioFormat_WMAudioV8))
|
||||
+ {
|
||||
+ DWORD block_align;
|
||||
+
|
||||
+ output = gst_caps_new_empty_simple("audio/x-wma");
|
||||
+
|
||||
+ gst_caps_set_simple(output, "wmaversion", G_TYPE_INT,
|
||||
+ IsEqualGUID(&subtype, &MFAudioFormat_WMAudioV9) ? 3 : 2, NULL);
|
||||
+
|
||||
+ if (SUCCEEDED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &block_align)))
|
||||
+ gst_caps_set_simple(output, "block_align", G_TYPE_INT, block_align, NULL);
|
||||
+
|
||||
+ user_data_to_codec_data(type, output);
|
||||
+ }
|
||||
else
|
||||
{
|
||||
FIXME("Unrecognized subtype %s\n", debugstr_guid(&subtype));
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,167 +0,0 @@
|
||||
From dd690ffa7c0a3b2a067f0f2fc1ec7f99cfc9d343 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Wed, 29 Jan 2020 15:37:39 -0600
|
||||
Subject: [PATCH] tools: Add support for multiple parent directories.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
tools/make_makefiles | 45 +++++++++++++++++++++++++++-----------------
|
||||
tools/makedep.c | 26 +++++++++++++++++--------
|
||||
2 files changed, 46 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/tools/make_makefiles b/tools/make_makefiles
|
||||
index 2d3c14cb2ec..cb4a808244d 100755
|
||||
--- a/tools/make_makefiles
|
||||
+++ b/tools/make_makefiles
|
||||
@@ -229,14 +229,14 @@ sub parse_makefile($)
|
||||
{
|
||||
die "Configure substitution is not allowed in $file" unless $file eq "Makefile";
|
||||
}
|
||||
- if (/^\s*(MODULE|IMPORTLIB|TESTDLL|PARENTSRC|APPMODE|EXTRADLLFLAGS)\s*=\s*(.*)/)
|
||||
+ if (/^\s*(MODULE|IMPORTLIB|TESTDLL|APPMODE|EXTRADLLFLAGS)\s*=\s*(.*)/)
|
||||
{
|
||||
my $var = $1;
|
||||
$make{$var} = $2;
|
||||
next;
|
||||
}
|
||||
my $source_vars_regexp = join "|", @source_vars;
|
||||
- if (/^\s*($source_vars_regexp|PROGRAMS|EXTRA_TARGETS|EXTRA_OBJS|INSTALL_LIB|INSTALL_DEV)\s*=\s*(.*)/)
|
||||
+ if (/^\s*($source_vars_regexp|PROGRAMS|EXTRA_TARGETS|EXTRA_OBJS|INSTALL_LIB|INSTALL_DEV|PARENTSRC)\s*=\s*(.*)/)
|
||||
{
|
||||
my $var = $1;
|
||||
my @list = split(/\s+/, $2);
|
||||
@@ -291,19 +291,27 @@ sub get_makedep_flags($)
|
||||
return %flags;
|
||||
}
|
||||
|
||||
-sub get_parent_makefile($)
|
||||
+sub get_parent_makefiles($)
|
||||
{
|
||||
my $file = shift;
|
||||
my %make = %{$makefiles{$file}};
|
||||
- my $reldir = $make{"PARENTSRC"} || "";
|
||||
- return "" unless $reldir;
|
||||
- (my $path = $file) =~ s/\/Makefile$/\//;
|
||||
- while ($reldir =~ /^\.\.\//)
|
||||
+ my $pointer = $make{"PARENTSRC"} || ();
|
||||
+ return () unless $pointer;
|
||||
+ my @reldirs = @{$pointer};
|
||||
+ my @makefiles = ();
|
||||
+ foreach my $reldir (@reldirs)
|
||||
{
|
||||
- $reldir =~ s/^\.\.\///;
|
||||
- $path =~ s/[^\/]+\/$//;
|
||||
+ my $length = @reldirs;
|
||||
+ (my $path = $file) =~ s/\/Makefile$/\//;
|
||||
+ while ($reldir =~ /^\.\.\//)
|
||||
+ {
|
||||
+ $reldir =~ s/^\.\.\///;
|
||||
+ $path =~ s/[^\/]+\/$//;
|
||||
+ }
|
||||
+ push @makefiles, "$path$reldir/Makefile";
|
||||
}
|
||||
- return "$path$reldir/Makefile";
|
||||
+
|
||||
+ return @makefiles
|
||||
}
|
||||
|
||||
# preserve shared source files that are listed in the existing makefile
|
||||
@@ -404,13 +412,16 @@ sub assign_sources_to_makefiles(@)
|
||||
foreach my $file (@makefiles)
|
||||
{
|
||||
my $make = $makefiles{$file};
|
||||
- my $parent = get_parent_makefile( $file );
|
||||
- next unless $parent;
|
||||
- preserve_shared_source_files( $makefiles{$file}, $makefiles{$parent}, "C_SRCS" );
|
||||
- preserve_shared_source_files( $makefiles{$file}, $makefiles{$parent}, "RC_SRCS" );
|
||||
- preserve_shared_source_files( $makefiles{$file}, $makefiles{$parent}, "IDL_SRCS" );
|
||||
- preserve_shared_source_files( $makefiles{$file}, $makefiles{$parent}, "LEX_SRCS" );
|
||||
- preserve_shared_source_files( $makefiles{$file}, $makefiles{$parent}, "BISON_SRCS" );
|
||||
+ my @parents = get_parent_makefiles( $file );
|
||||
+ next unless @parents;
|
||||
+ foreach my $parent (@parents)
|
||||
+ {
|
||||
+ preserve_shared_source_files( $makefiles{$file}, $makefiles{$parent}, "C_SRCS" );
|
||||
+ preserve_shared_source_files( $makefiles{$file}, $makefiles{$parent}, "RC_SRCS" );
|
||||
+ preserve_shared_source_files( $makefiles{$file}, $makefiles{$parent}, "IDL_SRCS" );
|
||||
+ preserve_shared_source_files( $makefiles{$file}, $makefiles{$parent}, "LEX_SRCS" );
|
||||
+ preserve_shared_source_files( $makefiles{$file}, $makefiles{$parent}, "BISON_SRCS" );
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/tools/makedep.c b/tools/makedep.c
|
||||
index d892b7e9541..688487ffd82 100644
|
||||
--- a/tools/makedep.c
|
||||
+++ b/tools/makedep.c
|
||||
@@ -190,11 +190,11 @@ struct makefile
|
||||
struct strarray install_dev;
|
||||
struct strarray extra_targets;
|
||||
struct strarray extra_imports;
|
||||
+ struct strarray parent_dirs;
|
||||
struct list sources;
|
||||
struct list includes;
|
||||
const char *src_dir;
|
||||
const char *obj_dir;
|
||||
- const char *parent_dir;
|
||||
const char *module;
|
||||
const char *testdll;
|
||||
const char *sharedlib;
|
||||
@@ -1388,14 +1388,21 @@ static struct file *open_local_file( const struct makefile *make, const char *pa
|
||||
{
|
||||
char *src_path = src_dir_path( make, path );
|
||||
struct file *ret = load_file( src_path );
|
||||
+ unsigned int i;
|
||||
|
||||
- /* if not found, try parent dir */
|
||||
- if (!ret && make->parent_dir)
|
||||
+ /* if not found, try parent dirs */
|
||||
+ for (i = 0; !ret && i < make->parent_dirs.count; i++)
|
||||
{
|
||||
+ char *new_path;
|
||||
+
|
||||
free( src_path );
|
||||
- path = strmake( "%s/%s", make->parent_dir, path );
|
||||
- src_path = src_dir_path( make, path );
|
||||
+ new_path = strmake( "%s/%s", make->parent_dirs.str[i], path );
|
||||
+ src_path = src_dir_path( make, new_path );
|
||||
ret = load_file( src_path );
|
||||
+ if (ret)
|
||||
+ path = new_path;
|
||||
+ else
|
||||
+ free(new_path);
|
||||
}
|
||||
|
||||
if (ret) *filename = src_path;
|
||||
@@ -4158,13 +4165,13 @@ static void load_sources( struct makefile *make )
|
||||
strarray_set_value( &make->vars, "top_srcdir", root_src_dir_path( "" ));
|
||||
strarray_set_value( &make->vars, "srcdir", src_dir_path( make, "" ));
|
||||
|
||||
- make->parent_dir = get_expanded_make_variable( make, "PARENTSRC" );
|
||||
make->module = get_expanded_make_variable( make, "MODULE" );
|
||||
make->testdll = get_expanded_make_variable( make, "TESTDLL" );
|
||||
make->sharedlib = get_expanded_make_variable( make, "SHAREDLIB" );
|
||||
make->staticlib = get_expanded_make_variable( make, "STATICLIB" );
|
||||
make->importlib = get_expanded_make_variable( make, "IMPORTLIB" );
|
||||
|
||||
+ make->parent_dirs = get_expanded_make_var_array( make, "PARENTSRC" );
|
||||
make->programs = get_expanded_make_var_array( make, "PROGRAMS" );
|
||||
make->scripts = get_expanded_make_var_array( make, "SCRIPTS" );
|
||||
make->imports = get_expanded_make_var_array( make, "IMPORTS" );
|
||||
@@ -4209,8 +4216,11 @@ static void load_sources( struct makefile *make )
|
||||
strarray_add( &make->include_args, strmake( "-I%s", obj_dir_path( make, "" )));
|
||||
if (make->src_dir)
|
||||
strarray_add( &make->include_args, strmake( "-I%s", make->src_dir ));
|
||||
- if (make->parent_dir)
|
||||
- strarray_add( &make->include_args, strmake( "-I%s", src_dir_path( make, make->parent_dir )));
|
||||
+ if (make->parent_dirs.count)
|
||||
+ {
|
||||
+ for (i = 0; i < make->parent_dirs.count; i++)
|
||||
+ strarray_add( &make->include_args, strmake( "-I%s", src_dir_path( make, make->parent_dirs.str[i] )));
|
||||
+ }
|
||||
strarray_add( &make->include_args, "-Iinclude" );
|
||||
if (root_src_dir) strarray_add( &make->include_args, strmake( "-I%s", root_src_dir_path( "include" )));
|
||||
|
||||
--
|
||||
2.29.2
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,28 +0,0 @@
|
||||
From 7fa665fa4360cf8656c30683c84280c1751850c0 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Mon, 23 Mar 2020 11:55:41 -0500
|
||||
Subject: [PATCH] mfreadwrite: Select all streams when creating a source
|
||||
reader.
|
||||
|
||||
---
|
||||
dlls/mfreadwrite/reader.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/dlls/mfreadwrite/reader.c b/dlls/mfreadwrite/reader.c
|
||||
index 85aec9aaedc..77ce301d8be 100644
|
||||
--- a/dlls/mfreadwrite/reader.c
|
||||
+++ b/dlls/mfreadwrite/reader.c
|
||||
@@ -2138,6 +2138,10 @@ static HRESULT create_source_reader_from_source(IMFMediaSource *source, IMFAttri
|
||||
break;
|
||||
|
||||
object->streams[i].index = i;
|
||||
+
|
||||
+ hr = IMFPresentationDescriptor_SelectStream(object->descriptor, i);
|
||||
+ if (FAILED(hr))
|
||||
+ break;
|
||||
}
|
||||
|
||||
if (FAILED(hr))
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,155 +0,0 @@
|
||||
From 2cc1a2009879fec87340b1818111f3cea6fe2442 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Mon, 2 Nov 2020 09:58:09 -0600
|
||||
Subject: [PATCH] Miscellaneous
|
||||
|
||||
---
|
||||
dlls/mfreadwrite/reader.c | 12 +++++++++++-
|
||||
dlls/winegstreamer/gst_cbs.c | 20 +++++++++-----------
|
||||
dlls/winegstreamer/gst_cbs.h | 1 -
|
||||
dlls/winegstreamer/media_source.c | 24 +++++++++++++++++++++++-
|
||||
4 files changed, 43 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/mfreadwrite/reader.c b/dlls/mfreadwrite/reader.c
|
||||
index 77ce301d8be..9fdef9a8c9c 100644
|
||||
--- a/dlls/mfreadwrite/reader.c
|
||||
+++ b/dlls/mfreadwrite/reader.c
|
||||
@@ -1584,6 +1584,7 @@ static HRESULT source_reader_create_decoder_for_stream(struct source_reader *rea
|
||||
{
|
||||
MFT_REGISTER_TYPE_INFO in_type, out_type;
|
||||
CLSID *clsids, mft_clsid, category;
|
||||
+ BOOL decoder_found = FALSE;
|
||||
unsigned int i = 0, count;
|
||||
IMFMediaType *input_type;
|
||||
HRESULT hr;
|
||||
@@ -1630,12 +1631,21 @@ static HRESULT source_reader_create_decoder_for_stream(struct source_reader *rea
|
||||
}
|
||||
|
||||
}
|
||||
+ else if (!decoder_found)
|
||||
+ {
|
||||
+ /* see if there are other decoders for this stream */
|
||||
+ if (SUCCEEDED(MFTEnum(category, 0, &in_type, NULL, NULL, &clsids, &count)) && count)
|
||||
+ {
|
||||
+ decoder_found = TRUE;
|
||||
+ CoTaskMemFree(clsids);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
IMFMediaType_Release(input_type);
|
||||
}
|
||||
|
||||
- return MF_E_TOPO_CODEC_NOT_FOUND;
|
||||
+ return decoder_found ? MF_E_INVALIDREQUEST : MF_E_TOPO_CODEC_NOT_FOUND;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI src_reader_SetCurrentMediaType(IMFSourceReader *iface, DWORD index, DWORD *reserved,
|
||||
diff --git a/dlls/winegstreamer/gst_cbs.c b/dlls/winegstreamer/gst_cbs.c
|
||||
index 261a5b9f4ce..81692fdf919 100644
|
||||
--- a/dlls/winegstreamer/gst_cbs.c
|
||||
+++ b/dlls/winegstreamer/gst_cbs.c
|
||||
@@ -18,6 +18,9 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
+#include <stdio.h>
|
||||
+#include <assert.h>
|
||||
+
|
||||
#include <gst/gst.h>
|
||||
|
||||
#include "objbase.h"
|
||||
@@ -53,6 +56,12 @@ static void CALLBACK perform_cb(TP_CALLBACK_INSTANCE *instance, void *user)
|
||||
perform_cb_media_source(cbdata);
|
||||
else if (cbdata->type < MF_DECODE_MAX)
|
||||
perform_cb_mf_decode(cbdata);
|
||||
+ else
|
||||
+ {
|
||||
+ fprintf(stderr, "No handler registered for callback\n");
|
||||
+ assert(0);
|
||||
+ }
|
||||
+
|
||||
|
||||
pthread_mutex_lock(&cbdata->lock);
|
||||
cbdata->finished = 1;
|
||||
@@ -447,17 +456,6 @@ GstBusSyncReply watch_decoder_bus_wrapper(GstBus *bus, GstMessage *message, gpoi
|
||||
return cbdata.u.watch_bus_data.ret;
|
||||
}
|
||||
|
||||
-void decoder_pad_added_wrapper(GstElement *element, GstPad *pad, gpointer user)
|
||||
-{
|
||||
- struct cb_data cbdata = { DECODER_PAD_ADDED };
|
||||
-
|
||||
- cbdata.u.pad_added_data.element = element;
|
||||
- cbdata.u.pad_added_data.pad = pad;
|
||||
- cbdata.u.pad_added_data.user = user;
|
||||
-
|
||||
- call_cb(&cbdata);
|
||||
-}
|
||||
-
|
||||
GstFlowReturn decoder_new_sample_wrapper(GstElement *appsink, gpointer user)
|
||||
{
|
||||
struct cb_data cbdata = {DECODER_NEW_SAMPLE};
|
||||
diff --git a/dlls/winegstreamer/gst_cbs.h b/dlls/winegstreamer/gst_cbs.h
|
||||
index 6659aedefa5..825b46d13bb 100644
|
||||
--- a/dlls/winegstreamer/gst_cbs.h
|
||||
+++ b/dlls/winegstreamer/gst_cbs.h
|
||||
@@ -194,6 +194,5 @@ gboolean activate_push_mode_wrapper(GstPad *pad, GstObject *parent, GstPadMode m
|
||||
gboolean query_input_src_wrapper(GstPad *pad, GstObject *parent, GstQuery *query) DECLSPEC_HIDDEN;
|
||||
GstBusSyncReply watch_decoder_bus_wrapper(GstBus *bus, GstMessage *message, gpointer user) DECLSPEC_HIDDEN;
|
||||
GstFlowReturn decoder_new_sample_wrapper(GstElement *appsink, gpointer user) DECLSPEC_HIDDEN;
|
||||
-void decoder_pad_added_wrapper(GstElement *element, GstPad *Pad, gpointer user) DECLSPEC_HIDDEN;
|
||||
|
||||
#endif
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index 5f46f7d575a..2156e07a13c 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -554,6 +554,11 @@ static gboolean bytestream_query(GstPad *pad, GstObject *parent, GstQuery *query
|
||||
gst_query_add_scheduling_mode(query, GST_PAD_MODE_PULL);
|
||||
return TRUE;
|
||||
}
|
||||
+ case GST_QUERY_LATENCY:
|
||||
+ {
|
||||
+ gst_query_set_latency(query, FALSE, 0, 0);
|
||||
+ return TRUE;
|
||||
+ }
|
||||
default:
|
||||
{
|
||||
WARN("Unhandled query type %s\n", GST_QUERY_TYPE_NAME(query));
|
||||
@@ -616,6 +621,23 @@ GstBusSyncReply bus_watch(GstBus *bus, GstMessage *message, gpointer user)
|
||||
g_error_free(err);
|
||||
g_free(dbg_info);
|
||||
break;
|
||||
+ case GST_MESSAGE_TAG:
|
||||
+ {
|
||||
+ GstTagList *tag_list;
|
||||
+ gchar *printable;
|
||||
+ gst_message_parse_tag(message, &tag_list);
|
||||
+ if (tag_list)
|
||||
+ {
|
||||
+ printable = gst_tag_list_to_string(tag_list);
|
||||
+ if (printable)
|
||||
+ {
|
||||
+ TRACE("tag test: %s\n", debugstr_a(printable));
|
||||
+ g_free(printable);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ break;
|
||||
+ }
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1154,7 +1176,7 @@ static HRESULT WINAPI media_source_GetCharacteristics(IMFMediaSource *iface, DWO
|
||||
if (source->state == SOURCE_SHUTDOWN)
|
||||
return MF_E_SHUTDOWN;
|
||||
|
||||
- *characteristics = MFMEDIASOURCE_CAN_SEEK;
|
||||
+ *characteristics = MFMEDIASOURCE_CAN_SEEK | MFMEDIASOURCE_CAN_PAUSE;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,153 +0,0 @@
|
||||
From c918862beea585aa413d3a629e5818a762d1568f Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Wed, 25 Mar 2020 19:07:11 -0500
|
||||
Subject: [PATCH] WMV
|
||||
|
||||
---
|
||||
dlls/winegstreamer/gst_private.h | 1 +
|
||||
dlls/winegstreamer/mf_decode.c | 10 +++++
|
||||
dlls/winegstreamer/mfplat.c | 40 ++++++++++++++++++++
|
||||
dlls/winegstreamer/winegstreamer_classes.idl | 6 +++
|
||||
include/mfidl.idl | 2 +
|
||||
5 files changed, 59 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h
|
||||
index 019cce5fad5..02343fa676e 100644
|
||||
--- a/dlls/winegstreamer/gst_private.h
|
||||
+++ b/dlls/winegstreamer/gst_private.h
|
||||
@@ -90,6 +90,7 @@ enum decoder_type
|
||||
{
|
||||
DECODER_TYPE_H264,
|
||||
DECODER_TYPE_AAC,
|
||||
+ DECODER_TYPE_WMV,
|
||||
};
|
||||
HRESULT generic_decoder_construct(REFIID riid, void **obj, enum decoder_type) DECLSPEC_HIDDEN;
|
||||
HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/winegstreamer/mf_decode.c b/dlls/winegstreamer/mf_decode.c
|
||||
index 7055ffa54fc..3625382c573 100644
|
||||
--- a/dlls/winegstreamer/mf_decode.c
|
||||
+++ b/dlls/winegstreamer/mf_decode.c
|
||||
@@ -29,6 +29,9 @@ const GUID *h264_output_types[] = {&MFVideoFormat_NV12, &MFVideoFormat_I420, &MF
|
||||
const GUID *aac_input_types[] = {&MFAudioFormat_AAC};
|
||||
const GUID *aac_output_types[] = {&MFAudioFormat_Float};
|
||||
|
||||
+const GUID *wmv_input_types[] = {&MFVideoFormat_WMV3, &MFVideoFormat_WVC1};
|
||||
+const GUID *wmv_output_types[] = {&MFVideoFormat_NV12, &MFVideoFormat_YV12, &MFVideoFormat_YUY2, &MFVideoFormat_UYVY, &MFVideoFormat_YVYU, &MFVideoFormat_NV11, &MFVideoFormat_RGB32, &MFVideoFormat_RGB24, &MFVideoFormat_RGB555, &MFVideoFormat_RGB8};
|
||||
+
|
||||
static struct decoder_desc
|
||||
{
|
||||
const GUID *major_type;
|
||||
@@ -51,6 +54,13 @@ static struct decoder_desc
|
||||
ARRAY_SIZE(aac_input_types),
|
||||
aac_output_types,
|
||||
ARRAY_SIZE(aac_output_types),
|
||||
+ },
|
||||
+ { /* DECODER_TYPE_WMV */
|
||||
+ &MFMediaType_Video,
|
||||
+ wmv_input_types,
|
||||
+ ARRAY_SIZE(wmv_input_types),
|
||||
+ wmv_output_types,
|
||||
+ ARRAY_SIZE(wmv_output_types),
|
||||
}
|
||||
};
|
||||
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index b604f6df066..2fb730ff4c0 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -420,6 +420,10 @@ static HRESULT aac_decoder_create(REFIID riid, void **ret)
|
||||
return generic_decoder_construct(riid, ret, DECODER_TYPE_AAC);
|
||||
}
|
||||
|
||||
+static HRESULT wmv_decoder_create(REFIID riid, void **ret)
|
||||
+{
|
||||
+ return generic_decoder_construct(riid, ret, DECODER_TYPE_WMV);
|
||||
+}
|
||||
static const struct class_object
|
||||
{
|
||||
const GUID *clsid;
|
||||
@@ -433,6 +437,7 @@ class_objects[] =
|
||||
{ &CLSID_WINEColorConverter, &color_converter_create },
|
||||
{ &CLSID_CMSH264DecoderMFT, &h264_decoder_create },
|
||||
{ &CLSID_CMSAACDecMFT, &aac_decoder_create },
|
||||
+ { &CLSID_CWMVDecMediaObject, &wmv_decoder_create },
|
||||
};
|
||||
|
||||
HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj)
|
||||
@@ -514,6 +519,29 @@ const GUID *aac_decoder_output_types[] =
|
||||
&MFAudioFormat_PCM,
|
||||
};
|
||||
|
||||
+static WCHAR wmvdecoderW[] = {'W','M','V','i','d','e','o',' ','D','e','c','o','d','e','r',' ','M','F','T',0};
|
||||
+
|
||||
+const GUID *wmv_decoder_input_types[] =
|
||||
+{
|
||||
+ &MFVideoFormat_WMV3,
|
||||
+ &MFVideoFormat_WVC1,
|
||||
+};
|
||||
+
|
||||
+const GUID *wmv_decoder_output_types[] =
|
||||
+{
|
||||
+ &MFVideoFormat_NV12,
|
||||
+ &MFVideoFormat_YV12,
|
||||
+ &MFVideoFormat_YUY2,
|
||||
+ &MFVideoFormat_UYVY,
|
||||
+ &MFVideoFormat_YVYU,
|
||||
+ &MFVideoFormat_NV11,
|
||||
+ &MFVideoFormat_RGB32,
|
||||
+ &MFVideoFormat_RGB24,
|
||||
+ &MFVideoFormat_RGB565,
|
||||
+ &MFVideoFormat_RGB555,
|
||||
+ &MFVideoFormat_RGB8,
|
||||
+};
|
||||
+
|
||||
static const struct mft
|
||||
{
|
||||
const GUID *clsid;
|
||||
@@ -577,6 +605,18 @@ mfts[] =
|
||||
aac_decoder_output_types,
|
||||
NULL
|
||||
},
|
||||
+ {
|
||||
+ &CLSID_CWMVDecMediaObject,
|
||||
+ &MFT_CATEGORY_VIDEO_DECODER,
|
||||
+ wmvdecoderW,
|
||||
+ MFT_ENUM_FLAG_SYNCMFT,
|
||||
+ &MFMediaType_Video,
|
||||
+ ARRAY_SIZE(wmv_decoder_input_types),
|
||||
+ wmv_decoder_input_types,
|
||||
+ ARRAY_SIZE(wmv_decoder_output_types),
|
||||
+ wmv_decoder_output_types,
|
||||
+ NULL
|
||||
+ },
|
||||
};
|
||||
|
||||
HRESULT mfplat_DllRegisterServer(void)
|
||||
diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl
|
||||
index fe8649c690c..3b29bbfc36d 100644
|
||||
--- a/dlls/winegstreamer/winegstreamer_classes.idl
|
||||
+++ b/dlls/winegstreamer/winegstreamer_classes.idl
|
||||
@@ -85,3 +85,9 @@ coclass CMSH264DecoderMFT { }
|
||||
uuid(32d186a7-218f-4c75-8876-dd77273a8999)
|
||||
]
|
||||
coclass CMSAACDecMFT { }
|
||||
+
|
||||
+[
|
||||
+ threading(both),
|
||||
+ uuid(82d353df-90bd-4382-8bc2-3f6192b76e34)
|
||||
+]
|
||||
+coclass CLSID_CWMVDecMediaObject {}
|
||||
diff --git a/include/mfidl.idl b/include/mfidl.idl
|
||||
index 4023c3a62d2..7cb027b156a 100644
|
||||
--- a/include/mfidl.idl
|
||||
+++ b/include/mfidl.idl
|
||||
@@ -1308,3 +1308,5 @@ cpp_quote("EXTERN_GUID(MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_FLAGS, 0xba491366, 0xb
|
||||
cpp_quote("EXTERN_GUID(CLSID_VideoProcessorMFT, 0x88753b26, 0x5b24, 0x49bd, 0xb2, 0xe7, 0xc, 0x44, 0x5c, 0x78, 0xc9, 0x82);")
|
||||
cpp_quote("EXTERN_GUID(CLSID_CMSH264DecoderMFT, 0x62ce7e72, 0x4c71, 0x4d20, 0xb1, 0x5d, 0x45, 0x28, 0x31, 0xa8, 0x7d, 0x9d);")
|
||||
cpp_quote("EXTERN_GUID(CLSID_CMSAACDecMFT, 0x32d186a7, 0x218f, 0x4c75, 0x88, 0x76, 0xdd, 0x77, 0x27, 0x3a, 0x89, 0x99);")
|
||||
+cpp_quote("EXTERN_GUID(CLSID_ASFByteStreamHandler, 0x41457294, 0x644c, 0x4298, 0xa2, 0x8a, 0xbd, 0x69, 0xf2, 0xc0, 0xcf, 0x3b);")
|
||||
+cpp_quote("EXTERN_GUID(CLSID_CWMVDecMediaObject, 0x82d353df, 0x90bd, 0x4382, 0x8b, 0xc2, 0x3f, 0x61, 0x92, 0xb7, 0x6e, 0x34);")
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 8b1429c51559a4cb5685cfcf11302f0b8a6e9f14 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Fri, 3 Apr 2020 11:12:33 -0500
|
||||
Subject: [PATCH] Expose PCM output type on AAC decoder.
|
||||
|
||||
---
|
||||
dlls/winegstreamer/mf_decode.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/mf_decode.c b/dlls/winegstreamer/mf_decode.c
|
||||
index 3625382c573..c188d08c57f 100644
|
||||
--- a/dlls/winegstreamer/mf_decode.c
|
||||
+++ b/dlls/winegstreamer/mf_decode.c
|
||||
@@ -27,7 +27,7 @@ const GUID *h264_input_types[] = {&MFVideoFormat_H264};
|
||||
const GUID *h264_output_types[] = {&MFVideoFormat_NV12, &MFVideoFormat_I420, &MFVideoFormat_IYUV, &MFVideoFormat_YUY2, &MFVideoFormat_YV12};
|
||||
|
||||
const GUID *aac_input_types[] = {&MFAudioFormat_AAC};
|
||||
-const GUID *aac_output_types[] = {&MFAudioFormat_Float};
|
||||
+const GUID *aac_output_types[] = {&MFAudioFormat_Float, &MFAudioFormat_PCM};
|
||||
|
||||
const GUID *wmv_input_types[] = {&MFVideoFormat_WMV3, &MFVideoFormat_WVC1};
|
||||
const GUID *wmv_output_types[] = {&MFVideoFormat_NV12, &MFVideoFormat_YV12, &MFVideoFormat_YUY2, &MFVideoFormat_UYVY, &MFVideoFormat_YVYU, &MFVideoFormat_NV11, &MFVideoFormat_RGB32, &MFVideoFormat_RGB24, &MFVideoFormat_RGB555, &MFVideoFormat_RGB8};
|
||||
--
|
||||
2.29.2
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,153 +0,0 @@
|
||||
From 32e2cc5815a0f2836ba22f42e2eb7930289a18db Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Mon, 11 May 2020 16:05:50 -0500
|
||||
Subject: [PATCH] winegstreamer: Introduce MPEG-4 Section-2 video decoder.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/gst_private.h | 1 +
|
||||
dlls/winegstreamer/mf_decode.c | 10 ++++++
|
||||
dlls/winegstreamer/mfplat.c | 35 ++++++++++++++++++++
|
||||
dlls/winegstreamer/winegstreamer_classes.idl | 6 ++++
|
||||
include/mfidl.idl | 1 +
|
||||
5 files changed, 53 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h
|
||||
index 02343fa676e..1c6530d2f38 100644
|
||||
--- a/dlls/winegstreamer/gst_private.h
|
||||
+++ b/dlls/winegstreamer/gst_private.h
|
||||
@@ -91,6 +91,7 @@ enum decoder_type
|
||||
DECODER_TYPE_H264,
|
||||
DECODER_TYPE_AAC,
|
||||
DECODER_TYPE_WMV,
|
||||
+ DECODER_TYPE_M4S2,
|
||||
};
|
||||
HRESULT generic_decoder_construct(REFIID riid, void **obj, enum decoder_type) DECLSPEC_HIDDEN;
|
||||
HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/winegstreamer/mf_decode.c b/dlls/winegstreamer/mf_decode.c
|
||||
index c188d08c57f..b5220bc3332 100644
|
||||
--- a/dlls/winegstreamer/mf_decode.c
|
||||
+++ b/dlls/winegstreamer/mf_decode.c
|
||||
@@ -32,6 +32,9 @@ const GUID *aac_output_types[] = {&MFAudioFormat_Float, &MFAudioFormat_PCM};
|
||||
const GUID *wmv_input_types[] = {&MFVideoFormat_WMV3, &MFVideoFormat_WVC1};
|
||||
const GUID *wmv_output_types[] = {&MFVideoFormat_NV12, &MFVideoFormat_YV12, &MFVideoFormat_YUY2, &MFVideoFormat_UYVY, &MFVideoFormat_YVYU, &MFVideoFormat_NV11, &MFVideoFormat_RGB32, &MFVideoFormat_RGB24, &MFVideoFormat_RGB555, &MFVideoFormat_RGB8};
|
||||
|
||||
+const GUID *m4s2_input_types[] = {&MFVideoFormat_MPEG2};
|
||||
+const GUID *m4s2_output_types[] = {&MFVideoFormat_I420, &MFVideoFormat_IYUV, &MFVideoFormat_NV12, &MFVideoFormat_YUY2, &MFVideoFormat_YV12};
|
||||
+
|
||||
static struct decoder_desc
|
||||
{
|
||||
const GUID *major_type;
|
||||
@@ -61,6 +64,13 @@ static struct decoder_desc
|
||||
ARRAY_SIZE(wmv_input_types),
|
||||
wmv_output_types,
|
||||
ARRAY_SIZE(wmv_output_types),
|
||||
+ },
|
||||
+ { /* DECODER_TYPE_M4S2 */
|
||||
+ &MFMediaType_Video,
|
||||
+ m4s2_input_types,
|
||||
+ ARRAY_SIZE(m4s2_input_types),
|
||||
+ m4s2_output_types,
|
||||
+ ARRAY_SIZE(m4s2_output_types),
|
||||
}
|
||||
};
|
||||
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index 2fb730ff4c0..e5227340fd2 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -424,6 +424,12 @@ static HRESULT wmv_decoder_create(REFIID riid, void **ret)
|
||||
{
|
||||
return generic_decoder_construct(riid, ret, DECODER_TYPE_WMV);
|
||||
}
|
||||
+
|
||||
+static HRESULT m4s2_decoder_create(REFIID riid, void **ret)
|
||||
+{
|
||||
+ return generic_decoder_construct(riid, ret, DECODER_TYPE_M4S2);
|
||||
+}
|
||||
+
|
||||
static const struct class_object
|
||||
{
|
||||
const GUID *clsid;
|
||||
@@ -438,6 +444,7 @@ class_objects[] =
|
||||
{ &CLSID_CMSH264DecoderMFT, &h264_decoder_create },
|
||||
{ &CLSID_CMSAACDecMFT, &aac_decoder_create },
|
||||
{ &CLSID_CWMVDecMediaObject, &wmv_decoder_create },
|
||||
+ { &CLSID_CMpeg4sDecMFT, m4s2_decoder_create },
|
||||
};
|
||||
|
||||
HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj)
|
||||
@@ -542,6 +549,22 @@ const GUID *wmv_decoder_output_types[] =
|
||||
&MFVideoFormat_RGB8,
|
||||
};
|
||||
|
||||
+static WCHAR m4s2decoderW[] = {'M','p','e','g','4','s',' ','D','e','c','o','d','e','r',' ','M','F','T',0};
|
||||
+
|
||||
+const GUID *m4s2_decoder_input_types[] =
|
||||
+{
|
||||
+ &MFVideoFormat_M4S2,
|
||||
+};
|
||||
+
|
||||
+const GUID *m4s2_decoder_output_types[] =
|
||||
+{
|
||||
+ &MFVideoFormat_I420,
|
||||
+ &MFVideoFormat_IYUV,
|
||||
+ &MFVideoFormat_NV12,
|
||||
+ &MFVideoFormat_YUY2,
|
||||
+ &MFVideoFormat_YV12,
|
||||
+};
|
||||
+
|
||||
static const struct mft
|
||||
{
|
||||
const GUID *clsid;
|
||||
@@ -617,6 +640,18 @@ mfts[] =
|
||||
wmv_decoder_output_types,
|
||||
NULL
|
||||
},
|
||||
+ {
|
||||
+ &CLSID_CMpeg4sDecMFT,
|
||||
+ &MFT_CATEGORY_VIDEO_DECODER,
|
||||
+ m4s2decoderW,
|
||||
+ MFT_ENUM_FLAG_SYNCMFT,
|
||||
+ &MFMediaType_Video,
|
||||
+ ARRAY_SIZE(m4s2_decoder_input_types),
|
||||
+ m4s2_decoder_input_types,
|
||||
+ ARRAY_SIZE(m4s2_decoder_output_types),
|
||||
+ m4s2_decoder_output_types,
|
||||
+ NULL
|
||||
+ },
|
||||
};
|
||||
|
||||
HRESULT mfplat_DllRegisterServer(void)
|
||||
diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl
|
||||
index 3b29bbfc36d..2382a884069 100644
|
||||
--- a/dlls/winegstreamer/winegstreamer_classes.idl
|
||||
+++ b/dlls/winegstreamer/winegstreamer_classes.idl
|
||||
@@ -86,6 +86,12 @@ coclass CMSH264DecoderMFT { }
|
||||
]
|
||||
coclass CMSAACDecMFT { }
|
||||
|
||||
+[
|
||||
+ threading(both),
|
||||
+ uuid(5686a0d9-fe39-409f-9dff-3fdbc849f9f5)
|
||||
+]
|
||||
+coclass CMpeg4sDecMFT { }
|
||||
+
|
||||
[
|
||||
threading(both),
|
||||
uuid(82d353df-90bd-4382-8bc2-3f6192b76e34)
|
||||
diff --git a/include/mfidl.idl b/include/mfidl.idl
|
||||
index 7cb027b156a..926f593b3bc 100644
|
||||
--- a/include/mfidl.idl
|
||||
+++ b/include/mfidl.idl
|
||||
@@ -1308,5 +1308,6 @@ cpp_quote("EXTERN_GUID(MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_FLAGS, 0xba491366, 0xb
|
||||
cpp_quote("EXTERN_GUID(CLSID_VideoProcessorMFT, 0x88753b26, 0x5b24, 0x49bd, 0xb2, 0xe7, 0xc, 0x44, 0x5c, 0x78, 0xc9, 0x82);")
|
||||
cpp_quote("EXTERN_GUID(CLSID_CMSH264DecoderMFT, 0x62ce7e72, 0x4c71, 0x4d20, 0xb1, 0x5d, 0x45, 0x28, 0x31, 0xa8, 0x7d, 0x9d);")
|
||||
cpp_quote("EXTERN_GUID(CLSID_CMSAACDecMFT, 0x32d186a7, 0x218f, 0x4c75, 0x88, 0x76, 0xdd, 0x77, 0x27, 0x3a, 0x89, 0x99);")
|
||||
+cpp_quote("EXTERN_GUID(CLSID_CMpeg4sDecMFT, 0x5686a0d9, 0xfe39, 0x409f, 0x9d, 0xff, 0x3f, 0xdb, 0xc8, 0x49, 0xf9, 0xf5);")
|
||||
cpp_quote("EXTERN_GUID(CLSID_ASFByteStreamHandler, 0x41457294, 0x644c, 0x4298, 0xa2, 0x8a, 0xbd, 0x69, 0xf2, 0xc0, 0xcf, 0x3b);")
|
||||
cpp_quote("EXTERN_GUID(CLSID_CWMVDecMediaObject, 0x82d353df, 0x90bd, 0x4382, 0x8b, 0xc2, 0x3f, 0x61, 0x92, 0xb7, 0x6e, 0x34);")
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,148 +0,0 @@
|
||||
From 1d5e925925e63fe244964b26cf6128ede0776a06 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 12 May 2020 16:50:41 -0500
|
||||
Subject: [PATCH] winegstreamer: Introduce WMA audio decoder.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/gst_private.h | 1 +
|
||||
dlls/winegstreamer/mf_decode.c | 10 ++++++
|
||||
dlls/winegstreamer/mfplat.c | 32 ++++++++++++++++++++
|
||||
dlls/winegstreamer/winegstreamer_classes.idl | 6 ++++
|
||||
include/mfidl.idl | 3 +-
|
||||
5 files changed, 51 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h
|
||||
index 1c6530d2f38..81fc9b5ce14 100644
|
||||
--- a/dlls/winegstreamer/gst_private.h
|
||||
+++ b/dlls/winegstreamer/gst_private.h
|
||||
@@ -91,6 +91,7 @@ enum decoder_type
|
||||
DECODER_TYPE_H264,
|
||||
DECODER_TYPE_AAC,
|
||||
DECODER_TYPE_WMV,
|
||||
+ DECODER_TYPE_WMA,
|
||||
DECODER_TYPE_M4S2,
|
||||
};
|
||||
HRESULT generic_decoder_construct(REFIID riid, void **obj, enum decoder_type) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/winegstreamer/mf_decode.c b/dlls/winegstreamer/mf_decode.c
|
||||
index b5220bc3332..9b10cfd9e4a 100644
|
||||
--- a/dlls/winegstreamer/mf_decode.c
|
||||
+++ b/dlls/winegstreamer/mf_decode.c
|
||||
@@ -32,6 +32,9 @@ const GUID *aac_output_types[] = {&MFAudioFormat_Float, &MFAudioFormat_PCM};
|
||||
const GUID *wmv_input_types[] = {&MFVideoFormat_WMV3, &MFVideoFormat_WVC1};
|
||||
const GUID *wmv_output_types[] = {&MFVideoFormat_NV12, &MFVideoFormat_YV12, &MFVideoFormat_YUY2, &MFVideoFormat_UYVY, &MFVideoFormat_YVYU, &MFVideoFormat_NV11, &MFVideoFormat_RGB32, &MFVideoFormat_RGB24, &MFVideoFormat_RGB555, &MFVideoFormat_RGB8};
|
||||
|
||||
+const GUID *wma_input_types[] = {&MFAudioFormat_WMAudioV8, &MFAudioFormat_WMAudioV9};
|
||||
+const GUID *wma_output_types[] = {&MFAudioFormat_Float, &MFAudioFormat_PCM};
|
||||
+
|
||||
const GUID *m4s2_input_types[] = {&MFVideoFormat_MPEG2};
|
||||
const GUID *m4s2_output_types[] = {&MFVideoFormat_I420, &MFVideoFormat_IYUV, &MFVideoFormat_NV12, &MFVideoFormat_YUY2, &MFVideoFormat_YV12};
|
||||
|
||||
@@ -65,6 +68,13 @@ static struct decoder_desc
|
||||
wmv_output_types,
|
||||
ARRAY_SIZE(wmv_output_types),
|
||||
},
|
||||
+ { /* DECODER_TYPE_WMA */
|
||||
+ &MFMediaType_Audio,
|
||||
+ wma_input_types,
|
||||
+ ARRAY_SIZE(wma_input_types),
|
||||
+ wma_output_types,
|
||||
+ ARRAY_SIZE(wma_output_types),
|
||||
+ },
|
||||
{ /* DECODER_TYPE_M4S2 */
|
||||
&MFMediaType_Video,
|
||||
m4s2_input_types,
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index e5227340fd2..8f770f94bf8 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -425,6 +425,11 @@ static HRESULT wmv_decoder_create(REFIID riid, void **ret)
|
||||
return generic_decoder_construct(riid, ret, DECODER_TYPE_WMV);
|
||||
}
|
||||
|
||||
+static HRESULT wma_decoder_create(REFIID riid, void **ret)
|
||||
+{
|
||||
+ return generic_decoder_construct(riid, ret, DECODER_TYPE_WMA);
|
||||
+}
|
||||
+
|
||||
static HRESULT m4s2_decoder_create(REFIID riid, void **ret)
|
||||
{
|
||||
return generic_decoder_construct(riid, ret, DECODER_TYPE_M4S2);
|
||||
@@ -444,6 +449,7 @@ class_objects[] =
|
||||
{ &CLSID_CMSH264DecoderMFT, &h264_decoder_create },
|
||||
{ &CLSID_CMSAACDecMFT, &aac_decoder_create },
|
||||
{ &CLSID_CWMVDecMediaObject, &wmv_decoder_create },
|
||||
+ { &CLSID_CWMADecMediaObject, &wma_decoder_create },
|
||||
{ &CLSID_CMpeg4sDecMFT, m4s2_decoder_create },
|
||||
};
|
||||
|
||||
@@ -549,6 +555,20 @@ const GUID *wmv_decoder_output_types[] =
|
||||
&MFVideoFormat_RGB8,
|
||||
};
|
||||
|
||||
+static WCHAR wmadecoderW[] = {'W','M','A','u','d','i','o',' ','D','e','c','o','d','e','r',' ','M','F','T',0};
|
||||
+
|
||||
+const GUID *wma_decoder_input_types[] =
|
||||
+{
|
||||
+ &MFAudioFormat_WMAudioV8,
|
||||
+ &MFAudioFormat_WMAudioV9,
|
||||
+};
|
||||
+
|
||||
+const GUID *wma_decoder_output_types[] =
|
||||
+{
|
||||
+ &MFAudioFormat_Float,
|
||||
+ &MFAudioFormat_PCM,
|
||||
+};
|
||||
+
|
||||
static WCHAR m4s2decoderW[] = {'M','p','e','g','4','s',' ','D','e','c','o','d','e','r',' ','M','F','T',0};
|
||||
|
||||
const GUID *m4s2_decoder_input_types[] =
|
||||
@@ -640,6 +660,18 @@ mfts[] =
|
||||
wmv_decoder_output_types,
|
||||
NULL
|
||||
},
|
||||
+ {
|
||||
+ &CLSID_CWMADecMediaObject,
|
||||
+ &MFT_CATEGORY_AUDIO_DECODER,
|
||||
+ wmadecoderW,
|
||||
+ MFT_ENUM_FLAG_SYNCMFT,
|
||||
+ &MFMediaType_Audio,
|
||||
+ ARRAY_SIZE(wma_decoder_input_types),
|
||||
+ wma_decoder_input_types,
|
||||
+ ARRAY_SIZE(wma_decoder_output_types),
|
||||
+ wma_decoder_output_types,
|
||||
+ NULL
|
||||
+ },
|
||||
{
|
||||
&CLSID_CMpeg4sDecMFT,
|
||||
&MFT_CATEGORY_VIDEO_DECODER,
|
||||
diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl
|
||||
index 2382a884069..3aa85dfdab3 100644
|
||||
--- a/dlls/winegstreamer/winegstreamer_classes.idl
|
||||
+++ b/dlls/winegstreamer/winegstreamer_classes.idl
|
||||
@@ -97,3 +97,9 @@ coclass CMpeg4sDecMFT { }
|
||||
uuid(82d353df-90bd-4382-8bc2-3f6192b76e34)
|
||||
]
|
||||
coclass CLSID_CWMVDecMediaObject {}
|
||||
+
|
||||
+[
|
||||
+ threading(both),
|
||||
+ uuid(2eeb4adf-4578-4d10-bca7-bb955f56320a)
|
||||
+]
|
||||
+coclass CLSID_CWMADecMediaObject {}
|
||||
diff --git a/include/mfidl.idl b/include/mfidl.idl
|
||||
index 926f593b3bc..ca469846458 100644
|
||||
--- a/include/mfidl.idl
|
||||
+++ b/include/mfidl.idl
|
||||
@@ -1310,4 +1310,5 @@ cpp_quote("EXTERN_GUID(CLSID_CMSH264DecoderMFT, 0x62ce7e72, 0x4c71, 0x4d20, 0xb1
|
||||
cpp_quote("EXTERN_GUID(CLSID_CMSAACDecMFT, 0x32d186a7, 0x218f, 0x4c75, 0x88, 0x76, 0xdd, 0x77, 0x27, 0x3a, 0x89, 0x99);")
|
||||
cpp_quote("EXTERN_GUID(CLSID_CMpeg4sDecMFT, 0x5686a0d9, 0xfe39, 0x409f, 0x9d, 0xff, 0x3f, 0xdb, 0xc8, 0x49, 0xf9, 0xf5);")
|
||||
cpp_quote("EXTERN_GUID(CLSID_ASFByteStreamHandler, 0x41457294, 0x644c, 0x4298, 0xa2, 0x8a, 0xbd, 0x69, 0xf2, 0xc0, 0xcf, 0x3b);")
|
||||
-cpp_quote("EXTERN_GUID(CLSID_CWMVDecMediaObject, 0x82d353df, 0x90bd, 0x4382, 0x8b, 0xc2, 0x3f, 0x61, 0x92, 0xb7, 0x6e, 0x34);")
|
||||
\ No newline at end of file
|
||||
+cpp_quote("EXTERN_GUID(CLSID_CWMVDecMediaObject, 0x82d353df, 0x90bd, 0x4382, 0x8b, 0xc2, 0x3f, 0x61, 0x92, 0xb7, 0x6e, 0x34);")
|
||||
+cpp_quote("EXTERN_GUID(CLSID_CWMADecMediaObject, 0x2eeb4adf, 0x4578, 0x4d10, 0xbc, 0xa7, 0xbb, 0x95, 0x5f, 0x56, 0x32, 0x0a);")
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,40 +0,0 @@
|
||||
From e5559216bfd46ba7d5cb294808df15ee06c08725 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Crider <gloriouseggroll@gmail.com>
|
||||
Date: Tue, 8 Dec 2020 11:40:00 -0500
|
||||
Subject: [PATCH] winegstreamer: fix oopsie on audio and color converter
|
||||
ProcessMessage case
|
||||
|
||||
---
|
||||
dlls/winegstreamer/audioconvert.c | 2 +-
|
||||
dlls/winegstreamer/colorconvert.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
|
||||
index e709c43ed5c..b3c4c371be5 100644
|
||||
--- a/dlls/winegstreamer/audioconvert.c
|
||||
+++ b/dlls/winegstreamer/audioconvert.c
|
||||
@@ -567,7 +567,7 @@ static HRESULT WINAPI audio_converter_ProcessMessage(IMFTransform *iface, MFT_ME
|
||||
|
||||
switch(message)
|
||||
{
|
||||
- case MFT_MESSAGE_NOTIFY_START_OF_STREAM:
|
||||
+ case MFT_MESSAGE_NOTIFY_BEGIN_STREAMING:
|
||||
return S_OK;
|
||||
default:
|
||||
FIXME("Unhandled message type %x.\n", message);
|
||||
diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c
|
||||
index c7b1fae393f..b049d0c074a 100644
|
||||
--- a/dlls/winegstreamer/colorconvert.c
|
||||
+++ b/dlls/winegstreamer/colorconvert.c
|
||||
@@ -562,7 +562,7 @@ static HRESULT WINAPI color_converter_ProcessMessage(IMFTransform *iface, MFT_ME
|
||||
|
||||
switch(message)
|
||||
{
|
||||
- case MFT_MESSAGE_NOTIFY_START_OF_STREAM:
|
||||
+ case MFT_MESSAGE_NOTIFY_BEGIN_STREAMING:
|
||||
return S_OK;
|
||||
default:
|
||||
FIXME("Unhandled message type %x.\n", message);
|
||||
--
|
||||
2.28.0
|
||||
|
@ -1,35 +0,0 @@
|
||||
From e8cf102151b0fdcd5ccf54ad207e1256e3725b3c Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sun, 30 Aug 2020 12:37:59 +1000
|
||||
Subject: [PATCH] winegstreamer: Support eAVEncH264VProfile_ConstrainedBase
|
||||
media type
|
||||
|
||||
Game: American Fugitive
|
||||
---
|
||||
dlls/winegstreamer/mfplat.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index 21d44c498b8..7e482b77863 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -835,6 +835,8 @@ static IMFMediaType* transform_to_media_type(GstCaps *caps)
|
||||
IMFMediaType_SetUINT32(media_type, &MF_MT_MPEG2_PROFILE, eAVEncH264VProfile_High);
|
||||
else if (!(strcmp(profile, "high-4:4:4")))
|
||||
IMFMediaType_SetUINT32(media_type, &MF_MT_MPEG2_PROFILE, eAVEncH264VProfile_444);
|
||||
+ else if (!(strcmp(profile, "constrained-baseline")))
|
||||
+ IMFMediaType_SetUINT32(media_type, &MF_MT_MPEG2_PROFILE, eAVEncH264VProfile_ConstrainedBase);
|
||||
else
|
||||
FIXME("Unrecognized profile %s\n", profile);
|
||||
}
|
||||
@@ -1274,6 +1276,7 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type)
|
||||
case eAVEncH264VProfile_Main: profile = "main"; break;
|
||||
case eAVEncH264VProfile_High: profile = "high"; break;
|
||||
case eAVEncH264VProfile_444: profile = "high-4:4:4"; break;
|
||||
+ case eAVEncH264VProfile_ConstrainedBase: profile = "constrained-baseline"; break;
|
||||
default: FIXME("Unknown profile %u\n", h264_profile);
|
||||
}
|
||||
if (profile)
|
||||
--
|
||||
2.28.0
|
||||
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "76c9dbd4fb99f1257734908906c846a3c25ca77b"
|
||||
echo "3acb0b3326c4120ea0c4c6076bd03c9cfe82c744"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -2848,65 +2848,32 @@ fi
|
||||
# | * [#49692] Multiple applications need a Media Foundation media source implementation
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/mf/Makefile.in, dlls/mf/handler.c, dlls/mf/handler.h, dlls/mf/main.c, dlls/mf/session.c, dlls/mf/tests/mf.c,
|
||||
# | dlls/mfplat/tests/mfplat.c, dlls/mfplat/tests/test.mp4, dlls/mfreadwrite/reader.c, dlls/mfreadwrite/tests/mfplat.c,
|
||||
# | dlls/mfreadwrite/tests/resource.rc, dlls/mfreadwrite/tests/test.mp4, dlls/winegstreamer/Makefile.in,
|
||||
# | dlls/winegstreamer/audioconvert.c, dlls/winegstreamer/colorconvert.c, dlls/winegstreamer/gst_cbs.c,
|
||||
# | dlls/winegstreamer/gst_cbs.h, dlls/winegstreamer/gst_private.h, dlls/winegstreamer/media_source.c,
|
||||
# | dlls/winegstreamer/mf_decode.c, dlls/winegstreamer/mfplat.c, dlls/winegstreamer/winegstreamer_classes.idl,
|
||||
# | include/mfidl.idl, tools/make_makefiles, tools/makedep.c
|
||||
# | * dlls/winegstreamer/Makefile.in, dlls/winegstreamer/audioconvert.c, dlls/winegstreamer/colorconvert.c,
|
||||
# | dlls/winegstreamer/gst_private.h, dlls/winegstreamer/media_source.c, dlls/winegstreamer/mfplat.c,
|
||||
# | dlls/winegstreamer/winegstreamer_classes.idl, include/wmcodecdsp.idl
|
||||
# |
|
||||
if test "$enable_mfplat_streaming_support" -eq 1; then
|
||||
patch_apply mfplat-streaming-support/0001-winegstreamer-Correct-mistaken-enum-value-in-Process.patch
|
||||
patch_apply mfplat-streaming-support/0002-winegstreamer-Reformat-type-setting-functions-to-pre.patch
|
||||
patch_apply mfplat-streaming-support/0003-winegstreamer-Implement-Process-Input-Output-for-aud.patch
|
||||
patch_apply mfplat-streaming-support/0004-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch
|
||||
patch_apply mfplat-streaming-support/0005-winegstreamer-Implement-Get-Attributes-functions-for.patch
|
||||
patch_apply mfplat-streaming-support/0007-winegstreamer-Introduce-color-conversion-transform.patch
|
||||
patch_apply mfplat-streaming-support/0008-winegstreamer-Register-the-color-conversion-transfor.patch
|
||||
patch_apply mfplat-streaming-support/0009-winegstreamer-Implement-GetInputAvailableType-for-co.patch
|
||||
patch_apply mfplat-streaming-support/0010-winegstreamer-Implement-SetInputType-for-color-conve.patch
|
||||
patch_apply mfplat-streaming-support/0011-winegstreamer-Implement-GetOutputAvailableType-for-c.patch
|
||||
patch_apply mfplat-streaming-support/0012-winegstreamer-Implement-SetOutputType-for-color-conv.patch
|
||||
patch_apply mfplat-streaming-support/0013-winegstreamer-Implement-Process-Input-Output-for-col.patch
|
||||
patch_apply mfplat-streaming-support/0014-winegstreamer-Implement-ProcessMessage-for-color-con.patch
|
||||
patch_apply mfplat-streaming-support/0015-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch
|
||||
patch_apply mfplat-streaming-support/0016-winegstreamer-Implement-Get-Attributes-functions-for.patch
|
||||
patch_apply mfplat-streaming-support/0017-winegstreamer-Implement-Get-Input-Output-CurrentType.patch
|
||||
patch_apply mfplat-streaming-support/0018-winegstreamer-Implement-IMFMediaSource-Stop.patch
|
||||
patch_apply mfplat-streaming-support/0019-winegstreamer-Set-MF_MT_ALL_SAMPLES_INDEPENDENT-attr.patch
|
||||
patch_apply mfplat-streaming-support/0020-mf-Add-invalid-connect-method-test.patch
|
||||
patch_apply mfplat-streaming-support/0021-Allow-for-compressed-types.patch
|
||||
patch_apply mfplat-streaming-support/0022-mf-session-Unconditionally-deliver-NULL-EOS-samples.patch
|
||||
patch_apply mfplat-streaming-support/0023-mf-session-Request-more-samples-when-a-transform-nee.patch
|
||||
patch_apply mfplat-streaming-support/0024-HACK-Flush-decoder-when-changing-times.patch
|
||||
patch_apply mfplat-streaming-support/0025-winegstreamer-Add-IMFSeekInfo-GetNearestKeyFrames-st.patch
|
||||
patch_apply mfplat-streaming-support/0026-winegstreamer-Fixup-raw-audio-caps-to-be-compatible-.patch
|
||||
patch_apply mfplat-streaming-support/0027-winegstreamer-Set-MF_PD_MIME_TYPE-on-source-s-presen.patch
|
||||
patch_apply mfplat-streaming-support/0028-winegstreamer-Insert-parser-into-pipeline-to-rectify.patch
|
||||
patch_apply mfplat-streaming-support/0029-winegstreamer-Translate-H.264-caps-to-attributes.patch
|
||||
patch_apply mfplat-streaming-support/0030-winegstreamer-Translate-WMV-caps-to-attributes.patch
|
||||
patch_apply mfplat-streaming-support/0031-winegstreamer-Translate-AAC-caps-to-attributes.patch
|
||||
patch_apply mfplat-streaming-support/0032-winegstreamer-Translate-MPEG-4-Section-2-caps-to-att.patch
|
||||
patch_apply mfplat-streaming-support/0033-winegstreamer-Translate-WMA-caps-to-attributes.patch
|
||||
patch_apply mfplat-streaming-support/0034-winegstreamer-Translate-H.264-attributes-to-caps.patch
|
||||
patch_apply mfplat-streaming-support/0035-winegstreamer-Translate-WMV-attributes-to-caps.patch
|
||||
patch_apply mfplat-streaming-support/0036-winegstreamer-Translate-AAC-attributes-to-caps.patch
|
||||
patch_apply mfplat-streaming-support/0037-winegstreamer-Translate-MPEG-4-Section-2-attributes-.patch
|
||||
patch_apply mfplat-streaming-support/0038-winegstreamer-Translate-WMA-attributes-to-caps.patch
|
||||
patch_apply mfplat-streaming-support/0039-tools-Add-support-for-multiple-parent-directories.patch
|
||||
patch_apply mfplat-streaming-support/0040-mf-Introduce-handler-helper.patch
|
||||
patch_apply mfplat-streaming-support/0041-winegstreamer-Implement-decoder-MFT-on-gstreamer.patch
|
||||
patch_apply mfplat-streaming-support/0042-mfreadwrite-Select-all-streams-when-creating-a-sourc.patch
|
||||
patch_apply mfplat-streaming-support/0043-Miscellaneous.patch
|
||||
patch_apply mfplat-streaming-support/0044-WMV.patch
|
||||
patch_apply mfplat-streaming-support/0045-Expose-PCM-output-type-on-AAC-decoder.patch
|
||||
patch_apply mfplat-streaming-support/0046-Improve-tests.patch
|
||||
patch_apply mfplat-streaming-support/0047-Revert-Improve-tests.patch
|
||||
patch_apply mfplat-streaming-support/0048-Report-streams-backwards-and-only-select-one-of-each.patch
|
||||
patch_apply mfplat-streaming-support/0049-winegstreamer-Introduce-MPEG-4-Section-2-video-decod.patch
|
||||
patch_apply mfplat-streaming-support/0050-winegstreamer-Introduce-WMA-audio-decoder.patch
|
||||
patch_apply mfplat-streaming-support/0051-winegstreamer-Implement-MF_SD_LANGUAGE.patch
|
||||
patch_apply mfplat-streaming-support/0052-winegstreamer-fix-oopsie-on-audio-and-color-converte.patch
|
||||
patch_apply mfplat-streaming-support/0060-winegstreamer-Support-eAVEncH264VProfile_Constrained.patch
|
||||
patch_apply mfplat-streaming-support/0005-winegstreamer-Semi-stub-Get-Attributes-functions-for.patch
|
||||
patch_apply mfplat-streaming-support/0006-winegstreamer-Introduce-color-conversion-transform.patch
|
||||
patch_apply mfplat-streaming-support/0007-winegstreamer-Register-the-color-conversion-transfor.patch
|
||||
patch_apply mfplat-streaming-support/0008-winegstreamer-Implement-GetInputAvailableType-for-co.patch
|
||||
patch_apply mfplat-streaming-support/0009-winegstreamer-Implement-SetInputType-for-color-conve.patch
|
||||
patch_apply mfplat-streaming-support/0010-winegstreamer-Implement-GetOutputAvailableType-for-c.patch
|
||||
patch_apply mfplat-streaming-support/0011-winegstreamer-Implement-SetOutputType-for-color-conv.patch
|
||||
patch_apply mfplat-streaming-support/0012-winegstreamer-Implement-Process-Input-Output-for-col.patch
|
||||
patch_apply mfplat-streaming-support/0013-winegstreamer-Implement-ProcessMessage-for-color-con.patch
|
||||
patch_apply mfplat-streaming-support/0014-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch
|
||||
patch_apply mfplat-streaming-support/0015-winegstreamer-Semi-stub-Get-Attributes-functions-for.patch
|
||||
patch_apply mfplat-streaming-support/0016-winegstreamer-Implement-Get-Input-Output-CurrentType.patch
|
||||
patch_apply mfplat-streaming-support/0017-winegstreamer-Implement-IMFMediaSource-Stop.patch
|
||||
patch_apply mfplat-streaming-support/0018-winegstreamer-Set-MF_MT_ALL_SAMPLES_INDEPENDENT-attr.patch
|
||||
patch_apply mfplat-streaming-support/0019-winegstreamer-Implement-MF_SD_LANGUAGE.patch
|
||||
patch_apply mfplat-streaming-support/0020-winegstreamer-Report-streams-backwards.patch
|
||||
patch_apply mfplat-streaming-support/0021-winegstreamer-In-the-default-configuration-select-on.patch
|
||||
fi
|
||||
|
||||
# Patchset mmsystem.dll16-MIDIHDR_Refcount
|
||||
|
Loading…
x
Reference in New Issue
Block a user