Skip to content

Commit

Permalink
rtsp12
Browse files Browse the repository at this point in the history
  • Loading branch information
SpookySkeletons committed Jul 11, 2024
1 parent 272b630 commit 334a767
Show file tree
Hide file tree
Showing 48 changed files with 854 additions and 673 deletions.
71 changes: 35 additions & 36 deletions patches/protonprep-valve-staging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -314,42 +314,41 @@
patch -Np1 < ../patches/wine-gst/0005-mfmediaengine-tests-Test-IMFMediaEngineEx-SetCurrent.patch
patch -Np1 < ../patches/wine-gst/0006-mfmediaengine-Implement-IMFMediaEngine-IsSeeking.patch
patch -Np1 < ../patches/wine-gst/0007-AVPro-Video-seeking-support.patch
patch -Np1 < ../patches/wine-gst/0008-mf-session-Avoid-leaking-samples-in-transform_node_d.patch
patch -Np1 < ../patches/wine-gst/0009-Memory-leak-fixes.patch
patch -Np1 < ../patches/wine-gst/0010-winegstreamer-Initialize-condition-variable-of-struc.patch
patch -Np1 < ../patches/wine-gst/0011-winegstreamer-Connect-autoplug-continue-and-deep-ele.patch
patch -Np1 < ../patches/wine-gst/0012-winegstreamer-Do-not-create-a-read-thread-for-uridec.patch
patch -Np1 < ../patches/wine-gst/0013-winegstreamer-Ignore-an-assert-in-wg_parser.patch
patch -Np1 < ../patches/wine-gst/0014-winegstreamer-Fixate-caps-in-autoplug_continue_cb.patch
patch -Np1 < ../patches/wine-gst/0015-winegstreamer-Make-wg_parser-report-the-exact-suppor.patch
patch -Np1 < ../patches/wine-gst/0016-winegstreamer-Add-more-RTSP-based-URI-schemes-to-GSt.patch
patch -Np1 < ../patches/wine-gst/0017-winegstreamer-Fixate-caps-in-the-pad-added-callback.patch
patch -Np1 < ../patches/wine-gst/0018-winegstreamer-Mark-wg_parser-container-bin-as-stream.patch
patch -Np1 < ../patches/wine-gst/0019-winegstreamer-Set-a-clock-for-the-wg_parser-pipeline.patch
patch -Np1 < ../patches/wine-gst/0020-winegstreamer-Set-base-time-on-wg_parser-bin-while-c.patch
patch -Np1 < ../patches/wine-gst/0021-winegstreamer-Put-pipeline-into-PLAYING-state-before.patch
patch -Np1 < ../patches/wine-gst/0022-winegstreamer-Don-t-only-accept-segment-events-when-.patch
patch -Np1 < ../patches/wine-gst/0023-winegstreamer-Convert-buffer-presentation-timestamps.patch
patch -Np1 < ../patches/wine-gst/0024-winegstreamer-Adjust-buffer-timestamps-after-seek.patch
patch -Np1 < ../patches/wine-gst/0025-winegstreamer-Reorder-parser-initialization-code-a-b.patch
patch -Np1 < ../patches/wine-gst/0026-winegstreamer-Do-away-with-the-per-stream-condvars-a.patch
patch -Np1 < ../patches/wine-gst/0027-winegstreamer-Use-pthread_cond_broadcast-instead-of-.patch
patch -Np1 < ../patches/wine-gst/0028-winegstreamer-Do-not-fail-caps-negotiation-when-ther.patch
patch -Np1 < ../patches/wine-gst/0029-winegstreamer-Do-not-seek-live-sources.patch
patch -Np1 < ../patches/wine-gst/0030-winegstreamer-Implement-buffering-events.patch
patch -Np1 < ../patches/wine-gst/0031-mf-Send-sample-requests-for-unused-space-of-sample-q.patch
patch -Np1 < ../patches/wine-gst/0032-winegstreamer-Fix-race-between-wg_parser_stream_disa.patch
patch -Np1 < ../patches/wine-gst/0033-winegstreamer-Handle-Gstreamer-pipeline-flushes-grac.patch
patch -Np1 < ../patches/wine-gst/0034-winegstreamer-Do-waits-for-samples-on-stream-specifi.patch
patch -Np1 < ../patches/wine-gst/0035-HACK-winegstreamer-Add-a-resampler-to-wg_parser-for-.patch
patch -Np1 < ../patches/wine-gst/0036-HACK-winegstreamer-Add-a-videoscale-element-to-wg_pa.patch
patch -Np1 < ../patches/wine-gst/0037-HACK-mfmediaengine-Do-not-send-MF_MEDIA_ENGINE_EVENT.patch
patch -Np1 < ../patches/wine-gst/0038-Marker-commit-do-not-put-into-MR.patch
patch -Np1 < ../patches/wine-gst/0039-DEBUG-winegstreamer-GST_LOG-GST_DEBUG.patch
patch -Np1 < ../patches/wine-gst/0040-HACK-kernelbase-yt-dlp.exe-redirection-and-cmdline-m.patch
patch -Np1 < ../patches/wine-gst/0041-mf-Schedule-stored-timers-for-the-original-time-inst.patch
patch -Np1 < ../patches/wine-gst/0042-mf-Start-forwarding-samples-only-at-the-PTS-of-the-f.patch
patch -Np1 < ../patches/wine-gst/0043-ntdll-Use-unixcall-instead-of-syscall-for-QueryPerfo.patch
patch -Np1 < ../patches/wine-gst/0008-Memory-leak-fixes.patch
patch -Np1 < ../patches/wine-gst/0009-winegstreamer-Initialize-condition-variable-of-struc.patch
patch -Np1 < ../patches/wine-gst/0010-winegstreamer-Connect-autoplug-continue-and-deep-ele.patch
patch -Np1 < ../patches/wine-gst/0011-winegstreamer-Do-not-create-a-read-thread-for-uridec.patch
patch -Np1 < ../patches/wine-gst/0012-winegstreamer-Ignore-an-assert-in-wg_parser.patch
patch -Np1 < ../patches/wine-gst/0013-winegstreamer-Make-wg_parser-report-the-exact-suppor.patch
patch -Np1 < ../patches/wine-gst/0014-winegstreamer-Add-more-RTSP-based-URI-schemes-to-GSt.patch
patch -Np1 < ../patches/wine-gst/0015-winegstreamer-Mark-wg_parser-container-bin-as-stream.patch
patch -Np1 < ../patches/wine-gst/0016-winegstreamer-Set-a-clock-for-the-wg_parser-pipeline.patch
patch -Np1 < ../patches/wine-gst/0017-winegstreamer-Set-base-time-on-wg_parser-bin-while-c.patch
patch -Np1 < ../patches/wine-gst/0018-winegstreamer-Put-pipeline-into-PLAYING-state-before.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-Send-sample-requests-for-unused-space-of-sample-q.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-Revert-winegstreamer-Make-wg_parser-report-the-exact.patch
patch -Np1 < ../patches/wine-gst/0033-winegstreamer-Do-not-force-uridecodebin-to-expose-un.patch
patch -Np1 < ../patches/wine-gst/0034-HACK-winegstreamer-Add-a-resampler-to-wg_parser-for-.patch
patch -Np1 < ../patches/wine-gst/0035-HACK-winegstreamer-Add-a-videoscale-element-to-wg_pa.patch
patch -Np1 < ../patches/wine-gst/0036-HACK-mfmediaengine-Do-not-send-MF_MEDIA_ENGINE_EVENT.patch
patch -Np1 < ../patches/wine-gst/0037-Marker-commit-do-not-put-into-MR.patch
patch -Np1 < ../patches/wine-gst/0038-DEBUG-winegstreamer-GST_LOG-GST_DEBUG.patch
patch -Np1 < ../patches/wine-gst/0039-HACK-kernelbase-yt-dlp.exe-redirection-and-cmdline-m.patch
patch -Np1 < ../patches/wine-gst/0040-mf-Schedule-stored-timers-for-the-original-time-inst.patch
patch -Np1 < ../patches/wine-gst/0041-mf-Start-forwarding-samples-only-at-the-PTS-of-the-f.patch
patch -Np1 < ../patches/wine-gst/0042-ntdll-Use-unixcall-instead-of-syscall-for-QueryPerfo.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 bc88e82ada1457245f246b6d5621b13b3d9ab760 Mon Sep 17 00:00:00 2001
From 5a42c6f7a56ffae4ac2d1367eac2d659b5336ca8 Mon Sep 17 00:00:00 2001
From: Zhiyi Zhang <[email protected]>
Date: Tue, 1 Aug 2023 10:52:21 +0800
Subject: [PATCH 01/43] mf: Add seeking support for IMFMediaSession::Start().
Subject: [PATCH 01/42] 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 ef707dea4de..3f3be2b84b0 100644
index 4f94d3c30a7..a5caad3c97a 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 ef707dea4de..3f3be2b84b0 100644
OBJ_STATE_INVALID,
};

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

Expand Down Expand Up @@ -48,7 +48,7 @@ index ef707dea4de..3f3be2b84b0 100644
HRESULT hr;
UINT i;

@@ -932,6 +951,13 @@ static void session_start(struct media_session *session, const GUID *time_format
@@ -1014,6 +1033,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 ef707dea4de..3f3be2b84b0 100644

session->presentation.time_format = *time_format;
session->presentation.start_position.vt = VT_EMPTY;
@@ -945,6 +971,14 @@ static void session_start(struct media_session *session, const GUID *time_format
@@ -1027,6 +1053,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 ef707dea4de..3f3be2b84b0 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);
@@ -965,12 +999,22 @@ static void session_start(struct media_session *session, const GUID *time_format
@@ -1047,12 +1081,22 @@ static void session_start(struct media_session *session, const GUID *time_format
}
}

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

Expand All @@ -114,7 +114,7 @@ index ef707dea4de..3f3be2b84b0 100644
if (FAILED(hr = create_session_op(SESSION_CMD_START, &op)))
return hr;

@@ -3714,8 +3761,6 @@ static HRESULT WINAPI session_events_callback_Invoke(IMFAsyncCallback *iface, IM
@@ -4038,8 +4085,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 4ba015c45201d9cbdba3237d2c9c3a243c4e70f4 Mon Sep 17 00:00:00 2001
From 134b5bbd0f07cdeaa3acd6e1d205ba1fd6cfe5c2 Mon Sep 17 00:00:00 2001
From: Zhiyi Zhang <[email protected]>
Date: Tue, 8 Aug 2023 15:24:34 +0800
Subject: [PATCH 02/43] mf/tests: Add a create_media_session_with_source_sink()
Subject: [PATCH 02/42] 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 0a34329bd75..e0bcedac20f 100644
index 9382d8cae35..58d8ec73c4f 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -4995,6 +4995,53 @@ static void test_sample_grabber_is_mediatype_supported(void)
@@ -4996,6 +4996,53 @@ static void test_sample_grabber_is_mediatype_supported(void)
IMFSampleGrabberSinkCallback_Release(grabber_callback);
}

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

struct test_grabber_callback *grabber_callback;
Expand All @@ -84,7 +84,7 @@ index 0a34329bd75..e0bcedac20f 100644
HRESULT hr;
DWORD res;

@@ -5035,33 +5077,6 @@ static void test_sample_grabber_orientation(GUID subtype)
@@ -5036,33 +5078,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 0a34329bd75..e0bcedac20f 100644
hr = MFCreateMediaType(&output_type);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
init_media_type(output_type, video_rgb32_desc, -1);
@@ -5069,18 +5084,7 @@ static void test_sample_grabber_orientation(GUID subtype)
@@ -5070,18 +5085,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 d4553e13b2110b7cfbcc39b5c5cc890e1a8da145 Mon Sep 17 00:00:00 2001
From ca2e4786f3a1e43aa542d79df84a434a6bbe03d6 Mon Sep 17 00:00:00 2001
From: Zhiyi Zhang <[email protected]>
Date: Mon, 7 Aug 2023 11:52:20 +0800
Subject: [PATCH 03/43] mf/tests: Test IMFMediaSession::Start().
Subject: [PATCH 03/42] 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 e0bcedac20f..f164a04b989 100644
index 58d8ec73c4f..240cbf194ea 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -2086,6 +2086,448 @@ static IMFMediaSource *create_media_source(const WCHAR *name, const WCHAR *mime)
@@ -2087,6 +2087,448 @@ static IMFMediaSource *create_media_source(const WCHAR *name, const WCHAR *mime)
return source;
}

Expand Down Expand Up @@ -460,7 +460,7 @@ index e0bcedac20f..f164a04b989 100644
static void test_media_session_events(void)
{
static const media_type_desc audio_float_44100 =
@@ -2887,27 +3329,27 @@ static ULONG WINAPI test_grabber_callback_Release(IMFSampleGrabberSinkCallback *
@@ -2888,27 +3330,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 e0bcedac20f..f164a04b989 100644
}

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

Expand All @@ -505,7 +505,7 @@ index e0bcedac20f..f164a04b989 100644
{
IMFTopologyNode *src_node, *sink_node;
IMFPresentationDescriptor *pd;
@@ -5025,6 +5467,11 @@ static void create_media_session_with_source_sink(IMFMediaSource *source, IMFAct
@@ -5026,6 +5468,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 e0bcedac20f..f164a04b989 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);
@@ -5084,7 +5531,7 @@ static void test_sample_grabber_orientation(GUID subtype)
@@ -5085,7 +5532,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 e0bcedac20f..f164a04b989 100644

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

Expand Down Expand Up @@ -773,7 +773,7 @@ index e0bcedac20f..f164a04b989 100644
START_TEST(mf)
{
init_functions();
@@ -7316,4 +8003,5 @@ START_TEST(mf)
@@ -7322,4 +8009,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 d74ea960a50420934759d2addfa649fae15f878a Mon Sep 17 00:00:00 2001
From 502f072eec3417eb1ae1fde7c28ac68529d51ba5 Mon Sep 17 00:00:00 2001
From: Zhiyi Zhang <[email protected]>
Date: Fri, 28 Jul 2023 18:04:30 +0800
Subject: [PATCH 04/43] mfmediaengine: Implement
Subject: [PATCH 04/42] 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 9e41d9dad84..28a273616c8 100644
index 85b4dbb471a..6aa84e1562b 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 9e41d9dad84..28a273616c8 100644
IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PLAYING, 0, 0);
break;
case MESessionEnded:
@@ -1846,19 +1854,9 @@ static double WINAPI media_engine_GetCurrentTime(IMFMediaEngineEx *iface)
@@ -1844,19 +1852,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 9e41d9dad84..28a273616c8 100644
}

static double WINAPI media_engine_GetStartTime(IMFMediaEngineEx *iface)
@@ -3059,9 +3057,43 @@ static HRESULT WINAPI media_engine_SetRealTimeMode(IMFMediaEngineEx *iface, BOOL
@@ -3135,9 +3133,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 334a767

Please sign in to comment.