Skip to content

Commit

Permalink
rtsp15
Browse files Browse the repository at this point in the history
  • Loading branch information
SpookySkeletons committed Aug 29, 2024
1 parent 369d73a commit ee08754
Show file tree
Hide file tree
Showing 53 changed files with 1,032 additions and 772 deletions.
73 changes: 38 additions & 35 deletions patches/protonprep-valve-staging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -322,41 +322,44 @@
patch -Np1 < ../patches/wine-gst/0009-winegstreamer-Connect-autoplug-continue-and-deep-ele.patch
patch -Np1 < ../patches/wine-gst/0010-winegstreamer-Do-not-create-a-read-thread-for-uridec.patch
patch -Np1 < ../patches/wine-gst/0011-winegstreamer-Ignore-an-assert-in-wg_parser.patch
patch -Np1 < ../patches/wine-gst/0012-winegstreamer-Add-more-RTSP-based-URI-schemes-to-GSt.patch
patch -Np1 < ../patches/wine-gst/0013-winegstreamer-Mark-wg_parser-container-bin-as-stream.patch
patch -Np1 < ../patches/wine-gst/0014-winegstreamer-Set-a-clock-for-the-wg_parser-pipeline.patch
patch -Np1 < ../patches/wine-gst/0015-winegstreamer-Set-base-time-on-wg_parser-bin-while-c.patch
patch -Np1 < ../patches/wine-gst/0016-winegstreamer-Put-pipeline-into-PLAYING-state-before.patch
patch -Np1 < ../patches/wine-gst/0017-winegstreamer-Handle-a-duration-of-1-correctly.patch
patch -Np1 < ../patches/wine-gst/0018-winegstreamer-Don-t-only-accept-segment-events-when-.patch
patch -Np1 < ../patches/wine-gst/0019-winegstreamer-Convert-buffer-presentation-timestamps.patch
patch -Np1 < ../patches/wine-gst/0020-winegstreamer-Reorder-parser-initialization-code-a-b.patch
patch -Np1 < ../patches/wine-gst/0021-winegstreamer-Do-away-with-the-per-stream-condvars-a.patch
patch -Np1 < ../patches/wine-gst/0022-winegstreamer-Use-pthread_cond_broadcast-instead-of-.patch
patch -Np1 < ../patches/wine-gst/0023-winegstreamer-Do-not-fail-caps-negotiation-when-ther.patch
patch -Np1 < ../patches/wine-gst/0024-winegstreamer-Do-not-seek-live-sources.patch
patch -Np1 < ../patches/wine-gst/0025-winegstreamer-Implement-buffering-events.patch
patch -Np1 < ../patches/wine-gst/0026-mf-Send-sample-requests-for-unused-space-of-sample-q.patch
patch -Np1 < ../patches/wine-gst/0027-winegstreamer-Fix-race-between-wg_parser_stream_disa.patch
patch -Np1 < ../patches/wine-gst/0028-winegstreamer-Handle-Gstreamer-pipeline-flushes-grac.patch
patch -Np1 < ../patches/wine-gst/0029-winegstreamer-Do-waits-for-samples-on-stream-specifi.patch
patch -Np1 < ../patches/wine-gst/0030-mf-session-Ensure-that-the-command-callback-does-not.patch
patch -Np1 < ../patches/wine-gst/0031-mf-session-Prevent-media-session-from-running-comman.patch
patch -Np1 < ../patches/wine-gst/0032-mf-sar-Allow-starting-audio-renderer-again-after-pau.patch
patch -Np1 < ../patches/wine-gst/0033-winegstreamer-Also-flush-token-queue-on-seek.patch
patch -Np1 < ../patches/wine-gst/0034-mf-session-Fix-pausing-a-media-session-when-the-medi.patch
patch -Np1 < ../patches/wine-gst/0035-winegstreamer-Do-not-force-uridecodebin-to-expose-un.patch
patch -Np1 < ../patches/wine-gst/0036-mfmediaengine-Unstub-IMFMediaEngine-SetAutoPlay.patch
patch -Np1 < ../patches/wine-gst/0037-HACK-winegstreamer-Add-a-resampler-to-wg_parser-for-.patch
patch -Np1 < ../patches/wine-gst/0038-HACK-winegstreamer-Add-a-videoscale-element-to-wg_pa.patch
patch -Np1 < ../patches/wine-gst/0039-HACK-mfmediaengine-Do-not-send-MF_MEDIA_ENGINE_EVENT.patch
patch -Np1 < ../patches/wine-gst/0040-Marker-commit-do-not-put-into-MR.patch
patch -Np1 < ../patches/wine-gst/0041-DEBUG-winegstreamer-GST_LOG-GST_DEBUG.patch
patch -Np1 < ../patches/wine-gst/0042-HACK-kernelbase-yt-dlp.exe-redirection-and-cmdline-m.patch
patch -Np1 < ../patches/wine-gst/0043-mf-Schedule-stored-timers-for-the-original-time-inst.patch
patch -Np1 < ../patches/wine-gst/0044-mf-Start-forwarding-samples-only-at-the-PTS-of-the-f.patch
patch -Np1 < ../patches/wine-gst/0045-ntdll-Use-unixcall-instead-of-syscall-for-QueryPerfo.patch
patch -Np1 < ../patches/wine-gst/0046-HACK-kernelbase-Replace-stderr-of-yt-dlp-process.patch
patch -Np1 < ../patches/wine-gst/0012-winegstreamer-Make-wg_parser-report-the-exact-suppor.patch
patch -Np1 < ../patches/wine-gst/0013-winegstreamer-Add-more-RTSP-based-URI-schemes-to-GSt.patch
patch -Np1 < ../patches/wine-gst/0014-winegstreamer-Mark-wg_parser-container-bin-as-stream.patch
patch -Np1 < ../patches/wine-gst/0015-winegstreamer-Set-a-clock-for-the-wg_parser-pipeline.patch
patch -Np1 < ../patches/wine-gst/0016-winegstreamer-Set-base-time-on-wg_parser-bin-while-c.patch
patch -Np1 < ../patches/wine-gst/0017-winegstreamer-Put-pipeline-into-PLAYING-state-before.patch
patch -Np1 < ../patches/wine-gst/0018-winegstreamer-Handle-a-duration-of-1-correctly.patch
patch -Np1 < ../patches/wine-gst/0019-winegstreamer-Don-t-only-accept-segment-events-when-.patch
patch -Np1 < ../patches/wine-gst/0020-winegstreamer-Convert-buffer-presentation-timestamps.patch
patch -Np1 < ../patches/wine-gst/0021-winegstreamer-Reorder-parser-initialization-code-a-b.patch
patch -Np1 < ../patches/wine-gst/0022-winegstreamer-Do-away-with-the-per-stream-condvars-a.patch
patch -Np1 < ../patches/wine-gst/0023-winegstreamer-Use-pthread_cond_broadcast-instead-of-.patch
patch -Np1 < ../patches/wine-gst/0024-winegstreamer-Do-not-fail-caps-negotiation-when-ther.patch
patch -Np1 < ../patches/wine-gst/0025-winegstreamer-Do-not-seek-live-sources.patch
patch -Np1 < ../patches/wine-gst/0026-winegstreamer-Implement-buffering-events.patch
patch -Np1 < ../patches/wine-gst/0027-mf-samplegrabber-Send-sample-requests-for-unused-spa.patch
patch -Np1 < ../patches/wine-gst/0028-winegstreamer-Fix-race-between-wg_parser_stream_disa.patch
patch -Np1 < ../patches/wine-gst/0029-winegstreamer-Handle-Gstreamer-pipeline-flushes-grac.patch
patch -Np1 < ../patches/wine-gst/0030-winegstreamer-Do-waits-for-samples-on-stream-specifi.patch
patch -Np1 < ../patches/wine-gst/0031-mf-session-Ensure-that-the-command-callback-does-not.patch
patch -Np1 < ../patches/wine-gst/0032-mf-session-Prevent-media-session-from-running-comman.patch
patch -Np1 < ../patches/wine-gst/0033-mf-sar-Allow-starting-audio-renderer-again-after-pau.patch
patch -Np1 < ../patches/wine-gst/0034-winegstreamer-Also-flush-token-queue-on-seek.patch
patch -Np1 < ../patches/wine-gst/0035-mf-session-Fix-pausing-a-media-session-when-the-medi.patch
patch -Np1 < ../patches/wine-gst/0036-winegstreamer-Do-not-force-uridecodebin-to-expose-un.patch
patch -Np1 < ../patches/wine-gst/0037-mfmediaengine-Unstub-IMFMediaEngine-SetAutoPlay.patch
patch -Np1 < ../patches/wine-gst/0038-HACK-winegstreamer-Add-a-resampler-to-wg_parser-for-.patch
patch -Np1 < ../patches/wine-gst/0039-HACK-winegstreamer-Add-a-videoscale-element-to-wg_pa.patch
patch -Np1 < ../patches/wine-gst/0040-HACK-mfmediaengine-Do-not-send-MF_MEDIA_ENGINE_EVENT.patch
patch -Np1 < ../patches/wine-gst/0041-Marker-commit-do-not-put-into-MR.patch
patch -Np1 < ../patches/wine-gst/0042-ntdll-Use-unixcall-instead-of-syscall-for-QueryPerfo.patch
patch -Np1 < ../patches/wine-gst/0043-quartz-Fix-buffer-overflow-when-passing-url-as-filen.patch
patch -Np1 < ../patches/wine-gst/0044-mfplat-Allocate-memory-buffers-using-calloc.patch
patch -Np1 < ../patches/wine-gst/0045-DEBUG-winegstreamer-GST_LOG-GST_DEBUG.patch
patch -Np1 < ../patches/wine-gst/0046-HACK-kernelbase-yt-dlp.exe-redirection-and-cmdline-m.patch
patch -Np1 < ../patches/wine-gst/0047-mf-Schedule-stored-timers-for-the-original-time-inst.patch
patch -Np1 < ../patches/wine-gst/0048-mf-Start-forwarding-samples-only-at-the-PTS-of-the-f.patch
patch -Np1 < ../patches/wine-gst/0049-HACK-kernelbase-Replace-stderr-of-yt-dlp-process.patch

#echo "WINE: -Nvidia Reflex- Support VK_NV_low_latency2"
#patch -Np1 < ../patches/proton/83-nv_low_latency_wine.patch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From 4ae3f8ceac4f38fd471db5f740e274420a9f27f5 Mon Sep 17 00:00:00 2001
From 6d99895f2ca9e3b74de6992296e765ae286139fd Mon Sep 17 00:00:00 2001
From: Zhiyi Zhang <[email protected]>
Date: Tue, 1 Aug 2023 10:52:21 +0800
Subject: [PATCH 01/46] mf: Add seeking support for IMFMediaSession::Start().
Subject: [PATCH 01/49] mf: Add seeking support for IMFMediaSession::Start().

---
dlls/mf/session.c | 57 ++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 51 insertions(+), 6 deletions(-)

diff --git a/dlls/mf/session.c b/dlls/mf/session.c
index 4f94d3c30a7..a5caad3c97a 100644
index ef707dea4de..3f3be2b84b0 100644
--- a/dlls/mf/session.c
+++ b/dlls/mf/session.c
@@ -110,6 +110,7 @@ enum object_state
Expand All @@ -19,7 +19,7 @@ index 4f94d3c30a7..a5caad3c97a 100644
OBJ_STATE_INVALID,
};

@@ -994,10 +995,28 @@ static HRESULT session_subscribe_sources(struct media_session *session)
@@ -912,10 +913,28 @@ static HRESULT session_subscribe_sources(struct media_session *session)
return hr;
}

Expand Down Expand Up @@ -48,7 +48,7 @@ index 4f94d3c30a7..a5caad3c97a 100644
HRESULT hr;
UINT i;

@@ -1014,6 +1033,13 @@ static void session_start(struct media_session *session, const GUID *time_format
@@ -932,6 +951,13 @@ static void session_start(struct media_session *session, const GUID *time_format

/* fallthrough */
case SESSION_STATE_PAUSED:
Expand All @@ -62,7 +62,7 @@ index 4f94d3c30a7..a5caad3c97a 100644

session->presentation.time_format = *time_format;
session->presentation.start_position.vt = VT_EMPTY;
@@ -1027,6 +1053,14 @@ static void session_start(struct media_session *session, const GUID *time_format
@@ -945,6 +971,14 @@ static void session_start(struct media_session *session, const GUID *time_format

LIST_FOR_EACH_ENTRY(source, &session->presentation.sources, struct media_source, entry)
{
Expand All @@ -77,7 +77,7 @@ index 4f94d3c30a7..a5caad3c97a 100644
if (FAILED(hr = IMFMediaSource_Start(source->source, source->pd, &GUID_NULL, start_position)))
{
WARN("Failed to start media source %p, hr %#lx.\n", source->source, hr);
@@ -1047,12 +1081,22 @@ static void session_start(struct media_session *session, const GUID *time_format
@@ -965,12 +999,22 @@ static void session_start(struct media_session *session, const GUID *time_format
}
}

Expand All @@ -104,7 +104,7 @@ index 4f94d3c30a7..a5caad3c97a 100644
default:
session_command_complete_with_event(session, MESessionStarted, MF_E_INVALIDREQUEST, NULL);
break;
@@ -2305,6 +2349,9 @@ static HRESULT WINAPI mfsession_Start(IMFMediaSession *iface, const GUID *format
@@ -2206,6 +2250,9 @@ static HRESULT WINAPI mfsession_Start(IMFMediaSession *iface, const GUID *format
if (!start_position)
return E_POINTER;

Expand All @@ -114,7 +114,7 @@ index 4f94d3c30a7..a5caad3c97a 100644
if (FAILED(hr = create_session_op(SESSION_CMD_START, &op)))
return hr;

@@ -4038,8 +4085,6 @@ static HRESULT WINAPI session_events_callback_Invoke(IMFAsyncCallback *iface, IM
@@ -3714,8 +3761,6 @@ static HRESULT WINAPI session_events_callback_Invoke(IMFAsyncCallback *iface, IM
{
case MESourceSeeked:
case MEStreamSeeked:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
From 2eeb0df8121d611c9dc8bc4552ff1ab6fd69d7c1 Mon Sep 17 00:00:00 2001
From d2546730e1c900ceb2688ba94cb3433777099580 Mon Sep 17 00:00:00 2001
From: Zhiyi Zhang <[email protected]>
Date: Tue, 8 Aug 2023 15:24:34 +0800
Subject: [PATCH 02/46] mf/tests: Add a create_media_session_with_source_sink()
Subject: [PATCH 02/49] mf/tests: Add a create_media_session_with_source_sink()
helper.

---
dlls/mf/tests/mf.c | 92 ++++++++++++++++++++++++----------------------
1 file changed, 48 insertions(+), 44 deletions(-)

diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index 9382d8cae35..58d8ec73c4f 100644
index 0a34329bd75..e0bcedac20f 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -4996,6 +4996,53 @@ static void test_sample_grabber_is_mediatype_supported(void)
@@ -4995,6 +4995,53 @@ static void test_sample_grabber_is_mediatype_supported(void)
IMFSampleGrabberSinkCallback_Release(grabber_callback);
}

Expand Down Expand Up @@ -66,7 +66,7 @@ index 9382d8cae35..58d8ec73c4f 100644
static void test_sample_grabber_orientation(GUID subtype)
{
media_type_desc video_rgb32_desc =
@@ -5005,17 +5052,12 @@ static void test_sample_grabber_orientation(GUID subtype)
@@ -5004,17 +5051,12 @@ static void test_sample_grabber_orientation(GUID subtype)
};

struct test_grabber_callback *grabber_callback;
Expand All @@ -84,7 +84,7 @@ index 9382d8cae35..58d8ec73c4f 100644
HRESULT hr;
DWORD res;

@@ -5036,33 +5078,6 @@ static void test_sample_grabber_orientation(GUID subtype)
@@ -5035,33 +5077,6 @@ static void test_sample_grabber_orientation(GUID subtype)
grabber_callback->done_event = CreateEventW(NULL, FALSE, FALSE, NULL);
ok(!!grabber_callback->done_event, "CreateEventW failed, error %lu\n", GetLastError());

Expand Down Expand Up @@ -118,7 +118,7 @@ index 9382d8cae35..58d8ec73c4f 100644
hr = MFCreateMediaType(&output_type);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
init_media_type(output_type, video_rgb32_desc, -1);
@@ -5070,18 +5085,7 @@ static void test_sample_grabber_orientation(GUID subtype)
@@ -5069,18 +5084,7 @@ static void test_sample_grabber_orientation(GUID subtype)
ok(hr == S_OK, "Failed to create grabber sink, hr %#lx.\n", hr);
IMFMediaType_Release(output_type);

Expand Down
20 changes: 10 additions & 10 deletions patches/wine-gst/0003-mf-tests-Test-IMFMediaSession-Start.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From 9595a07ba1657ee66afd24c79dc66ee3b98c3c3f Mon Sep 17 00:00:00 2001
From 23eb22d6b249a18679b1743f734f2c9c4bcf518f Mon Sep 17 00:00:00 2001
From: Zhiyi Zhang <[email protected]>
Date: Mon, 7 Aug 2023 11:52:20 +0800
Subject: [PATCH 03/46] mf/tests: Test IMFMediaSession::Start().
Subject: [PATCH 03/49] mf/tests: Test IMFMediaSession::Start().

---
dlls/mf/tests/mf.c | 704 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 696 insertions(+), 8 deletions(-)

diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index 58d8ec73c4f..240cbf194ea 100644
index e0bcedac20f..f164a04b989 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -2087,6 +2087,448 @@ static IMFMediaSource *create_media_source(const WCHAR *name, const WCHAR *mime)
@@ -2086,6 +2086,448 @@ static IMFMediaSource *create_media_source(const WCHAR *name, const WCHAR *mime)
return source;
}

Expand Down Expand Up @@ -460,7 +460,7 @@ index 58d8ec73c4f..240cbf194ea 100644
static void test_media_session_events(void)
{
static const media_type_desc audio_float_44100 =
@@ -2888,27 +3330,27 @@ static ULONG WINAPI test_grabber_callback_Release(IMFSampleGrabberSinkCallback *
@@ -2887,27 +3329,27 @@ static ULONG WINAPI test_grabber_callback_Release(IMFSampleGrabberSinkCallback *

static HRESULT WINAPI test_grabber_callback_OnClockStart(IMFSampleGrabberSinkCallback *iface, MFTIME time, LONGLONG offset)
{
Expand Down Expand Up @@ -493,7 +493,7 @@ index 58d8ec73c4f..240cbf194ea 100644
}

static HRESULT WINAPI test_grabber_callback_OnSetPresentationClock(IMFSampleGrabberSinkCallback *iface,
@@ -4996,9 +5438,9 @@ static void test_sample_grabber_is_mediatype_supported(void)
@@ -4995,9 +5437,9 @@ static void test_sample_grabber_is_mediatype_supported(void)
IMFSampleGrabberSinkCallback_Release(grabber_callback);
}

Expand All @@ -505,7 +505,7 @@ index 58d8ec73c4f..240cbf194ea 100644
{
IMFTopologyNode *src_node, *sink_node;
IMFPresentationDescriptor *pd;
@@ -5026,6 +5468,11 @@ static void create_media_session_with_source_sink(IMFMediaSource *source, IMFAct
@@ -5025,6 +5467,11 @@ static void create_media_session_with_source_sink(IMFMediaSource *source, IMFAct
hr = IMFPresentationDescriptor_GetStreamDescriptorByIndex(pd, 0, &selected, &sd);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(selected, "got selected %u.\n", !!selected);
Expand All @@ -517,7 +517,7 @@ index 58d8ec73c4f..240cbf194ea 100644
init_source_node(source, -1, src_node, pd, sd);
hr = IMFTopologyNode_SetObject(sink_node, (IUnknown *)sink_activate);
ok(hr == S_OK, "Failed to set object, hr %#lx.\n", hr);
@@ -5085,7 +5532,7 @@ static void test_sample_grabber_orientation(GUID subtype)
@@ -5084,7 +5531,7 @@ static void test_sample_grabber_orientation(GUID subtype)
ok(hr == S_OK, "Failed to create grabber sink, hr %#lx.\n", hr);
IMFMediaType_Release(output_type);

Expand All @@ -526,7 +526,7 @@ index 58d8ec73c4f..240cbf194ea 100644

propvar.vt = VT_EMPTY;
hr = IMFMediaSession_Start(session, &GUID_NULL, &propvar);
@@ -7286,6 +7733,246 @@ static void test_MFCreateSequencerSegmentOffset(void)
@@ -7280,6 +7727,246 @@ static void test_MFCreateSequencerSegmentOffset(void)
PropVariantClear(&propvar);
}

Expand Down Expand Up @@ -773,7 +773,7 @@ index 58d8ec73c4f..240cbf194ea 100644
START_TEST(mf)
{
init_functions();
@@ -7322,4 +8009,5 @@ START_TEST(mf)
@@ -7316,4 +8003,5 @@ START_TEST(mf)
test_MFRequireProtectedEnvironment();
test_mpeg4_media_sink();
test_MFCreateSequencerSegmentOffset();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
From 0f295094bd9483e854e2aa0a8b3c2d8fe90d77fa Mon Sep 17 00:00:00 2001
From c9cb24b06e0d2b41d9026eeddc929474006a606d Mon Sep 17 00:00:00 2001
From: Zhiyi Zhang <[email protected]>
Date: Fri, 28 Jul 2023 18:04:30 +0800
Subject: [PATCH 04/46] mfmediaengine: Implement
Subject: [PATCH 04/49] mfmediaengine: Implement
IMFMediaEngineEx::SetCurrentTime/Ex().

---
dlls/mfmediaengine/main.c | 62 +++++++++++++++++++++++++++++----------
1 file changed, 47 insertions(+), 15 deletions(-)

diff --git a/dlls/mfmediaengine/main.c b/dlls/mfmediaengine/main.c
index 85b4dbb471a..6aa84e1562b 100644
index 9e41d9dad84..28a273616c8 100644
--- a/dlls/mfmediaengine/main.c
+++ b/dlls/mfmediaengine/main.c
@@ -96,6 +96,7 @@ enum media_engine_flags
Expand All @@ -36,7 +36,7 @@ index 85b4dbb471a..6aa84e1562b 100644
IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PLAYING, 0, 0);
break;
case MESessionEnded:
@@ -1844,19 +1852,9 @@ static double WINAPI media_engine_GetCurrentTime(IMFMediaEngineEx *iface)
@@ -1846,19 +1854,9 @@ static double WINAPI media_engine_GetCurrentTime(IMFMediaEngineEx *iface)

static HRESULT WINAPI media_engine_SetCurrentTime(IMFMediaEngineEx *iface, double time)
{
Expand All @@ -58,7 +58,7 @@ index 85b4dbb471a..6aa84e1562b 100644
}

static double WINAPI media_engine_GetStartTime(IMFMediaEngineEx *iface)
@@ -3135,9 +3133,43 @@ static HRESULT WINAPI media_engine_SetRealTimeMode(IMFMediaEngineEx *iface, BOOL
@@ -3059,9 +3057,43 @@ static HRESULT WINAPI media_engine_SetRealTimeMode(IMFMediaEngineEx *iface, BOOL

static HRESULT WINAPI media_engine_SetCurrentTimeEx(IMFMediaEngineEx *iface, double seektime, MF_MEDIA_ENGINE_SEEK_MODE mode)
{
Expand Down
Loading

0 comments on commit ee08754

Please sign in to comment.