mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against 572aa09de1b0e3ba0e8b19f48d5e96539625bb0a.
This commit is contained in:
parent
e2d9f97b61
commit
009f571ba1
@ -1,34 +0,0 @@
|
||||
From b67e6dbb9a8f772c27a074ac0fa1474b4f0fc8c6 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 31 Mar 2020 15:15:07 -0500
|
||||
Subject: [PATCH] winegstreamer: Implement IMFMediaSource::GetCharacteristics.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/media_source.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index d25e34dec68..dd01cfc4f86 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -1114,12 +1114,14 @@ static HRESULT WINAPI media_source_GetCharacteristics(IMFMediaSource *iface, DWO
|
||||
{
|
||||
struct media_source *source = impl_from_IMFMediaSource(iface);
|
||||
|
||||
- FIXME("(%p)->(%p): stub\n", source, characteristics);
|
||||
+ TRACE("(%p)->(%p)\n", source, characteristics);
|
||||
|
||||
if (source->state == SOURCE_SHUTDOWN)
|
||||
return MF_E_SHUTDOWN;
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ *characteristics = MFMEDIASOURCE_CAN_SEEK;
|
||||
+
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI media_source_CreatePresentationDescriptor(IMFMediaSource *iface, IMFPresentationDescriptor **descriptor)
|
||||
--
|
||||
2.28.0
|
||||
|
@ -1,65 +0,0 @@
|
||||
From f8037812ce48a4fc1b6b0a85de543e66f57063b6 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 31 Mar 2020 15:15:50 -0500
|
||||
Subject: [PATCH] winegstreamer: Calculate the MF_PD_DURATION of the media
|
||||
source's PD.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/winegstreamer/media_source.c | 40 +++++++++++++++++++++++++++++++
|
||||
1 file changed, 40 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index dd01cfc4f86..6873b4e7844 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -1445,6 +1445,46 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
heap_free(descriptors);
|
||||
descriptors = NULL;
|
||||
|
||||
+ /* miscelaneous presentation descriptor setup */
|
||||
+ {
|
||||
+ IMFAttributes *byte_stream_attributes;
|
||||
+ gint64 total_pres_time = 0;
|
||||
+
|
||||
+ 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);
|
||||
+ }
|
||||
+
|
||||
+ for (unsigned int i = 0; i < object->stream_count; i++)
|
||||
+ {
|
||||
+ GstQuery *query = gst_query_new_duration(GST_FORMAT_TIME);
|
||||
+ if (gst_pad_query(object->streams[i]->their_src, query))
|
||||
+ {
|
||||
+ gint64 stream_pres_time;
|
||||
+ gst_query_parse_duration(query, NULL, &stream_pres_time);
|
||||
+
|
||||
+ TRACE("Stream %u has duration %lu\n", i, stream_pres_time);
|
||||
+
|
||||
+ if (stream_pres_time > total_pres_time)
|
||||
+ total_pres_time = stream_pres_time;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ WARN("Unable to get presentation time of stream %u\n", i);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (object->stream_count)
|
||||
+ IMFPresentationDescriptor_SetUINT64(object->pres_desc, &MF_PD_DURATION, total_pres_time / 100);
|
||||
+ }
|
||||
+
|
||||
object->state = SOURCE_STOPPED;
|
||||
|
||||
*out_media_source = object;
|
||||
--
|
||||
2.28.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 8ab005d36300ac40431a1cde96344d2649143a91 Mon Sep 17 00:00:00 2001
|
||||
From b7c1863e4ed928c15a8a1c7ef631369911958e08 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Mon, 16 Mar 2020 15:27:27 -0500
|
||||
Subject: [PATCH] Miscellaneous
|
||||
@ -7,11 +7,11 @@ 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 | 137 +++++++++++++++++++++++++++++-
|
||||
4 files changed, 155 insertions(+), 15 deletions(-)
|
||||
dlls/winegstreamer/media_source.c | 135 +++++++++++++++++++++++++++++-
|
||||
4 files changed, 154 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/mfreadwrite/reader.c b/dlls/mfreadwrite/reader.c
|
||||
index 93858840940..097921a4cc4 100644
|
||||
index 935074d62f9..9d86a5a0f8f 100644
|
||||
--- a/dlls/mfreadwrite/reader.c
|
||||
+++ b/dlls/mfreadwrite/reader.c
|
||||
@@ -1597,6 +1597,7 @@ static HRESULT source_reader_create_decoder_for_stream(struct source_reader *rea
|
||||
@ -102,7 +102,7 @@ index 6659aedefa5..825b46d13bb 100644
|
||||
|
||||
#endif
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index 66aa7d92ed8..f372e178b68 100644
|
||||
index 3c423f6d758..5e4691295f0 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -92,6 +92,8 @@ struct source_async_command
|
||||
@ -131,7 +131,7 @@ index 66aa7d92ed8..f372e178b68 100644
|
||||
static inline struct media_source *impl_from_async_commands_callback_IMFAsyncCallback(IMFAsyncCallback *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, struct media_source, async_commands_callback);
|
||||
@@ -518,6 +530,11 @@ static gboolean bytestream_query(GstPad *pad, GstObject *parent, GstQuery *query
|
||||
@@ -520,6 +532,11 @@ static gboolean bytestream_query(GstPad *pad, GstObject *parent, GstQuery *query
|
||||
gst_query_add_scheduling_mode(query, GST_PAD_MODE_PULL);
|
||||
return TRUE;
|
||||
}
|
||||
@ -143,7 +143,7 @@ index 66aa7d92ed8..f372e178b68 100644
|
||||
default:
|
||||
{
|
||||
WARN("Unhandled query type %s\n", GST_QUERY_TYPE_NAME(query));
|
||||
@@ -580,6 +597,23 @@ GstBusSyncReply bus_watch(GstBus *bus, GstMessage *message, gpointer user)
|
||||
@@ -582,6 +599,23 @@ GstBusSyncReply bus_watch(GstBus *bus, GstMessage *message, gpointer user)
|
||||
g_error_free(err);
|
||||
g_free(dbg_info);
|
||||
break;
|
||||
@ -167,7 +167,7 @@ index 66aa7d92ed8..f372e178b68 100644
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1036,6 +1070,10 @@ static HRESULT WINAPI media_source_QueryInterface(IMFMediaSource *iface, REFIID
|
||||
@@ -1041,6 +1075,10 @@ static HRESULT WINAPI media_source_QueryInterface(IMFMediaSource *iface, REFIID
|
||||
{
|
||||
*out = &source->IMFMediaSource_iface;
|
||||
}
|
||||
@ -178,7 +178,7 @@ index 66aa7d92ed8..f372e178b68 100644
|
||||
else
|
||||
{
|
||||
FIXME("(%s, %p)\n", debugstr_guid(riid), out);
|
||||
@@ -1120,7 +1158,7 @@ static HRESULT WINAPI media_source_GetCharacteristics(IMFMediaSource *iface, DWO
|
||||
@@ -1125,7 +1163,7 @@ static HRESULT WINAPI media_source_GetCharacteristics(IMFMediaSource *iface, DWO
|
||||
if (source->state == SOURCE_SHUTDOWN)
|
||||
return MF_E_SHUTDOWN;
|
||||
|
||||
@ -187,7 +187,7 @@ index 66aa7d92ed8..f372e178b68 100644
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -1265,6 +1303,99 @@ static const IMFMediaSourceVtbl IMFMediaSource_vtbl =
|
||||
@@ -1270,6 +1308,99 @@ static const IMFMediaSourceVtbl IMFMediaSource_vtbl =
|
||||
media_source_Shutdown,
|
||||
};
|
||||
|
||||
@ -287,8 +287,8 @@ index 66aa7d92ed8..f372e178b68 100644
|
||||
/* 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)
|
||||
@@ -1342,6 +1473,8 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
return E_OUTOFMEMORY;
|
||||
@@ -1358,6 +1489,8 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
}
|
||||
|
||||
object->IMFMediaSource_iface.lpVtbl = &IMFMediaSource_vtbl;
|
||||
+ object->IMFGetService_iface.lpVtbl = &IMFGetService_vtbl;
|
||||
@ -296,22 +296,6 @@ index 66aa7d92ed8..f372e178b68 100644
|
||||
object->async_commands_callback.lpVtbl = &source_async_commands_callback_vtbl;
|
||||
object->ref = 1;
|
||||
object->byte_stream = bytestream;
|
||||
@@ -1446,7 +1579,6 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
heap_free(descriptors);
|
||||
descriptors = NULL;
|
||||
|
||||
- /* miscelaneous presentation descriptor setup */
|
||||
{
|
||||
IMFAttributes *byte_stream_attributes;
|
||||
gint64 total_pres_time = 0;
|
||||
@@ -1463,6 +1595,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
IMFAttributes_Release(byte_stream_attributes);
|
||||
}
|
||||
|
||||
+ /* TODO: consider streams which don't start at T=0 */
|
||||
for (unsigned int i = 0; i < object->stream_count; i++)
|
||||
{
|
||||
GstQuery *query = gst_query_new_duration(GST_FORMAT_TIME);
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 478e50712170c56dece0226f42b2d605e94949b2 Mon Sep 17 00:00:00 2001
|
||||
From d4ed09c6230669d7617e411f6e8fa02a3f27da68 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
|
||||
@ -9,18 +9,18 @@ Subject: [PATCH] Report streams backwards and only select one of each stream
|
||||
1 file changed, 22 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index 46b290d040c..9fa8b106ba2 100644
|
||||
index 5e4691295f0..f42f13b50b4 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -1467,6 +1467,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
@@ -1469,6 +1469,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);
|
||||
|
||||
struct media_source *object = heap_alloc_zero(sizeof(*object));
|
||||
+ BOOL video_selected = FALSE, audio_selected = FALSE;
|
||||
IMFStreamDescriptor **descriptors = NULL;
|
||||
unsigned int i;
|
||||
HRESULT hr;
|
||||
@@ -1568,15 +1569,34 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
gint64 total_pres_time = 0;
|
||||
DWORD bytestream_caps;
|
||||
@@ -1581,15 +1582,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++)
|
||||
{
|
||||
|
@ -1 +1,2 @@
|
||||
Fixes: [49692] Multiple applications need a Media Foundation media source implementation
|
||||
Disabled: True
|
||||
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "70d77a439ab58dcf56664d1545aa0c4cd3edb31e"
|
||||
echo "572aa09de1b0e3ba0e8b19f48d5e96539625bb0a"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -145,7 +145,6 @@ patch_enable_all ()
|
||||
enable_krnl386_exe16_GDT_LDT_Emulation="$1"
|
||||
enable_krnl386_exe16_Invalid_Console_Handles="$1"
|
||||
enable_loader_KeyboardLayouts="$1"
|
||||
enable_mfplat_streaming_support="$1"
|
||||
enable_mmsystem_dll16_MIDIHDR_Refcount="$1"
|
||||
enable_mountmgr_DosDevices="$1"
|
||||
enable_mscoree_CorValidateImage="$1"
|
||||
@ -520,9 +519,6 @@ patch_enable ()
|
||||
loader-KeyboardLayouts)
|
||||
enable_loader_KeyboardLayouts="$2"
|
||||
;;
|
||||
mfplat-streaming-support)
|
||||
enable_mfplat_streaming_support="$2"
|
||||
;;
|
||||
mmsystem.dll16-MIDIHDR_Refcount)
|
||||
enable_mmsystem_dll16_MIDIHDR_Refcount="$2"
|
||||
;;
|
||||
@ -2813,67 +2809,6 @@ if test "$enable_loader_KeyboardLayouts" -eq 1; then
|
||||
patch_apply loader-KeyboardLayouts/0002-user32-Improve-GetKeyboardLayoutList.patch
|
||||
fi
|
||||
|
||||
# Patchset mfplat-streaming-support
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#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/mf/topology.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/main.c,
|
||||
# | 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
|
||||
# |
|
||||
if test "$enable_mfplat_streaming_support" -eq 1; then
|
||||
patch_apply mfplat-streaming-support/0005-mf-Unconditionally-deliver-NULL-EOS-samples.patch
|
||||
patch_apply mfplat-streaming-support/0011-winegstreamer-Insert-parser-into-pipeline-to-rectify.patch
|
||||
patch_apply mfplat-streaming-support/0012-winegstreamer-Translate-H.264-caps-to-attributes.patch
|
||||
patch_apply mfplat-streaming-support/0013-winegstreamer-Translate-WMV-caps-to-attributes.patch
|
||||
patch_apply mfplat-streaming-support/0014-winegstreamer-Translate-AAC-caps-to-attributes.patch
|
||||
patch_apply mfplat-streaming-support/0015-winegstreamer-Translate-MPEG-4-Section-2-caps-to-att.patch
|
||||
patch_apply mfplat-streaming-support/0016-winegstreamer-Translate-WMA-caps-to-attributes.patch
|
||||
patch_apply mfplat-streaming-support/0017-winegstreamer-Translate-H.264-attributes-to-caps.patch
|
||||
patch_apply mfplat-streaming-support/0018-winegstreamer-Translate-WMV-attributes-to-caps.patch
|
||||
patch_apply mfplat-streaming-support/0019-winegstreamer-Translate-AAC-attributes-to-caps.patch
|
||||
patch_apply mfplat-streaming-support/0020-winegstreamer-Translate-MPEG-4-Section-2-attributes-.patch
|
||||
patch_apply mfplat-streaming-support/0021-winegstreamer-Translate-WMA-attributes-to-caps.patch
|
||||
patch_apply mfplat-streaming-support/0022-winegstreamer-Implement-IMFMediaSource-GetCharacteri.patch
|
||||
patch_apply mfplat-streaming-support/0023-winegstreamer-Calculate-the-MF_PD_DURATION-of-the-me.patch
|
||||
patch_apply mfplat-streaming-support/0024-tools-Add-support-for-multiple-parent-directories.patch
|
||||
patch_apply mfplat-streaming-support/0025-mf-Introduce-handler-helper.patch
|
||||
patch_apply mfplat-streaming-support/0026-Introduce-IMFSample-GstBuffer-converter.patch
|
||||
patch_apply mfplat-streaming-support/0027-winegstreamer-Implement-decoder-MFT-on-gstreamer.patch
|
||||
patch_apply mfplat-streaming-support/0028-mfreadwrite-Select-all-streams-when-creating-a-sourc.patch
|
||||
patch_apply mfplat-streaming-support/0029-Miscellaneous.patch
|
||||
patch_apply mfplat-streaming-support/0030-WMV.patch
|
||||
patch_apply mfplat-streaming-support/0031-mf-Ask-for-more-samples-from-upstream-node-when-upon.patch
|
||||
patch_apply mfplat-streaming-support/0033-Expose-PCM-output-type-on-AAC-decoder.patch
|
||||
patch_apply mfplat-streaming-support/0035-winegstreamer-Implement-Color-Converter-MFT.patch
|
||||
patch_apply mfplat-streaming-support/0036-HACK-Set-BPS-to-16-for-output-template.patch
|
||||
patch_apply mfplat-streaming-support/0037-Improve-tests.patch
|
||||
patch_apply mfplat-streaming-support/0038-Revert-Improve-tests.patch
|
||||
patch_apply mfplat-streaming-support/0039-Report-streams-backwards-and-only-select-one-of-each.patch
|
||||
patch_apply mfplat-streaming-support/0040-winegstreamer-Implement-IMFMediaSource-Stop.patch
|
||||
patch_apply mfplat-streaming-support/0041-winegstreamer-Introduce-MPEG-4-Section-2-video-decod.patch
|
||||
patch_apply mfplat-streaming-support/0042-HACK-Switch-between-all-selection-streams-on-MF_SOUR.patch
|
||||
patch_apply mfplat-streaming-support/0043-winegstreamer-Introduce-WMA-audio-decoder.patch
|
||||
patch_apply mfplat-streaming-support/0044-Support-stereo-down-folding.patch
|
||||
patch_apply mfplat-streaming-support/0045-winegstreamer-Implement-MF_SD_LANGUAGE.patch
|
||||
patch_apply mfplat-streaming-support/0046-Revert-mf-topoloader-Add-a-structure-for-iterative-b.patch
|
||||
patch_apply mfplat-streaming-support/0047-Revert-mf-topoloader-Clone-source-nodes-as-a-first-l.patch
|
||||
patch_apply mfplat-streaming-support/0048-Revert-mf-topoloader-Switch-to-public-interface-for-.patch
|
||||
patch_apply mfplat-streaming-support/0049-mf-Partially-implement-the-topology-loader.patch
|
||||
patch_apply mfplat-streaming-support/0050-mf-Miscelaneous-fixes-to-topology-resolution.patch
|
||||
patch_apply mfplat-streaming-support/0051-Rewrite-branch-resolver.patch
|
||||
patch_apply mfplat-streaming-support/0052-winegstreamer-Implement-audio-conversion-MFT.patch
|
||||
patch_apply mfplat-streaming-support/0053-HACK-Shutdown-media-sinks-on-session-shutdown.patch
|
||||
patch_apply mfplat-streaming-support/0054-HACK-Flush-decoder-when-changing-times.patch
|
||||
patch_apply mfplat-streaming-support/0060-winegstreamer-Support-eAVEncH264VProfile_Constrained.patch
|
||||
fi
|
||||
|
||||
# Patchset mmsystem.dll16-MIDIHDR_Refcount
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -1 +1 @@
|
||||
70d77a439ab58dcf56664d1545aa0c4cd3edb31e
|
||||
572aa09de1b0e3ba0e8b19f48d5e96539625bb0a
|
||||
|
Loading…
Reference in New Issue
Block a user