Skip to content

Commit

Permalink
rtsp16
Browse files Browse the repository at this point in the history
  • Loading branch information
SpookySkeletons committed Dec 6, 2024
1 parent 06b768e commit 1df5fc7
Show file tree
Hide file tree
Showing 54 changed files with 534 additions and 278 deletions.
51 changes: 27 additions & 24 deletions patches/protonprep-valve-staging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -359,30 +359,33 @@
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-mfmediaengine-Allow-video_frame_sink-to-continue-to-.patch
patch -Np1 < ../patches/wine-gst/0039-HACK-winegstreamer-Add-a-resampler-to-wg_parser-for-.patch
patch -Np1 < ../patches/wine-gst/0040-HACK-winegstreamer-Add-a-videoscale-element-to-wg_pa.patch
patch -Np1 < ../patches/wine-gst/0041-HACK-mfmediaengine-Do-not-send-MF_MEDIA_ENGINE_EVENT.patch
patch -Np1 < ../patches/wine-gst/0042-Marker-commit-do-not-put-into-MR.patch
patch -Np1 < ../patches/wine-gst/0043-ntdll-Use-unixcall-instead-of-syscall-for-QueryPerfo.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
patch -Np1 < ../patches/wine-gst/0026-winegstreamer-Assume-server-does-not-support-ranges-.patch
patch -Np1 < ../patches/wine-gst/0027-winegstreamer-Implement-buffering-events.patch
patch -Np1 < ../patches/wine-gst/0028-mf-samplegrabber-Send-sample-requests-for-unused-spa.patch
patch -Np1 < ../patches/wine-gst/0029-winegstreamer-Fix-race-between-wg_parser_stream_disa.patch
patch -Np1 < ../patches/wine-gst/0030-winegstreamer-Handle-Gstreamer-pipeline-flushes-grac.patch
patch -Np1 < ../patches/wine-gst/0031-winegstreamer-Do-waits-for-samples-on-stream-specifi.patch
patch -Np1 < ../patches/wine-gst/0032-mf-session-Ensure-that-the-command-callback-does-not.patch
patch -Np1 < ../patches/wine-gst/0033-mf-session-Prevent-media-session-from-running-comman.patch
patch -Np1 < ../patches/wine-gst/0034-mf-sar-Allow-starting-audio-renderer-again-after-pau.patch
patch -Np1 < ../patches/wine-gst/0035-winegstreamer-Also-flush-token-queue-on-seek.patch
patch -Np1 < ../patches/wine-gst/0036-mf-session-Fix-pausing-a-media-session-when-the-medi.patch
patch -Np1 < ../patches/wine-gst/0037-winegstreamer-Do-not-force-uridecodebin-to-expose-un.patch
patch -Np1 < ../patches/wine-gst/0038-mfmediaengine-Unstub-IMFMediaEngine-SetAutoPlay.patch
patch -Np1 < ../patches/wine-gst/0039-mfmediaengine-Allow-video_frame_sink-to-continue-to-.patch
patch -Np1 < ../patches/wine-gst/0040-mfmediaengine-Fix-crash-when-playing-audio-only-sour.patch
patch -Np1 < ../patches/wine-gst/0041-winegstreamer-Ignore-closed-caption-streams.patch
patch -Np1 < ../patches/wine-gst/0042-HACK-winegstreamer-Add-a-resampler-to-wg_parser-for-.patch
patch -Np1 < ../patches/wine-gst/0043-HACK-winegstreamer-Add-a-videoscale-element-to-wg_pa.patch
patch -Np1 < ../patches/wine-gst/0044-HACK-mfmediaengine-Do-not-send-MF_MEDIA_ENGINE_EVENT.patch
patch -Np1 < ../patches/wine-gst/0045-TODO-SQUASH-winegstreamer-Fix-hang-during-media-sour.patch
patch -Np1 < ../patches/wine-gst/0046-Marker-commit-do-not-put-into-MR.patch
patch -Np1 < ../patches/wine-gst/0047-ntdll-Use-unixcall-instead-of-syscall-for-QueryPerfo.patch
patch -Np1 < ../patches/wine-gst/0048-mfplat-Allocate-memory-buffers-using-calloc.patch
patch -Np1 < ../patches/wine-gst/0049-DEBUG-winegstreamer-GST_LOG-GST_DEBUG.patch
patch -Np1 < ../patches/wine-gst/0051-mf-Schedule-stored-timers-for-the-original-time-inst.patch
patch -Np1 < ../patches/wine-gst/0052-mf-Start-forwarding-samples-only-at-the-PTS-of-the-f.patch
patch -Np1 < ../patches/wine-gst/0053-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,7 +1,7 @@
From 7918790918b7ee249d04f6766ea0d6e304100205 Mon Sep 17 00:00:00 2001
From: Zhiyi Zhang <[email protected]>
Date: Tue, 1 Aug 2023 10:52:21 +0800
Subject: [PATCH 01/49] mf: Add seeking support for IMFMediaSession::Start().
Subject: [PATCH 01/53] mf: Add seeking support for IMFMediaSession::Start().

---
dlls/mf/session.c | 57 ++++++++++++++++++++++++++++++++++++++++++-----
Expand Down Expand Up @@ -124,5 +124,5 @@ index 4f94d3c30a7..a5caad3c97a 100644
case MESourcePaused:
case MESourceStopped:
--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 6c06159c765dfdf524b3729e3e046954dd4baaa1 Mon Sep 17 00:00:00 2001
From: Zhiyi Zhang <[email protected]>
Date: Tue, 8 Aug 2023 15:24:34 +0800
Subject: [PATCH 02/49] mf/tests: Add a create_media_session_with_source_sink()
Subject: [PATCH 02/53] mf/tests: Add a create_media_session_with_source_sink()
helper.

---
Expand Down Expand Up @@ -139,5 +139,5 @@ index 9382d8cae35..58d8ec73c4f 100644
propvar.vt = VT_EMPTY;
hr = IMFMediaSession_Start(session, &GUID_NULL, &propvar);
--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 17f7aa6528c839bf56c6fd41a853ba924cd67f44 Mon Sep 17 00:00:00 2001
From: Zhiyi Zhang <[email protected]>
Date: Mon, 7 Aug 2023 11:52:20 +0800
Subject: [PATCH 03/49] mf/tests: Test IMFMediaSession::Start().
Subject: [PATCH 03/53] mf/tests: Test IMFMediaSession::Start().

---
dlls/mf/tests/mf.c | 704 ++++++++++++++++++++++++++++++++++++++++++++-
Expand Down Expand Up @@ -780,5 +780,5 @@ index 58d8ec73c4f..240cbf194ea 100644
+ test_media_session_Start();
}
--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 538f935fa7b23f9502975f7902c24e5c9de0757d Mon Sep 17 00:00:00 2001
From: Zhiyi Zhang <[email protected]>
Date: Fri, 28 Jul 2023 18:04:30 +0800
Subject: [PATCH 04/49] mfmediaengine: Implement
Subject: [PATCH 04/53] mfmediaengine: Implement
IMFMediaEngineEx::SetCurrentTime/Ex().

---
Expand Down Expand Up @@ -105,5 +105,5 @@ index 57bd2f82cec..d6d6b2fd7ab 100644

static HRESULT WINAPI media_engine_EnableTimeUpdateTimer(IMFMediaEngineEx *iface, BOOL enable)
--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 0961c4c7828f15209444a55e807a0360f6037a08 Mon Sep 17 00:00:00 2001
From: Zhiyi Zhang <[email protected]>
Date: Mon, 7 Aug 2023 11:53:41 +0800
Subject: [PATCH 05/49] mfmediaengine/tests: Test
Subject: [PATCH 05/53] mfmediaengine/tests: Test
IMFMediaEngineEx::SetCurrentTime/Ex().

---
Expand Down Expand Up @@ -239,5 +239,5 @@ index 63a7e139193..506faec231c 100644
IMFMediaEngineClassFactory_Release(factory);

--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From bd72831d81187c1a476563bd12b0e2c782ead62a Mon Sep 17 00:00:00 2001
From: Torge Matthies <[email protected]>
Date: Fri, 14 Jun 2024 03:09:34 +0200
Subject: [PATCH 06/49] mfmediaengine: Implement IMFMediaEngine::IsSeeking.
Subject: [PATCH 06/53] mfmediaengine: Implement IMFMediaEngine::IsSeeking.

---
dlls/mfmediaengine/main.c | 11 +++++++++--
Expand Down Expand Up @@ -31,5 +31,5 @@ index d6d6b2fd7ab..cd68c122851 100644

static double WINAPI media_engine_GetCurrentTime(IMFMediaEngineEx *iface)
--
2.47.0
2.47.1

4 changes: 2 additions & 2 deletions patches/wine-gst/0007-AVPro-Video-seeking-support.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From eff1d3503cee12c8d58b01d72dc88aa31560de7b Mon Sep 17 00:00:00 2001
From: Torge Matthies <[email protected]>
Date: Wed, 10 Apr 2024 18:57:59 +0200
Subject: [PATCH 07/49] === AVPro Video seeking support ===
Subject: [PATCH 07/53] === AVPro Video seeking support ===

---
MAINTAINERS | 2 ++
Expand All @@ -18,5 +18,5 @@ index c4afb5da88c..a414cc846c8 100644
+
+seek
--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 396294ff6ca75afdb67fd875b5c95a479dae9329 Mon Sep 17 00:00:00 2001
From: Torge Matthies <[email protected]>
Date: Mon, 26 Aug 2024 16:15:16 +0200
Subject: [PATCH 08/49] quartz: Fix buffer overflow when passing url as
Subject: [PATCH 08/53] quartz: Fix buffer overflow when passing url as
filename to FilterGraph2_AddSourceFilter.

CW-Bug-Id: #21644
Expand All @@ -23,5 +23,5 @@ index 7d6292df579..9d823662427 100644
{
size = sizeof(guidstr);
--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 55d5e5edfcf5218a9f4bac140841871b0463664f Mon Sep 17 00:00:00 2001
From: Torge Matthies <[email protected]>
Date: Fri, 14 Jun 2024 03:15:57 +0200
Subject: [PATCH 09/49] winegstreamer: Initialize condition variable of struct
Subject: [PATCH 09/53] winegstreamer: Initialize condition variable of struct
media_stream.

CW-Bug-Id: #21644
Expand All @@ -22,5 +22,5 @@ index eb6ab3d21cd..119fde3e04f 100644
TRACE("Created stream object %p.\n", object);

--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From c751866d1efd4346ea0c91476f3b2bb02d6bf90b Mon Sep 17 00:00:00 2001
From: Torge Matthies <[email protected]>
Date: Sun, 31 Mar 2024 15:49:33 +0200
Subject: [PATCH 10/49] winegstreamer: Connect autoplug-continue and
Subject: [PATCH 10/53] winegstreamer: Connect autoplug-continue and
deep-element-added callbacks to uridecodebin-based parsers too.

CW-Bug-Id: #21644
Expand All @@ -22,5 +22,5 @@ index 2b3e19cdab7..8523ef0af1e 100644
pthread_mutex_lock(&parser->mutex);
parser->no_more_pads = false;
--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From f40f133d6db8f882641a5375fd2ed112c8361df9 Mon Sep 17 00:00:00 2001
From: Torge Matthies <[email protected]>
Date: Mon, 25 Mar 2024 09:19:18 +0100
Subject: [PATCH 11/49] winegstreamer: Do not create a read thread for
Subject: [PATCH 11/53] winegstreamer: Do not create a read thread for
uridecodebin-based media sources.

CW-Bug-Id: #21644
Expand Down Expand Up @@ -40,5 +40,5 @@ index 119fde3e04f..93ddf6c6051 100644
object->state = SOURCE_OPENING;

--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 1da7f8bf361a80259285d6347d8f5c56400dd6cd Mon Sep 17 00:00:00 2001
From: Torge Matthies <[email protected]>
Date: Tue, 19 Mar 2024 04:06:37 +0100
Subject: [PATCH 12/49] winegstreamer: Ignore an assert in wg_parser.
Subject: [PATCH 12/53] winegstreamer: Ignore an assert in wg_parser.

This gets hit when a wg_parser receives GST_EVENT_FLUSH_START between the wg_parser_stream_get_buffer function return
and the wg_parser_stream_release_buffer call. In this case the NULL buffer can be ignored, it does no harm and there
Expand Down Expand Up @@ -35,5 +35,5 @@ index 8523ef0af1e..25d84a430cf 100644
pthread_mutex_unlock(&parser->mutex);
pthread_cond_signal(&stream->event_empty_cond);
--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 9c08eb71ce96786f15e84dceb4d23abbdf68b7bf Mon Sep 17 00:00:00 2001
From: Torge Matthies <[email protected]>
Date: Wed, 31 Jan 2024 17:42:54 +0100
Subject: [PATCH 13/49] winegstreamer: Add more RTSP-based URI schemes to
Subject: [PATCH 13/53] winegstreamer: Add more RTSP-based URI schemes to
GStreamer scheme handler.

CW-Bug-Id: #21644
Expand Down Expand Up @@ -53,5 +53,5 @@ index c50d3a05747..d0c0265f65a 100644
}
}
--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 9d46c498e7db6fdd6a820d1309ccbda265a4e62a Mon Sep 17 00:00:00 2001
From: Torge Matthies <[email protected]>
Date: Mon, 22 Apr 2024 11:43:45 +0200
Subject: [PATCH 14/49] winegstreamer: Mark wg_parser container bin as
Subject: [PATCH 14/53] winegstreamer: Mark wg_parser container bin as
streams-aware.

Mirroring wg_source.
Expand All @@ -24,5 +24,5 @@ index 25d84a430cf..363eb5db2c0 100644
if (parser->context)
gst_element_set_context(parser->container, parser->context);
--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 12f6a6fa7a1b08e41d4d7985c9246677c542c6d1 Mon Sep 17 00:00:00 2001
From: Torge Matthies <[email protected]>
Date: Wed, 31 Jan 2024 17:42:55 +0100
Subject: [PATCH 15/49] winegstreamer: Set a clock for the wg_parser pipeline.
Subject: [PATCH 15/53] winegstreamer: Set a clock for the wg_parser pipeline.

Some elements under uridecodebin (e.g. the RTSP demuxer) require a valid clock to function properly.
GstPipeline does this so let's do this too.
Expand All @@ -25,5 +25,5 @@ index 363eb5db2c0..c9a847038a0 100644
parser->next_pull_offset = 0;
parser->error = false;
--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From cb98d8608de3dcda81ea2b1b86bd8350c650b9a5 Mon Sep 17 00:00:00 2001
From: Torge Matthies <[email protected]>
Date: Wed, 31 Jan 2024 17:42:55 +0100
Subject: [PATCH 16/49] winegstreamer: Set base time on wg_parser bin while
Subject: [PATCH 16/53] winegstreamer: Set base time on wg_parser bin while
connecting.

CW-Bug-Id: #21644
Expand Down Expand Up @@ -40,5 +40,5 @@ index c9a847038a0..320e624ccb1 100644
ret = gst_element_get_state(parser->container, NULL, NULL, -1);

--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 4f9a075050d6a6edae4c69af274090b2248ca0b1 Mon Sep 17 00:00:00 2001
From: Torge Matthies <[email protected]>
Date: Wed, 31 Jan 2024 17:42:55 +0100
Subject: [PATCH 17/49] winegstreamer: Put pipeline into PLAYING state before
Subject: [PATCH 17/53] winegstreamer: Put pipeline into PLAYING state before
waiting for the no-more-pads callback.

Some elements (e.g. uridecodebin with an RTSP URI) won't send no-more-pads in READY/PAUSED state.
Expand Down Expand Up @@ -44,5 +44,5 @@ index 320e624ccb1..47922146d9a 100644
pthread_cond_wait(&parser->init_cond, &parser->mutex);
if (parser->error)
--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From a3303110d4691ceb99d44c9e4e0a3fee848614aa Mon Sep 17 00:00:00 2001
From: Torge Matthies <[email protected]>
Date: Sat, 10 Aug 2024 01:43:37 +0200
Subject: [PATCH 18/49] winegstreamer: Handle a duration of -1 correctly.
Subject: [PATCH 18/53] winegstreamer: Handle a duration of -1 correctly.

Live sources will return a duration of -1 to signify that the duration is unknown.
By dividing this by 100 this value gets wrongfully changed to 0.
Expand Down Expand Up @@ -46,5 +46,5 @@ index 47922146d9a..caee2cadfb7 100644
}

--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 9ae292993013df74eed2a94ec87eb4c1d2bb1440 Mon Sep 17 00:00:00 2001
From: Torge Matthies <[email protected]>
Date: Tue, 23 Apr 2024 19:30:17 +0200
Subject: [PATCH 19/49] winegstreamer: Don't only accept segment events when
Subject: [PATCH 19/53] winegstreamer: Don't only accept segment events when
streams are enabled.

I don't know why this was done previously but this just creates a race condition, with no to me apparent benefit.
Expand Down Expand Up @@ -51,5 +51,5 @@ index caee2cadfb7..5451523eaf0 100644
case GST_EVENT_EOS:
pthread_mutex_lock(&parser->mutex);
--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 1524e48ebff544374216ea134633cc3189468aef Mon Sep 17 00:00:00 2001
From: Torge Matthies <[email protected]>
Date: Wed, 31 Jan 2024 17:42:55 +0100
Subject: [PATCH 20/49] winegstreamer: Convert buffer presentation timestamps
Subject: [PATCH 20/53] winegstreamer: Convert buffer presentation timestamps
into stream time.

CW-Bug-Id: #21644
Expand Down Expand Up @@ -129,5 +129,5 @@ index 5451523eaf0..34188d8b658 100644
break;
}
--
2.47.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From d094f8e4fab75229510736b73f127401d43579fa Mon Sep 17 00:00:00 2001
From: Torge Matthies <[email protected]>
Date: Wed, 31 Jan 2024 17:42:55 +0100
Subject: [PATCH 21/49] winegstreamer: Reorder parser initialization code a bit
Subject: [PATCH 21/53] winegstreamer: Reorder parser initialization code a bit
to prevent race conditions.

CW-Bug-Id: #21644
Expand Down Expand Up @@ -81,5 +81,5 @@ index 34188d8b658..3aeafae2175 100644
return FALSE;

--
2.47.0
2.47.1

Loading

0 comments on commit 1df5fc7

Please sign in to comment.