mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against c9e2deac39924473ac538ee22a2a0c0dbe3bad85.
This commit is contained in:
parent
c118dfd709
commit
44f49e8001
@ -1,27 +0,0 @@
|
||||
From d0b869a25b3924794855379017bf023241397ae8 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 27 Oct 2020 10:18:22 -0500
|
||||
Subject: [PATCH] winegstreamer: Replace gst_pad_get_current_caps with
|
||||
gst_pad_query_caps.
|
||||
|
||||
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 0991710755c..d6c7837e544 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -388,7 +388,7 @@ static const IMFMediaStreamVtbl media_stream_vtbl =
|
||||
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_get_current_caps(stream->their_src);
|
||||
+ GstCaps *source_caps = gst_pad_query_caps(stream->their_src, NULL);
|
||||
const gchar *stream_type;
|
||||
|
||||
if (!source_caps)
|
||||
--
|
||||
2.28.0
|
||||
|
@ -1,209 +0,0 @@
|
||||
From 6d7bcc3e6efe220d010aa72039e3f0dc71b63f1f Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 31 Mar 2020 11:21:21 -0500
|
||||
Subject: [PATCH] winegstreamer: Implement
|
||||
IMFMediaSource::CreatePresentationDescriptor.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
dlls/mf/tests/mf.c | 1 -
|
||||
dlls/mfplat/tests/mfplat.c | 10 +++++-----
|
||||
dlls/mfreadwrite/tests/mfplat.c | 15 ++++++++++-----
|
||||
dlls/winegstreamer/media_source.c | 28 ++++++++++++++++++++++++++--
|
||||
4 files changed, 41 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
|
||||
index b110c0ec9ef..be8241a51d7 100644
|
||||
--- a/dlls/mf/tests/mf.c
|
||||
+++ b/dlls/mf/tests/mf.c
|
||||
@@ -1452,7 +1452,6 @@ todo_wine
|
||||
return;
|
||||
|
||||
hr = IMFMediaSource_CreatePresentationDescriptor(source, &pd);
|
||||
-todo_wine
|
||||
ok(hr == S_OK, "Failed to create descriptor, hr %#x.\n", hr);
|
||||
if (FAILED(hr))
|
||||
return;
|
||||
diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c
|
||||
index 971469ec574..6a1a5bafc1a 100644
|
||||
--- a/dlls/mfplat/tests/mfplat.c
|
||||
+++ b/dlls/mfplat/tests/mfplat.c
|
||||
@@ -574,10 +574,7 @@ static void test_source_resolver(void)
|
||||
ok(obj_type == MF_OBJECT_MEDIASOURCE, "got %d\n", obj_type);
|
||||
|
||||
hr = IMFMediaSource_CreatePresentationDescriptor(mediasource, &descriptor);
|
||||
-todo_wine
|
||||
ok(hr == S_OK, "Failed to get presentation descriptor, hr %#x.\n", hr);
|
||||
- if (FAILED(hr))
|
||||
- goto skip_source_tests;
|
||||
ok(descriptor != NULL, "got %p\n", descriptor);
|
||||
|
||||
hr = IMFPresentationDescriptor_GetStreamDescriptorByIndex(descriptor, 0, &selected, &sd);
|
||||
@@ -597,6 +594,7 @@ todo_wine
|
||||
ok(hr == S_OK, "Failed to get current media type, hr %#x.\n", hr);
|
||||
hr = IMFMediaType_GetGUID(media_type, &MF_MT_SUBTYPE, &guid);
|
||||
ok(hr == S_OK, "Failed to get media sub type, hr %#x.\n", hr);
|
||||
+todo_wine
|
||||
ok(IsEqualGUID(&guid, &MFVideoFormat_M4S2), "Unexpected sub type %s.\n", debugstr_guid(&guid));
|
||||
IMFMediaType_Release(media_type);
|
||||
|
||||
@@ -605,7 +603,10 @@ todo_wine
|
||||
|
||||
var.vt = VT_EMPTY;
|
||||
hr = IMFMediaSource_Start(mediasource, descriptor, &GUID_NULL, &var);
|
||||
+todo_wine
|
||||
ok(hr == S_OK, "Failed to start media source, hr %#x.\n", hr);
|
||||
+ if (FAILED(hr))
|
||||
+ goto skip_source_tests;
|
||||
|
||||
get_event((IMFMediaEventGenerator *)mediasource, MENewStream, &var);
|
||||
ok(var.vt == VT_UNKNOWN, "Unexpected value type %u from MENewStream event.\n", var.vt);
|
||||
@@ -668,11 +669,10 @@ todo_wine
|
||||
|
||||
get_event((IMFMediaEventGenerator *)mediasource, MEEndOfPresentation, NULL);
|
||||
|
||||
+skip_source_tests:
|
||||
IMFMediaTypeHandler_Release(handler);
|
||||
IMFPresentationDescriptor_Release(descriptor);
|
||||
|
||||
-skip_source_tests:
|
||||
-
|
||||
hr = IMFMediaSource_Shutdown(mediasource);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
diff --git a/dlls/mfreadwrite/tests/mfplat.c b/dlls/mfreadwrite/tests/mfplat.c
|
||||
index 84581f9be9a..cfe68cb6736 100644
|
||||
--- a/dlls/mfreadwrite/tests/mfplat.c
|
||||
+++ b/dlls/mfreadwrite/tests/mfplat.c
|
||||
@@ -627,14 +627,13 @@ static void test_source_reader(void)
|
||||
stream = get_resource_stream("test.wav");
|
||||
|
||||
hr = MFCreateSourceReaderFromByteStream(stream, NULL, &reader);
|
||||
-todo_wine
|
||||
- ok(hr == S_OK, "Failed to create source reader, hr %#x.\n", hr);
|
||||
-
|
||||
if (FAILED(hr))
|
||||
{
|
||||
+ skip("MFCreateSourceReaderFromByteStream() failed, is G-Streamer missing?\n");
|
||||
IMFByteStream_Release(stream);
|
||||
return;
|
||||
}
|
||||
+ ok(hr == S_OK, "Failed to create source reader, hr %#x.\n", hr);
|
||||
|
||||
/* Access underlying media source object. */
|
||||
hr = IMFSourceReader_GetServiceForStream(reader, MF_SOURCE_READER_MEDIASOURCE, &GUID_NULL, &IID_IMFMediaSource,
|
||||
@@ -723,7 +722,10 @@ todo_wine
|
||||
|
||||
hr = IMFSourceReader_ReadSample(reader, MF_SOURCE_READER_FIRST_AUDIO_STREAM, 0, &actual_index, &stream_flags,
|
||||
×tamp, &sample);
|
||||
+todo_wine
|
||||
ok(hr == S_OK, "Failed to get a sample, hr %#x.\n", hr);
|
||||
+ if (hr != S_OK)
|
||||
+ goto skip_read_sample;
|
||||
ok(actual_index == 0, "Unexpected stream index %u\n", actual_index);
|
||||
ok(!stream_flags, "Unexpected stream flags %#x.\n", stream_flags);
|
||||
IMFSample_Release(sample);
|
||||
@@ -784,6 +786,8 @@ todo_wine
|
||||
ok(stream_flags == MF_SOURCE_READERF_ENDOFSTREAM, "Unexpected stream flags %#x.\n", stream_flags);
|
||||
ok(!sample, "Unexpected sample object.\n");
|
||||
|
||||
+skip_read_sample:
|
||||
+
|
||||
/* Flush. */
|
||||
hr = IMFSourceReader_Flush(reader, MF_SOURCE_READER_FIRST_VIDEO_STREAM);
|
||||
ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
|
||||
@@ -814,10 +818,11 @@ todo_wine
|
||||
IMFSourceReaderCallback_Release(&callback->IMFSourceReaderCallback_iface);
|
||||
|
||||
hr = MFCreateSourceReaderFromByteStream(stream, attributes, &reader);
|
||||
+todo_wine
|
||||
ok(hr == S_OK, "Failed to create source reader, hr %#x.\n", hr);
|
||||
IMFAttributes_Release(attributes);
|
||||
-
|
||||
- IMFSourceReader_Release(reader);
|
||||
+ if (hr == S_OK)
|
||||
+ IMFSourceReader_Release(reader);
|
||||
|
||||
IMFByteStream_Release(stream);
|
||||
}
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index d6c7837e544..9b2c2174318 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -67,6 +67,7 @@ struct media_source
|
||||
IMFByteStream *byte_stream;
|
||||
struct media_stream **streams;
|
||||
ULONG stream_count;
|
||||
+ IMFPresentationDescriptor *pres_desc;
|
||||
GstBus *bus;
|
||||
GstElement *container;
|
||||
GstElement *decodebin;
|
||||
@@ -673,12 +674,12 @@ static HRESULT WINAPI media_source_CreatePresentationDescriptor(IMFMediaSource *
|
||||
{
|
||||
struct media_source *source = impl_from_IMFMediaSource(iface);
|
||||
|
||||
- FIXME("(%p)->(%p): stub\n", source, descriptor);
|
||||
+ TRACE("(%p)->(%p)\n", source, descriptor);
|
||||
|
||||
if (source->state == SOURCE_SHUTDOWN)
|
||||
return MF_E_SHUTDOWN;
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return IMFPresentationDescriptor_Clone(source->pres_desc, descriptor);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI media_source_Start(IMFMediaSource *iface, IMFPresentationDescriptor *descriptor,
|
||||
@@ -741,6 +742,8 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface)
|
||||
if (source->their_sink)
|
||||
gst_object_unref(GST_OBJECT(source->their_sink));
|
||||
|
||||
+ if (source->pres_desc)
|
||||
+ IMFPresentationDescriptor_Release(source->pres_desc);
|
||||
if (source->event_queue)
|
||||
IMFMediaEventQueue_Shutdown(source->event_queue);
|
||||
if (source->byte_stream)
|
||||
@@ -841,6 +844,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));
|
||||
+ IMFStreamDescriptor **descriptors = NULL;
|
||||
unsigned int i;
|
||||
HRESULT hr;
|
||||
int ret;
|
||||
@@ -928,6 +932,25 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
gst_sample_unref(preroll);
|
||||
}
|
||||
|
||||
+ /* init presentation descriptor */
|
||||
+
|
||||
+ 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]);
|
||||
+ }
|
||||
+
|
||||
+ if (FAILED(hr = MFCreatePresentationDescriptor(object->stream_count, descriptors, &object->pres_desc)))
|
||||
+ goto fail;
|
||||
+
|
||||
+ for (i = 0; i < object->stream_count; i++)
|
||||
+ {
|
||||
+ IMFPresentationDescriptor_SelectStream(object->pres_desc, i);
|
||||
+ IMFStreamDescriptor_Release(descriptors[i]);
|
||||
+ }
|
||||
+ heap_free(descriptors);
|
||||
+ descriptors = NULL;
|
||||
+
|
||||
object->state = SOURCE_STOPPED;
|
||||
|
||||
*out_media_source = object;
|
||||
@@ -936,6 +959,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
fail:
|
||||
WARN("Failed to construct MFMediaSource, hr %#x.\n", hr);
|
||||
|
||||
+ heap_free(descriptors);
|
||||
IMFMediaSource_Release(&object->IMFMediaSource_iface);
|
||||
return hr;
|
||||
}
|
||||
--
|
||||
2.28.0
|
||||
|
@ -1,2 +1 @@
|
||||
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 "03395fdf71b606b589b917eab5d4766842188b91"
|
||||
echo "c9e2deac39924473ac538ee22a2a0c0dbe3bad85"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -145,6 +145,7 @@ 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"
|
||||
@ -521,6 +522,9 @@ 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"
|
||||
;;
|
||||
@ -2817,6 +2821,78 @@ 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/mfmediaengine/main.c, dlls/mfplat/mediatype.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/0001-mfmediaengine-Provide-the-partial-topology-to-the-me.patch
|
||||
patch_apply mfplat-streaming-support/0002-mfmediaengine-Issue-MF_MEDIA_ENGINE_EVENT_CANPLAY-up.patch
|
||||
patch_apply mfplat-streaming-support/0003-mfmediaengine-Issue-MF_MEDIA_ENGINE_EVENT_PLAYING-up.patch
|
||||
patch_apply mfplat-streaming-support/0004-mfmediaengine-Issue-MF_MEDIA_ENGINE_EVENT_ENDED-upon.patch
|
||||
patch_apply mfplat-streaming-support/0005-mf-Unconditionally-deliver-NULL-EOS-samples.patch
|
||||
patch_apply mfplat-streaming-support/0008-mfreadwrite-Abort-ReadSample-when-unable-to-request-.patch
|
||||
patch_apply mfplat-streaming-support/0009-winegstreamer-Implement-IMFMediaSource-Start.patch
|
||||
patch_apply mfplat-streaming-support/0010-winegstreamer-Implement-IMFMediaStream-RequestSample.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/0032-winegstreamer-Implement-IMFMedisStream-GetMediaSourc.patch
|
||||
patch_apply mfplat-streaming-support/0033-Expose-PCM-output-type-on-AAC-decoder.patch
|
||||
patch_apply mfplat-streaming-support/0034-mfplat-Add-I420-format-information.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/0055-mfmediaengine-Implement-GetNativeVideoSize.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 @@
|
||||
03395fdf71b606b589b917eab5d4766842188b91
|
||||
c9e2deac39924473ac538ee22a2a0c0dbe3bad85
|
||||
|
Loading…
Reference in New Issue
Block a user