From 334a767bd31cc9c3309197bef22f7a506335129c Mon Sep 17 00:00:00 2001 From: Bones Date: Thu, 11 Jul 2024 03:57:39 -0400 Subject: [PATCH] rtsp12 --- patches/protonprep-valve-staging.sh | 71 +++--- ...ng-support-for-IMFMediaSession-Start.patch | 18 +- ...reate_media_session_with_source_sink.patch | 14 +- ...-mf-tests-Test-IMFMediaSession-Start.patch | 20 +- ...plement-IMFMediaEngineEx-SetCurrentT.patch | 10 +- ...sts-Test-IMFMediaEngineEx-SetCurrent.patch | 18 +- ...e-Implement-IMFMediaEngine-IsSeeking.patch | 8 +- .../0007-AVPro-Video-seeking-support.patch | 8 +- ...xes.patch => 0008-Memory-leak-fixes.patch} | 8 +- ...-leaking-samples-in-transform_node_d.patch | 28 -- ...tialize-condition-variable-of-struc.patch} | 8 +- ...nect-autoplug-continue-and-deep-ele.patch} | 16 +- ...not-create-a-read-thread-for-uridec.patch} | 10 +- ...eamer-Ignore-an-assert-in-wg_parser.patch} | 8 +- ...e-wg_parser-report-the-exact-suppor.patch} | 44 +++- ...-more-RTSP-based-URI-schemes-to-GSt.patch} | 4 +- ...-Fixate-caps-in-autoplug_continue_cb.patch | 27 -- ...k-wg_parser-container-bin-as-stream.patch} | 8 +- ...-a-clock-for-the-wg_parser-pipeline.patch} | 8 +- ...ixate-caps-in-the-pad-added-callback.patch | 38 --- ...-base-time-on-wg_parser-bin-while-c.patch} | 12 +- ...-pipeline-into-PLAYING-state-before.patch} | 8 +- ...-t-only-accept-segment-events-when-.patch} | 8 +- ...vert-buffer-presentation-timestamps.patch} | 61 ++++- ...rder-parser-initialization-code-a-b.patch} | 16 +- ...away-with-the-per-stream-condvars-a.patch} | 43 ++-- ...-pthread_cond_broadcast-instead-of-.patch} | 22 +- ...-Adjust-buffer-timestamps-after-seek.patch | 53 ---- ...-not-fail-caps-negotiation-when-ther.patch | 240 ++++++++++++++++++ ...egstreamer-Do-not-seek-live-sources.patch} | 22 +- ...streamer-Implement-buffering-events.patch} | 48 ++-- ...quests-for-unused-space-of-sample-q.patch} | 4 +- ...-not-fail-caps-negotiation-when-ther.patch | 171 ------------- ...-race-between-wg_parser_stream_disa.patch} | 8 +- ...dle-Gstreamer-pipeline-flushes-grac.patch} | 12 +- ...waits-for-samples-on-stream-specifi.patch} | 58 ++--- ...e-that-the-command-callback-does-not.patch | 48 ++++ ...amer-Make-wg_parser-report-the-exact.patch | 101 ++++++++ ...-not-force-uridecodebin-to-expose-un.patch | 55 ++++ ...r-Add-a-resampler-to-wg_parser-for-.patch} | 8 +- ...r-Add-a-videoscale-element-to-wg_pa.patch} | 10 +- ...e-Do-not-send-MF_MEDIA_ENGINE_EVENT.patch} | 8 +- ...37-Marker-commit-do-not-put-into-MR.patch} | 8 +- ...BUG-winegstreamer-GST_LOG-GST_DEBUG.patch} | 42 +-- ...t-dlp.exe-redirection-and-cmdline-m.patch} | 8 +- ...d-timers-for-the-original-time-inst.patch} | 4 +- ...ng-samples-only-at-the-PTS-of-the-f.patch} | 71 +++--- ...l-instead-of-syscall-for-QueryPerfo.patch} | 4 +- 48 files changed, 854 insertions(+), 673 deletions(-) rename patches/wine-gst/{0009-Memory-leak-fixes.patch => 0008-Memory-leak-fixes.patch} (57%) delete mode 100644 patches/wine-gst/0008-mf-session-Avoid-leaking-samples-in-transform_node_d.patch rename patches/wine-gst/{0010-winegstreamer-Initialize-condition-variable-of-struc.patch => 0009-winegstreamer-Initialize-condition-variable-of-struc.patch} (72%) rename patches/wine-gst/{0011-winegstreamer-Connect-autoplug-continue-and-deep-ele.patch => 0010-winegstreamer-Connect-autoplug-continue-and-deep-ele.patch} (54%) rename patches/wine-gst/{0012-winegstreamer-Do-not-create-a-read-thread-for-uridec.patch => 0011-winegstreamer-Do-not-create-a-read-thread-for-uridec.patch} (81%) rename patches/wine-gst/{0013-winegstreamer-Ignore-an-assert-in-wg_parser.patch => 0012-winegstreamer-Ignore-an-assert-in-wg_parser.patch} (83%) rename patches/wine-gst/{0015-winegstreamer-Make-wg_parser-report-the-exact-suppor.patch => 0013-winegstreamer-Make-wg_parser-report-the-exact-suppor.patch} (65%) rename patches/wine-gst/{0016-winegstreamer-Add-more-RTSP-based-URI-schemes-to-GSt.patch => 0014-winegstreamer-Add-more-RTSP-based-URI-schemes-to-GSt.patch} (94%) delete mode 100644 patches/wine-gst/0014-winegstreamer-Fixate-caps-in-autoplug_continue_cb.patch rename patches/wine-gst/{0018-winegstreamer-Mark-wg_parser-container-bin-as-stream.patch => 0015-winegstreamer-Mark-wg_parser-container-bin-as-stream.patch} (74%) rename patches/wine-gst/{0019-winegstreamer-Set-a-clock-for-the-wg_parser-pipeline.patch => 0016-winegstreamer-Set-a-clock-for-the-wg_parser-pipeline.patch} (78%) delete mode 100644 patches/wine-gst/0017-winegstreamer-Fixate-caps-in-the-pad-added-callback.patch rename patches/wine-gst/{0020-winegstreamer-Set-base-time-on-wg_parser-bin-while-c.patch => 0017-winegstreamer-Set-base-time-on-wg_parser-bin-while-c.patch} (78%) rename patches/wine-gst/{0021-winegstreamer-Put-pipeline-into-PLAYING-state-before.patch => 0018-winegstreamer-Put-pipeline-into-PLAYING-state-before.patch} (80%) rename patches/wine-gst/{0022-winegstreamer-Don-t-only-accept-segment-events-when-.patch => 0019-winegstreamer-Don-t-only-accept-segment-events-when-.patch} (88%) rename patches/wine-gst/{0023-winegstreamer-Convert-buffer-presentation-timestamps.patch => 0020-winegstreamer-Convert-buffer-presentation-timestamps.patch} (52%) rename patches/wine-gst/{0025-winegstreamer-Reorder-parser-initialization-code-a-b.patch => 0021-winegstreamer-Reorder-parser-initialization-code-a-b.patch} (87%) rename patches/wine-gst/{0026-winegstreamer-Do-away-with-the-per-stream-condvars-a.patch => 0022-winegstreamer-Do-away-with-the-per-stream-condvars-a.patch} (75%) rename patches/wine-gst/{0027-winegstreamer-Use-pthread_cond_broadcast-instead-of-.patch => 0023-winegstreamer-Use-pthread_cond_broadcast-instead-of-.patch} (78%) delete mode 100644 patches/wine-gst/0024-winegstreamer-Adjust-buffer-timestamps-after-seek.patch create mode 100644 patches/wine-gst/0024-winegstreamer-Do-not-fail-caps-negotiation-when-ther.patch rename patches/wine-gst/{0029-winegstreamer-Do-not-seek-live-sources.patch => 0025-winegstreamer-Do-not-seek-live-sources.patch} (82%) rename patches/wine-gst/{0030-winegstreamer-Implement-buffering-events.patch => 0026-winegstreamer-Implement-buffering-events.patch} (87%) rename patches/wine-gst/{0031-mf-Send-sample-requests-for-unused-space-of-sample-q.patch => 0027-mf-Send-sample-requests-for-unused-space-of-sample-q.patch} (96%) delete mode 100644 patches/wine-gst/0028-winegstreamer-Do-not-fail-caps-negotiation-when-ther.patch rename patches/wine-gst/{0032-winegstreamer-Fix-race-between-wg_parser_stream_disa.patch => 0028-winegstreamer-Fix-race-between-wg_parser_stream_disa.patch} (76%) rename patches/wine-gst/{0033-winegstreamer-Handle-Gstreamer-pipeline-flushes-grac.patch => 0029-winegstreamer-Handle-Gstreamer-pipeline-flushes-grac.patch} (83%) rename patches/wine-gst/{0034-winegstreamer-Do-waits-for-samples-on-stream-specifi.patch => 0030-winegstreamer-Do-waits-for-samples-on-stream-specifi.patch} (92%) create mode 100644 patches/wine-gst/0031-mf-session-Ensure-that-the-command-callback-does-not.patch create mode 100644 patches/wine-gst/0032-Revert-winegstreamer-Make-wg_parser-report-the-exact.patch create mode 100644 patches/wine-gst/0033-winegstreamer-Do-not-force-uridecodebin-to-expose-un.patch rename patches/wine-gst/{0035-HACK-winegstreamer-Add-a-resampler-to-wg_parser-for-.patch => 0034-HACK-winegstreamer-Add-a-resampler-to-wg_parser-for-.patch} (80%) rename patches/wine-gst/{0036-HACK-winegstreamer-Add-a-videoscale-element-to-wg_pa.patch => 0035-HACK-winegstreamer-Add-a-videoscale-element-to-wg_pa.patch} (83%) rename patches/wine-gst/{0037-HACK-mfmediaengine-Do-not-send-MF_MEDIA_ENGINE_EVENT.patch => 0036-HACK-mfmediaengine-Do-not-send-MF_MEDIA_ENGINE_EVENT.patch} (89%) rename patches/wine-gst/{0038-Marker-commit-do-not-put-into-MR.patch => 0037-Marker-commit-do-not-put-into-MR.patch} (54%) rename patches/wine-gst/{0039-DEBUG-winegstreamer-GST_LOG-GST_DEBUG.patch => 0038-DEBUG-winegstreamer-GST_LOG-GST_DEBUG.patch} (80%) rename patches/wine-gst/{0040-HACK-kernelbase-yt-dlp.exe-redirection-and-cmdline-m.patch => 0039-HACK-kernelbase-yt-dlp.exe-redirection-and-cmdline-m.patch} (92%) rename patches/wine-gst/{0041-mf-Schedule-stored-timers-for-the-original-time-inst.patch => 0040-mf-Schedule-stored-timers-for-the-original-time-inst.patch} (95%) rename patches/wine-gst/{0042-mf-Start-forwarding-samples-only-at-the-PTS-of-the-f.patch => 0041-mf-Start-forwarding-samples-only-at-the-PTS-of-the-f.patch} (79%) rename patches/wine-gst/{0043-ntdll-Use-unixcall-instead-of-syscall-for-QueryPerfo.patch => 0042-ntdll-Use-unixcall-instead-of-syscall-for-QueryPerfo.patch} (96%) diff --git a/patches/protonprep-valve-staging.sh b/patches/protonprep-valve-staging.sh index 05f21b8e1..6028a7810 100755 --- a/patches/protonprep-valve-staging.sh +++ b/patches/protonprep-valve-staging.sh @@ -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 diff --git a/patches/wine-gst/0001-mf-Add-seeking-support-for-IMFMediaSession-Start.patch b/patches/wine-gst/0001-mf-Add-seeking-support-for-IMFMediaSession-Start.patch index 81cb7e19a..63ced0054 100644 --- a/patches/wine-gst/0001-mf-Add-seeking-support-for-IMFMediaSession-Start.patch +++ b/patches/wine-gst/0001-mf-Add-seeking-support-for-IMFMediaSession-Start.patch @@ -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 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 @@ -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; } @@ -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: @@ -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) { @@ -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 } } @@ -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; @@ -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: diff --git a/patches/wine-gst/0002-mf-tests-Add-a-create_media_session_with_source_sink.patch b/patches/wine-gst/0002-mf-tests-Add-a-create_media_session_with_source_sink.patch index 2908341e4..d2f71f170 100644 --- a/patches/wine-gst/0002-mf-tests-Add-a-create_media_session_with_source_sink.patch +++ b/patches/wine-gst/0002-mf-tests-Add-a-create_media_session_with_source_sink.patch @@ -1,7 +1,7 @@ -From 4ba015c45201d9cbdba3237d2c9c3a243c4e70f4 Mon Sep 17 00:00:00 2001 +From 134b5bbd0f07cdeaa3acd6e1d205ba1fd6cfe5c2 Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang 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. --- @@ -9,10 +9,10 @@ Subject: [PATCH 02/43] mf/tests: Add a create_media_session_with_source_sink() 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); } @@ -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; @@ -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()); @@ -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); diff --git a/patches/wine-gst/0003-mf-tests-Test-IMFMediaSession-Start.patch b/patches/wine-gst/0003-mf-tests-Test-IMFMediaSession-Start.patch index 431850bb4..2dafb4d7f 100644 --- a/patches/wine-gst/0003-mf-tests-Test-IMFMediaSession-Start.patch +++ b/patches/wine-gst/0003-mf-tests-Test-IMFMediaSession-Start.patch @@ -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 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; } @@ -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) { @@ -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); } @@ -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); @@ -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); @@ -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); } @@ -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(); diff --git a/patches/wine-gst/0004-mfmediaengine-Implement-IMFMediaEngineEx-SetCurrentT.patch b/patches/wine-gst/0004-mfmediaengine-Implement-IMFMediaEngineEx-SetCurrentT.patch index 33f66854a..b69755f09 100644 --- a/patches/wine-gst/0004-mfmediaengine-Implement-IMFMediaEngineEx-SetCurrentT.patch +++ b/patches/wine-gst/0004-mfmediaengine-Implement-IMFMediaEngineEx-SetCurrentT.patch @@ -1,7 +1,7 @@ -From d74ea960a50420934759d2addfa649fae15f878a Mon Sep 17 00:00:00 2001 +From 502f072eec3417eb1ae1fde7c28ac68529d51ba5 Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Fri, 28 Jul 2023 18:04:30 +0800 -Subject: [PATCH 04/43] mfmediaengine: Implement +Subject: [PATCH 04/42] mfmediaengine: Implement IMFMediaEngineEx::SetCurrentTime/Ex(). --- @@ -9,7 +9,7 @@ Subject: [PATCH 04/43] mfmediaengine: Implement 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 @@ -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) { @@ -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) { diff --git a/patches/wine-gst/0005-mfmediaengine-tests-Test-IMFMediaEngineEx-SetCurrent.patch b/patches/wine-gst/0005-mfmediaengine-tests-Test-IMFMediaEngineEx-SetCurrent.patch index f1f162661..bb9e72c9d 100644 --- a/patches/wine-gst/0005-mfmediaengine-tests-Test-IMFMediaEngineEx-SetCurrent.patch +++ b/patches/wine-gst/0005-mfmediaengine-tests-Test-IMFMediaEngineEx-SetCurrent.patch @@ -1,7 +1,7 @@ -From e899f59e8a37f644d968ee722874e910019bfeb3 Mon Sep 17 00:00:00 2001 +From 2dcc6d2934f8ffa9c5abfcc51a57c68933643d02 Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Mon, 7 Aug 2023 11:53:41 +0800 -Subject: [PATCH 05/43] mfmediaengine/tests: Test +Subject: [PATCH 05/42] mfmediaengine/tests: Test IMFMediaEngineEx::SetCurrentTime/Ex(). --- @@ -9,10 +9,10 @@ Subject: [PATCH 05/43] mfmediaengine/tests: Test 1 file changed, 183 insertions(+) diff --git a/dlls/mfmediaengine/tests/mfmediaengine.c b/dlls/mfmediaengine/tests/mfmediaengine.c -index 47130d8e436..29a11d034cd 100644 +index 63a7e139193..506faec231c 100644 --- a/dlls/mfmediaengine/tests/mfmediaengine.c +++ b/dlls/mfmediaengine/tests/mfmediaengine.c -@@ -2185,6 +2185,9 @@ struct test_seek_notify +@@ -2156,6 +2156,9 @@ struct test_seek_notify { IMFMediaEngineNotify IMFMediaEngineNotify_iface; HANDLE playing_event; @@ -22,7 +22,7 @@ index 47130d8e436..29a11d034cd 100644 HRESULT expected_error; HRESULT error; LONG refcount; -@@ -2224,6 +2227,9 @@ static ULONG WINAPI test_seek_notify_Release(IMFMediaEngineNotify *iface) +@@ -2195,6 +2198,9 @@ static ULONG WINAPI test_seek_notify_Release(IMFMediaEngineNotify *iface) if (!refcount) { CloseHandle(notify->playing_event); @@ -32,7 +32,7 @@ index 47130d8e436..29a11d034cd 100644 free(notify); } -@@ -2240,6 +2246,15 @@ static HRESULT WINAPI test_seek_notify_EventNotify(IMFMediaEngineNotify *iface, +@@ -2211,6 +2217,15 @@ static HRESULT WINAPI test_seek_notify_EventNotify(IMFMediaEngineNotify *iface, case MF_MEDIA_ENGINE_EVENT_PLAYING: SetEvent(notify->playing_event); break; @@ -48,7 +48,7 @@ index 47130d8e436..29a11d034cd 100644 case MF_MEDIA_ENGINE_EVENT_ERROR: ok(param2 == notify->expected_error, "Unexpected error %#lx\n", param2); notify->error = param2; -@@ -2264,7 +2279,13 @@ static struct test_seek_notify *create_seek_notify(void) +@@ -2235,7 +2250,13 @@ static struct test_seek_notify *create_seek_notify(void) object = calloc(1, sizeof(*object)); object->IMFMediaEngineNotify_iface.lpVtbl = &test_seek_notify_vtbl; object->playing_event = CreateEventW(NULL, FALSE, FALSE, NULL); @@ -62,7 +62,7 @@ index 47130d8e436..29a11d034cd 100644 object->refcount = 1; return object; } -@@ -2510,6 +2531,167 @@ static void test_media_extension(void) +@@ -2481,6 +2502,167 @@ static void test_media_extension(void) IMFMediaEngineExtension_Release(&extension->IMFMediaEngineExtension_iface); } @@ -230,7 +230,7 @@ index 47130d8e436..29a11d034cd 100644 START_TEST(mfmediaengine) { HRESULT hr; -@@ -2545,6 +2727,7 @@ START_TEST(mfmediaengine) +@@ -2516,6 +2698,7 @@ START_TEST(mfmediaengine) test_GetDuration(); test_GetSeekable(); test_media_extension(); diff --git a/patches/wine-gst/0006-mfmediaengine-Implement-IMFMediaEngine-IsSeeking.patch b/patches/wine-gst/0006-mfmediaengine-Implement-IMFMediaEngine-IsSeeking.patch index 185894094..7d882ca84 100644 --- a/patches/wine-gst/0006-mfmediaengine-Implement-IMFMediaEngine-IsSeeking.patch +++ b/patches/wine-gst/0006-mfmediaengine-Implement-IMFMediaEngine-IsSeeking.patch @@ -1,17 +1,17 @@ -From eaba25d360906caaa566ab0e086a954d17e8f4a5 Mon Sep 17 00:00:00 2001 +From 93a92705c0b31f0d80bc75ff40222e1f36911a0a Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Fri, 14 Jun 2024 03:09:34 +0200 -Subject: [PATCH 06/43] mfmediaengine: Implement IMFMediaEngine::IsSeeking. +Subject: [PATCH 06/42] mfmediaengine: Implement IMFMediaEngine::IsSeeking. --- dlls/mfmediaengine/main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/mfmediaengine/main.c b/dlls/mfmediaengine/main.c -index 28a273616c8..a40f8d64f58 100644 +index 6aa84e1562b..fba338a8438 100644 --- a/dlls/mfmediaengine/main.c +++ b/dlls/mfmediaengine/main.c -@@ -1825,9 +1825,16 @@ static USHORT WINAPI media_engine_GetReadyState(IMFMediaEngineEx *iface) +@@ -1823,9 +1823,16 @@ static USHORT WINAPI media_engine_GetReadyState(IMFMediaEngineEx *iface) static BOOL WINAPI media_engine_IsSeeking(IMFMediaEngineEx *iface) { diff --git a/patches/wine-gst/0007-AVPro-Video-seeking-support.patch b/patches/wine-gst/0007-AVPro-Video-seeking-support.patch index 91f37933c..5abf13e29 100644 --- a/patches/wine-gst/0007-AVPro-Video-seeking-support.patch +++ b/patches/wine-gst/0007-AVPro-Video-seeking-support.patch @@ -1,17 +1,17 @@ -From 20481d9dc941adbe88d9090625246e0af49197e6 Mon Sep 17 00:00:00 2001 +From 94470715480c6c9ab86777c8d95f4d9d1bbc4b46 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Wed, 10 Apr 2024 18:57:59 +0200 -Subject: [PATCH 07/43] === AVPro Video seeking support === +Subject: [PATCH 07/42] === AVPro Video seeking support === --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS -index 59873f6804c..ab42dff2884 100644 +index c4afb5da88c..a414cc846c8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -436,3 +436,5 @@ P: Zebediah Figura +@@ -435,3 +435,5 @@ P: Zebediah Figura P: Paul Gofman P: Erich E. Hoover W: https://wine-staging.com/ diff --git a/patches/wine-gst/0009-Memory-leak-fixes.patch b/patches/wine-gst/0008-Memory-leak-fixes.patch similarity index 57% rename from patches/wine-gst/0009-Memory-leak-fixes.patch rename to patches/wine-gst/0008-Memory-leak-fixes.patch index d6bdadd65..6473f3b1b 100644 --- a/patches/wine-gst/0009-Memory-leak-fixes.patch +++ b/patches/wine-gst/0008-Memory-leak-fixes.patch @@ -1,17 +1,17 @@ -From 54ce917fe1589a95a612dc1469a4ef086168aab3 Mon Sep 17 00:00:00 2001 +From d8d434c2be793c63ad20f6e0c749804d1f7cd21d Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Wed, 10 Apr 2024 18:59:43 +0200 -Subject: [PATCH 09/43] === Memory leak fixes === +Subject: [PATCH 08/42] === Memory leak fixes === --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS -index ab42dff2884..2291c99447c 100644 +index a414cc846c8..9b971e73e79 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -438,3 +438,4 @@ P: Erich E. Hoover +@@ -437,3 +437,4 @@ P: Erich E. Hoover W: https://wine-staging.com/ seek diff --git a/patches/wine-gst/0008-mf-session-Avoid-leaking-samples-in-transform_node_d.patch b/patches/wine-gst/0008-mf-session-Avoid-leaking-samples-in-transform_node_d.patch deleted file mode 100644 index f594d35ac..000000000 --- a/patches/wine-gst/0008-mf-session-Avoid-leaking-samples-in-transform_node_d.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 377f775c4cda142df5c938b0c92ca99f6838364c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?R=C3=A9mi=20Bernon?= -Date: Wed, 13 Mar 2024 10:27:26 +0100 -Subject: [PATCH 08/43] mf/session: Avoid leaking samples in - transform_node_deliver_samples. - ---- - dlls/mf/session.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/dlls/mf/session.c b/dlls/mf/session.c -index 3f3be2b84b0..925566d6baf 100644 ---- a/dlls/mf/session.c -+++ b/dlls/mf/session.c -@@ -3337,7 +3337,10 @@ static void transform_node_deliver_samples(struct media_session *session, struct - stream = &topo_node->u.transform.inputs[input]; - - if (SUCCEEDED(transform_stream_pop_sample(stream, &sample))) -+ { - session_deliver_sample_to_node(session, topo_node->node, input, sample); -+ IMFSample_Release(sample); -+ } - else if (FAILED(hr = IMFTopologyNode_GetInput(topo_node->node, input, &up_node, &output))) - WARN("Failed to get node %p/%lu input, hr %#lx\n", topo_node->node, input, hr); - else --- -2.45.2 - diff --git a/patches/wine-gst/0010-winegstreamer-Initialize-condition-variable-of-struc.patch b/patches/wine-gst/0009-winegstreamer-Initialize-condition-variable-of-struc.patch similarity index 72% rename from patches/wine-gst/0010-winegstreamer-Initialize-condition-variable-of-struc.patch rename to patches/wine-gst/0009-winegstreamer-Initialize-condition-variable-of-struc.patch index 4b453395d..17535408a 100644 --- a/patches/wine-gst/0010-winegstreamer-Initialize-condition-variable-of-struc.patch +++ b/patches/wine-gst/0009-winegstreamer-Initialize-condition-variable-of-struc.patch @@ -1,7 +1,7 @@ -From bb59ff4a88faa481a4bceae9464d0302ed1733e1 Mon Sep 17 00:00:00 2001 +From da53e43b7436b39c7945b67442c5705e672a6e94 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Fri, 14 Jun 2024 03:15:57 +0200 -Subject: [PATCH 10/43] winegstreamer: Initialize condition variable of struct +Subject: [PATCH 09/42] winegstreamer: Initialize condition variable of struct media_stream. --- @@ -9,10 +9,10 @@ Subject: [PATCH 10/43] winegstreamer: Initialize condition variable of struct 1 file changed, 1 insertion(+) diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index a4ac0085dea..93a4425dd06 100644 +index eb6ab3d21cd..119fde3e04f 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c -@@ -1172,6 +1172,7 @@ static HRESULT media_stream_create(IMFMediaSource *source, IMFStreamDescriptor * +@@ -1043,6 +1043,7 @@ static HRESULT media_stream_create(IMFMediaSource *source, IMFStreamDescriptor * object->active = TRUE; object->eos = FALSE; object->wg_stream = wg_stream; diff --git a/patches/wine-gst/0011-winegstreamer-Connect-autoplug-continue-and-deep-ele.patch b/patches/wine-gst/0010-winegstreamer-Connect-autoplug-continue-and-deep-ele.patch similarity index 54% rename from patches/wine-gst/0011-winegstreamer-Connect-autoplug-continue-and-deep-ele.patch rename to patches/wine-gst/0010-winegstreamer-Connect-autoplug-continue-and-deep-ele.patch index 8114d187a..ab4deca74 100644 --- a/patches/wine-gst/0011-winegstreamer-Connect-autoplug-continue-and-deep-ele.patch +++ b/patches/wine-gst/0010-winegstreamer-Connect-autoplug-continue-and-deep-ele.patch @@ -1,22 +1,18 @@ -From 044c331fc36bd87ca51f02c106614f37fa9d5d5e Mon Sep 17 00:00:00 2001 +From fbfbf77dc4e36b616d669915df71b72a0c77e420 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Sun, 31 Mar 2024 15:49:33 +0200 -Subject: [PATCH 11/43] winegstreamer: Connect autoplug-continue and +Subject: [PATCH 10/42] winegstreamer: Connect autoplug-continue and deep-element-added callbacks to uridecodebin-based parsers too. --- - dlls/winegstreamer/wg_parser.c | 2 ++ - 1 file changed, 2 insertions(+) + dlls/winegstreamer/wg_parser.c | 1 + + 1 file changed, 1 insertion(+) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 6a7fd6d1c71..48a1d658232 100644 +index 7a6e0de7ca2..166c47720fb 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c -@@ -2085,9 +2085,11 @@ static BOOL uridecodebin_parser_init_gst(struct wg_parser *parser) - g_object_set(parser->decodebin, "uri", parser->uri, NULL); - g_signal_connect(element, "pad-added", G_CALLBACK(pad_added_cb), parser); - g_signal_connect(element, "pad-removed", G_CALLBACK(pad_removed_cb), parser); -+ g_signal_connect(element, "autoplug-continue", G_CALLBACK(autoplug_continue_cb), parser); +@@ -2198,6 +2198,7 @@ static BOOL uridecodebin_parser_init_gst(struct wg_parser *parser) g_signal_connect(element, "autoplug-select", G_CALLBACK(autoplug_select_cb), parser); g_signal_connect(element, "autoplug-sort", G_CALLBACK(autoplug_sort_cb), parser); g_signal_connect(element, "no-more-pads", G_CALLBACK(no_more_pads_cb), parser); diff --git a/patches/wine-gst/0012-winegstreamer-Do-not-create-a-read-thread-for-uridec.patch b/patches/wine-gst/0011-winegstreamer-Do-not-create-a-read-thread-for-uridec.patch similarity index 81% rename from patches/wine-gst/0012-winegstreamer-Do-not-create-a-read-thread-for-uridec.patch rename to patches/wine-gst/0011-winegstreamer-Do-not-create-a-read-thread-for-uridec.patch index 041549223..f13cf0df3 100644 --- a/patches/wine-gst/0012-winegstreamer-Do-not-create-a-read-thread-for-uridec.patch +++ b/patches/wine-gst/0011-winegstreamer-Do-not-create-a-read-thread-for-uridec.patch @@ -1,7 +1,7 @@ -From dbab61189aced7b41c3e348d70a3712c5e88841f Mon Sep 17 00:00:00 2001 +From ff6e615f58cb792b871b77f1d2ceb0806382a0c3 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Mon, 25 Mar 2024 09:19:18 +0100 -Subject: [PATCH 12/43] winegstreamer: Do not create a read thread for +Subject: [PATCH 11/42] winegstreamer: Do not create a read thread for uridecodebin-based media sources. --- @@ -9,10 +9,10 @@ Subject: [PATCH 12/43] winegstreamer: Do not create a read thread for 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index 93a4425dd06..6709af89444 100644 +index 119fde3e04f..93ddf6c6051 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c -@@ -1625,9 +1625,12 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface) +@@ -1501,9 +1501,12 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface) wg_parser_disconnect(source->wg_parser); @@ -28,7 +28,7 @@ index 93a4425dd06..6709af89444 100644 IMFMediaEventQueue_Shutdown(source->event_queue); IMFByteStream_Close(source->byte_stream); -@@ -1722,7 +1725,8 @@ static HRESULT media_source_create(struct object_context *context, IMFMediaSourc +@@ -1598,7 +1601,8 @@ static HRESULT media_source_create(struct object_context *context, IMFMediaSourc } object->wg_parser = parser; diff --git a/patches/wine-gst/0013-winegstreamer-Ignore-an-assert-in-wg_parser.patch b/patches/wine-gst/0012-winegstreamer-Ignore-an-assert-in-wg_parser.patch similarity index 83% rename from patches/wine-gst/0013-winegstreamer-Ignore-an-assert-in-wg_parser.patch rename to patches/wine-gst/0012-winegstreamer-Ignore-an-assert-in-wg_parser.patch index 5f54c3d48..1f6d21a12 100644 --- a/patches/wine-gst/0013-winegstreamer-Ignore-an-assert-in-wg_parser.patch +++ b/patches/wine-gst/0012-winegstreamer-Ignore-an-assert-in-wg_parser.patch @@ -1,7 +1,7 @@ -From 37b969e05df0e637af3656c272cefc969593c24f Mon Sep 17 00:00:00 2001 +From 292c1944002bef1426a8089e6b7cac78d34f35cc Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Tue, 19 Mar 2024 04:06:37 +0100 -Subject: [PATCH 13/43] winegstreamer: Ignore an assert in wg_parser. +Subject: [PATCH 12/42] 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 @@ -11,10 +11,10 @@ is no memory leak from this. 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 48a1d658232..60d6d2a669e 100644 +index 166c47720fb..c0eabd5024f 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c -@@ -409,11 +409,12 @@ static NTSTATUS wg_parser_stream_release_buffer(void *args) +@@ -481,11 +481,12 @@ static NTSTATUS wg_parser_stream_release_buffer(void *args) pthread_mutex_lock(&parser->mutex); diff --git a/patches/wine-gst/0015-winegstreamer-Make-wg_parser-report-the-exact-suppor.patch b/patches/wine-gst/0013-winegstreamer-Make-wg_parser-report-the-exact-suppor.patch similarity index 65% rename from patches/wine-gst/0015-winegstreamer-Make-wg_parser-report-the-exact-suppor.patch rename to patches/wine-gst/0013-winegstreamer-Make-wg_parser-report-the-exact-suppor.patch index 8b8ee58d5..f9f6f9910 100644 --- a/patches/wine-gst/0015-winegstreamer-Make-wg_parser-report-the-exact-suppor.patch +++ b/patches/wine-gst/0013-winegstreamer-Make-wg_parser-report-the-exact-suppor.patch @@ -1,18 +1,18 @@ -From 56ca2f6922227bb0378b748925eefd3533278215 Mon Sep 17 00:00:00 2001 +From 7696a4041c007e7a978535b4bfe5c9cb4f349ed9 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Tue, 20 Feb 2024 23:17:28 +0100 -Subject: [PATCH 15/43] winegstreamer: Make wg_parser report the exact +Subject: [PATCH 13/42] winegstreamer: Make wg_parser report the exact supported formats to gstreamer instead of just ANY. --- - dlls/winegstreamer/wg_parser.c | 42 +++++++++++++++++++++++++++++++++- - 1 file changed, 41 insertions(+), 1 deletion(-) + dlls/winegstreamer/wg_parser.c | 59 +++++++++++++++++++++++++++++++--- + 1 file changed, 54 insertions(+), 5 deletions(-) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 1ff4da1971c..089d659e50d 100644 +index c0eabd5024f..d28cd189b6b 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c -@@ -835,6 +835,43 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu +@@ -944,6 +944,54 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu return GST_FLOW_OK; } @@ -23,9 +23,16 @@ index 1ff4da1971c..089d659e50d 100644 + GstVideoInfo vinfo; + gsize i; + ++ if (!caps) ++ return NULL; ++ + /* video/x-raw */ + gst_video_info_set_format(&vinfo, GST_VIDEO_FORMAT_BGRA, 1, 1); -+ temp = gst_video_info_to_caps(&vinfo); ++ if (!(temp = gst_video_info_to_caps(&vinfo))) ++ { ++ gst_caps_unref(caps); ++ return NULL; ++ } + for (i = 0; i < gst_caps_get_size(temp); ++i) + gst_structure_remove_fields(gst_caps_get_structure(temp, i), + "format", "width", "height", "framerate", "colorimetry", NULL); @@ -39,7 +46,11 @@ index 1ff4da1971c..089d659e50d 100644 + + /* audio/x-raw */ + gst_audio_info_set_format(&ainfo, GST_AUDIO_FORMAT_S16LE, 1, 1, NULL); -+ temp = gst_audio_info_to_caps(&ainfo); ++ if (!(temp = gst_audio_info_to_caps(&ainfo))) ++ { ++ gst_caps_unref(caps); ++ return NULL; ++ } + for (i = 0; i < gst_caps_get_size(temp); ++i) + gst_structure_remove_fields(gst_caps_get_structure(temp, i), + "format", "channels", "rate", "channel-mask", NULL); @@ -56,18 +67,25 @@ index 1ff4da1971c..089d659e50d 100644 static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) { struct wg_parser_stream *stream = gst_pad_get_element_private(pad); -@@ -852,7 +889,10 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) +@@ -961,12 +1009,13 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) gst_query_parse_caps(query, &filter); pthread_mutex_lock(&parser->mutex); -- caps = wg_format_to_caps(&stream->current_format); -+ if (stream->current_format.major_type != WG_MAJOR_TYPE_UNKNOWN) -+ caps = wg_format_to_caps(&stream->current_format); +- if (!stream->desired_caps || !(caps = gst_caps_copy(stream->desired_caps))) +- { +- pthread_mutex_unlock(&parser->mutex); +- return FALSE; +- } ++ if (stream->desired_caps) ++ caps = gst_caps_copy(stream->desired_caps); + else + caps = get_supported_formats(); pthread_mutex_unlock(&parser->mutex); ++ if (!caps) ++ return FALSE; - if (!caps) + /* Clear some fields that shouldn't prevent us from connecting. */ + for (i = 0; i < gst_caps_get_size(caps); ++i) -- 2.45.2 diff --git a/patches/wine-gst/0016-winegstreamer-Add-more-RTSP-based-URI-schemes-to-GSt.patch b/patches/wine-gst/0014-winegstreamer-Add-more-RTSP-based-URI-schemes-to-GSt.patch similarity index 94% rename from patches/wine-gst/0016-winegstreamer-Add-more-RTSP-based-URI-schemes-to-GSt.patch rename to patches/wine-gst/0014-winegstreamer-Add-more-RTSP-based-URI-schemes-to-GSt.patch index 1cff6f99f..7480694e8 100644 --- a/patches/wine-gst/0016-winegstreamer-Add-more-RTSP-based-URI-schemes-to-GSt.patch +++ b/patches/wine-gst/0014-winegstreamer-Add-more-RTSP-based-URI-schemes-to-GSt.patch @@ -1,7 +1,7 @@ -From 9e7ea98869537829196b7da0b6e701f474c57039 Mon Sep 17 00:00:00 2001 +From 7bac2ac4dcaeb00b594d80ef263e8c5259eefb4e Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Wed, 31 Jan 2024 17:42:54 +0100 -Subject: [PATCH 16/43] winegstreamer: Add more RTSP-based URI schemes to +Subject: [PATCH 14/42] winegstreamer: Add more RTSP-based URI schemes to GStreamer scheme handler. --- diff --git a/patches/wine-gst/0014-winegstreamer-Fixate-caps-in-autoplug_continue_cb.patch b/patches/wine-gst/0014-winegstreamer-Fixate-caps-in-autoplug_continue_cb.patch deleted file mode 100644 index f9ab05128..000000000 --- a/patches/wine-gst/0014-winegstreamer-Fixate-caps-in-autoplug_continue_cb.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 8b59d7c91a2f9d03296aaf00295af2ea803d337c Mon Sep 17 00:00:00 2001 -From: Torge Matthies -Date: Tue, 19 Mar 2024 10:19:09 +0100 -Subject: [PATCH 14/43] winegstreamer: Fixate caps in autoplug_continue_cb. - -Not strictly necessary but avoids an assert in gstreamer code. ---- - dlls/winegstreamer/wg_parser.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 60d6d2a669e..1ff4da1971c 100644 ---- a/dlls/winegstreamer/wg_parser.c -+++ b/dlls/winegstreamer/wg_parser.c -@@ -527,7 +527,9 @@ static gboolean autoplug_continue_cb(GstElement * decodebin, GstPad *pad, GstCap - { - struct wg_format format; - -+ caps = gst_caps_fixate(gst_caps_copy_nth(caps, 0)); - wg_format_from_caps(&format, caps); -+ gst_caps_unref(caps); - - return !format_is_compressed(&format); - } --- -2.45.2 - diff --git a/patches/wine-gst/0018-winegstreamer-Mark-wg_parser-container-bin-as-stream.patch b/patches/wine-gst/0015-winegstreamer-Mark-wg_parser-container-bin-as-stream.patch similarity index 74% rename from patches/wine-gst/0018-winegstreamer-Mark-wg_parser-container-bin-as-stream.patch rename to patches/wine-gst/0015-winegstreamer-Mark-wg_parser-container-bin-as-stream.patch index a73031ea0..6fe1ffafa 100644 --- a/patches/wine-gst/0018-winegstreamer-Mark-wg_parser-container-bin-as-stream.patch +++ b/patches/wine-gst/0015-winegstreamer-Mark-wg_parser-container-bin-as-stream.patch @@ -1,7 +1,7 @@ -From e4bf2619eda4d8612be1d87faf7247c926f651ee Mon Sep 17 00:00:00 2001 +From 23003a1845e60b6ff8626b4e0c616c9a7b906567 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Mon, 22 Apr 2024 11:43:45 +0200 -Subject: [PATCH 18/43] winegstreamer: Mark wg_parser container bin as +Subject: [PATCH 15/42] winegstreamer: Mark wg_parser container bin as streams-aware. Mirroring wg_source. @@ -10,10 +10,10 @@ Mirroring wg_source. 1 file changed, 1 insertion(+) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 3a39a754b81..b89a25fd9ef 100644 +index d28cd189b6b..88b4e34ed87 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c -@@ -1873,6 +1873,7 @@ static NTSTATUS wg_parser_connect(void *args) +@@ -1985,6 +1985,7 @@ static NTSTATUS wg_parser_connect(void *args) } parser->container = gst_bin_new(NULL); diff --git a/patches/wine-gst/0019-winegstreamer-Set-a-clock-for-the-wg_parser-pipeline.patch b/patches/wine-gst/0016-winegstreamer-Set-a-clock-for-the-wg_parser-pipeline.patch similarity index 78% rename from patches/wine-gst/0019-winegstreamer-Set-a-clock-for-the-wg_parser-pipeline.patch rename to patches/wine-gst/0016-winegstreamer-Set-a-clock-for-the-wg_parser-pipeline.patch index b0463b146..046735a9f 100644 --- a/patches/wine-gst/0019-winegstreamer-Set-a-clock-for-the-wg_parser-pipeline.patch +++ b/patches/wine-gst/0016-winegstreamer-Set-a-clock-for-the-wg_parser-pipeline.patch @@ -1,7 +1,7 @@ -From ee8ab4183cffaa51ea9b4940f6c4e9643dc29721 Mon Sep 17 00:00:00 2001 +From 4a2af2d7746bcb40c4e537a37fc791d0a09012bb Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Wed, 31 Jan 2024 17:42:55 +0100 -Subject: [PATCH 19/43] winegstreamer: Set a clock for the wg_parser pipeline. +Subject: [PATCH 16/42] 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. @@ -10,10 +10,10 @@ GstPipeline does this so let's do this too. 1 file changed, 2 insertions(+) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index b89a25fd9ef..cd193b8f2af 100644 +index 88b4e34ed87..c9ec8bfcec4 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c -@@ -1885,6 +1885,8 @@ static NTSTATUS wg_parser_connect(void *args) +@@ -1997,6 +1997,8 @@ static NTSTATUS wg_parser_connect(void *args) gst_pad_set_event_function(parser->my_src, src_event_cb); gst_pad_set_element_private(parser->my_src, parser); diff --git a/patches/wine-gst/0017-winegstreamer-Fixate-caps-in-the-pad-added-callback.patch b/patches/wine-gst/0017-winegstreamer-Fixate-caps-in-the-pad-added-callback.patch deleted file mode 100644 index 3122e1449..000000000 --- a/patches/wine-gst/0017-winegstreamer-Fixate-caps-in-the-pad-added-callback.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 8f8a63ac48264dac08febf3374f0a37a5df01318 Mon Sep 17 00:00:00 2001 -From: Torge Matthies -Date: Mon, 22 Apr 2024 11:44:37 +0200 -Subject: [PATCH 17/43] winegstreamer: Fixate caps in the pad-added callback. - -Pad caps might not be fixed caps, and non-fixed caps can't be transformed to a wg_format. ---- - dlls/winegstreamer/wg_parser.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 089d659e50d..3a39a754b81 100644 ---- a/dlls/winegstreamer/wg_parser.c -+++ b/dlls/winegstreamer/wg_parser.c -@@ -1209,7 +1209,7 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user) - { - struct wg_parser_stream *stream; - struct wg_parser *parser = user; -- GstCaps *caps; -+ GstCaps *caps, *caps2; - - GST_LOG("parser %p, element %p, pad %p.", parser, element, pad); - -@@ -1220,7 +1220,10 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user) - return; - - caps = gst_pad_query_caps(pad, NULL); -- wg_format_from_caps(&stream->codec_format, caps); -+ /* uridecodebin can provide non-fixed pad caps, fixate them here */ -+ caps2 = gst_caps_fixate(gst_caps_copy_nth(caps, 0)); -+ wg_format_from_caps(&stream->codec_format, caps2); -+ gst_caps_unref(caps2); - gst_caps_unref(caps); - - /* For compressed stream, create an extra decodebin to decode it. */ --- -2.45.2 - diff --git a/patches/wine-gst/0020-winegstreamer-Set-base-time-on-wg_parser-bin-while-c.patch b/patches/wine-gst/0017-winegstreamer-Set-base-time-on-wg_parser-bin-while-c.patch similarity index 78% rename from patches/wine-gst/0020-winegstreamer-Set-base-time-on-wg_parser-bin-while-c.patch rename to patches/wine-gst/0017-winegstreamer-Set-base-time-on-wg_parser-bin-while-c.patch index b9757d51e..6775a950a 100644 --- a/patches/wine-gst/0020-winegstreamer-Set-base-time-on-wg_parser-bin-while-c.patch +++ b/patches/wine-gst/0017-winegstreamer-Set-base-time-on-wg_parser-bin-while-c.patch @@ -1,7 +1,7 @@ -From 5351fa9f5ebf8941563398e4dfb2368be7980459 Mon Sep 17 00:00:00 2001 +From 0c477ecbd185dde1916a67b24fad61a1dadc68a4 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Wed, 31 Jan 2024 17:42:55 +0100 -Subject: [PATCH 20/43] winegstreamer: Set base time on wg_parser bin while +Subject: [PATCH 17/42] winegstreamer: Set base time on wg_parser bin while connecting. --- @@ -9,10 +9,10 @@ Subject: [PATCH 20/43] winegstreamer: Set base time on wg_parser bin while 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index cd193b8f2af..fdbce6b5f25 100644 +index c9ec8bfcec4..74a93960633 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c -@@ -1849,6 +1849,7 @@ static NTSTATUS wg_parser_connect(void *args) +@@ -1961,6 +1961,7 @@ static NTSTATUS wg_parser_connect(void *args) const struct wg_parser_connect_params *params = args; struct wg_parser *parser = get_parser(params->parser); const WCHAR *uri = params->uri; @@ -20,7 +20,7 @@ index cd193b8f2af..fdbce6b5f25 100644 unsigned int i; int ret; -@@ -1885,7 +1886,8 @@ static NTSTATUS wg_parser_connect(void *args) +@@ -1997,7 +1998,8 @@ static NTSTATUS wg_parser_connect(void *args) gst_pad_set_event_function(parser->my_src, src_event_cb); gst_pad_set_element_private(parser->my_src, parser); @@ -30,7 +30,7 @@ index cd193b8f2af..fdbce6b5f25 100644 parser->start_offset = parser->next_offset = parser->stop_offset = 0; parser->next_pull_offset = 0; -@@ -1894,6 +1896,7 @@ static NTSTATUS wg_parser_connect(void *args) +@@ -2006,6 +2008,7 @@ static NTSTATUS wg_parser_connect(void *args) if (!parser->init_gst(parser)) goto out; diff --git a/patches/wine-gst/0021-winegstreamer-Put-pipeline-into-PLAYING-state-before.patch b/patches/wine-gst/0018-winegstreamer-Put-pipeline-into-PLAYING-state-before.patch similarity index 80% rename from patches/wine-gst/0021-winegstreamer-Put-pipeline-into-PLAYING-state-before.patch rename to patches/wine-gst/0018-winegstreamer-Put-pipeline-into-PLAYING-state-before.patch index b89115d82..1a6c911b6 100644 --- a/patches/wine-gst/0021-winegstreamer-Put-pipeline-into-PLAYING-state-before.patch +++ b/patches/wine-gst/0018-winegstreamer-Put-pipeline-into-PLAYING-state-before.patch @@ -1,7 +1,7 @@ -From 87cbcd34173216b7363db897b1cb6b6a668a1a8e Mon Sep 17 00:00:00 2001 +From 94c5c5295ee1e9b07a9b8f6e03d969d9a59a78ab Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Wed, 31 Jan 2024 17:42:55 +0100 -Subject: [PATCH 21/43] winegstreamer: Put pipeline into PLAYING state before +Subject: [PATCH 18/42] 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. @@ -10,10 +10,10 @@ Some elements (e.g. uridecodebin with an RTSP URI) won't send no-more-pads in RE 1 file changed, 7 insertions(+) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index fdbce6b5f25..83786a4aa4c 100644 +index 74a93960633..9f6c5afa9e1 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c -@@ -1914,6 +1914,13 @@ static NTSTATUS wg_parser_connect(void *args) +@@ -2026,6 +2026,13 @@ static NTSTATUS wg_parser_connect(void *args) pthread_mutex_lock(&parser->mutex); diff --git a/patches/wine-gst/0022-winegstreamer-Don-t-only-accept-segment-events-when-.patch b/patches/wine-gst/0019-winegstreamer-Don-t-only-accept-segment-events-when-.patch similarity index 88% rename from patches/wine-gst/0022-winegstreamer-Don-t-only-accept-segment-events-when-.patch rename to patches/wine-gst/0019-winegstreamer-Don-t-only-accept-segment-events-when-.patch index 11c1f9aa6..a74345839 100644 --- a/patches/wine-gst/0022-winegstreamer-Don-t-only-accept-segment-events-when-.patch +++ b/patches/wine-gst/0019-winegstreamer-Don-t-only-accept-segment-events-when-.patch @@ -1,7 +1,7 @@ -From fa40f81575e94d0ae3bc18fddb79d21dc540f20e Mon Sep 17 00:00:00 2001 +From bd8e19cee12ac63c010fddab30c2bde88472f682 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Tue, 23 Apr 2024 19:30:17 +0200 -Subject: [PATCH 22/43] winegstreamer: Don't only accept segment events when +Subject: [PATCH 19/42] 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. @@ -10,10 +10,10 @@ I don't know why this was done previously but this just creates a race condition 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 83786a4aa4c..3eb4134b931 100644 +index 9f6c5afa9e1..45b1f48cfe9 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c -@@ -683,24 +683,20 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) +@@ -793,24 +793,20 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) switch (event->type) { case GST_EVENT_SEGMENT: diff --git a/patches/wine-gst/0023-winegstreamer-Convert-buffer-presentation-timestamps.patch b/patches/wine-gst/0020-winegstreamer-Convert-buffer-presentation-timestamps.patch similarity index 52% rename from patches/wine-gst/0023-winegstreamer-Convert-buffer-presentation-timestamps.patch rename to patches/wine-gst/0020-winegstreamer-Convert-buffer-presentation-timestamps.patch index 3ea5d85f9..5449f798c 100644 --- a/patches/wine-gst/0023-winegstreamer-Convert-buffer-presentation-timestamps.patch +++ b/patches/wine-gst/0020-winegstreamer-Convert-buffer-presentation-timestamps.patch @@ -1,18 +1,27 @@ -From 6d0bfd1a5883ccc81ceea1bd467ea5c9e10cb112 Mon Sep 17 00:00:00 2001 +From bc58aec4522d7dcbfab9e23074f4135b5845af4c Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Wed, 31 Jan 2024 17:42:55 +0100 -Subject: [PATCH 23/43] winegstreamer: Convert buffer presentation timestamps - into running time. +Subject: [PATCH 20/42] winegstreamer: Convert buffer presentation timestamps + into stream time. --- - dlls/winegstreamer/wg_parser.c | 46 +++++++++++++++++++++++----------- - 1 file changed, 31 insertions(+), 15 deletions(-) + dlls/winegstreamer/wg_parser.c | 56 ++++++++++++++++++++++++---------- + 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 3eb4134b931..e6170b96cb9 100644 +index 45b1f48cfe9..91d78dc24d6 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c -@@ -306,6 +306,18 @@ static GstBuffer *wait_parser_stream_buffer(struct wg_parser *parser, struct wg_ +@@ -86,7 +86,7 @@ struct wg_parser + + pthread_cond_t init_cond; + bool output_compressed; +- bool no_more_pads, has_duration, error; ++ bool no_more_pads, has_duration, has_seeked, error; + bool err_on, warn_on; + + pthread_cond_t read_cond, read_done_cond; +@@ -378,6 +378,18 @@ static GstBuffer *wait_parser_stream_buffer(struct wg_parser *parser, struct wg_ return buffer; } @@ -31,7 +40,7 @@ index 3eb4134b931..e6170b96cb9 100644 static NTSTATUS wg_parser_stream_get_buffer(void *args) { const struct wg_parser_stream_get_buffer_params *params = args; -@@ -317,6 +329,7 @@ static NTSTATUS wg_parser_stream_get_buffer(void *args) +@@ -389,6 +401,7 @@ static NTSTATUS wg_parser_stream_get_buffer(void *args) pthread_mutex_lock(&parser->mutex); @@ -39,7 +48,7 @@ index 3eb4134b931..e6170b96cb9 100644 if (stream) buffer = wait_parser_stream_buffer(parser, stream); else -@@ -359,13 +372,24 @@ static NTSTATUS wg_parser_stream_get_buffer(void *args) +@@ -431,13 +444,24 @@ static NTSTATUS wg_parser_stream_get_buffer(void *args) return S_FALSE; } @@ -58,7 +67,7 @@ index 3eb4134b931..e6170b96cb9 100644 + } + else + { -+ guint64 stream_time = gst_segment_to_running_time(&stream->segment, GST_FORMAT_TIME, GST_BUFFER_PTS(buffer)); ++ guint64 stream_time = gst_segment_to_stream_time(&stream->segment, GST_FORMAT_TIME, GST_BUFFER_PTS(buffer)); + if (stream_time == -1) + { + release_buffer(parser, stream); @@ -70,7 +79,7 @@ index 3eb4134b931..e6170b96cb9 100644 if ((wg_buffer->has_duration = GST_BUFFER_DURATION_IS_VALID(buffer))) wg_buffer->duration = GST_BUFFER_DURATION(buffer) / 100; wg_buffer->discontinuity = GST_BUFFER_FLAG_IS_SET(buffer, GST_BUFFER_FLAG_DISCONT); -@@ -408,16 +432,8 @@ static NTSTATUS wg_parser_stream_release_buffer(void *args) +@@ -480,16 +504,8 @@ static NTSTATUS wg_parser_stream_release_buffer(void *args) struct wg_parser *parser = stream->parser; pthread_mutex_lock(&parser->mutex); @@ -88,6 +97,36 @@ index 3eb4134b931..e6170b96cb9 100644 return S_OK; } +@@ -548,6 +564,8 @@ static NTSTATUS wg_parser_stream_seek(void *args) + flags, start_type, params->start_pos * 100, stop_type, + params->stop_pos == stream->duration ? -1 : params->stop_pos * 100))) + GST_ERROR("Failed to seek."); ++ else ++ stream->parser->has_seeked = TRUE; + + return S_OK; + } +@@ -795,6 +813,7 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) + case GST_EVENT_SEGMENT: + { + const GstSegment *segment; ++ GstFormat old_format; + + gst_event_parse_segment(event, &segment); + if (segment->format != GST_FORMAT_TIME) +@@ -803,7 +822,12 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) + break; + } + pthread_mutex_lock(&parser->mutex); ++ old_format = stream->segment.format; + gst_segment_copy_into(segment, &stream->segment); ++ /* HLS starts playing at the last possible stream segment, which may be far into the stream. ++ Zero out the segment's starting stream time if there hasn't been a seek yet. */ ++ if (old_format == GST_FORMAT_UNDEFINED && !parser->has_seeked) ++ stream->segment.time = 0; + pthread_mutex_unlock(&parser->mutex); + break; + } -- 2.45.2 diff --git a/patches/wine-gst/0025-winegstreamer-Reorder-parser-initialization-code-a-b.patch b/patches/wine-gst/0021-winegstreamer-Reorder-parser-initialization-code-a-b.patch similarity index 87% rename from patches/wine-gst/0025-winegstreamer-Reorder-parser-initialization-code-a-b.patch rename to patches/wine-gst/0021-winegstreamer-Reorder-parser-initialization-code-a-b.patch index 2ef18465d..848148868 100644 --- a/patches/wine-gst/0025-winegstreamer-Reorder-parser-initialization-code-a-b.patch +++ b/patches/wine-gst/0021-winegstreamer-Reorder-parser-initialization-code-a-b.patch @@ -1,7 +1,7 @@ -From 1cce3c0a5d870b3e6b27ffaaa5d45daa89116ad5 Mon Sep 17 00:00:00 2001 +From 412ed5328d8f21dcf30a76280c708c51fa3cff53 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Wed, 31 Jan 2024 17:42:55 +0100 -Subject: [PATCH 25/43] winegstreamer: Reorder parser initialization code a bit +Subject: [PATCH 21/42] winegstreamer: Reorder parser initialization code a bit to prevent race conditions. --- @@ -9,10 +9,10 @@ Subject: [PATCH 25/43] winegstreamer: Reorder parser initialization code a bit 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 6da8dd3067c..6d2044d692c 100644 +index 91d78dc24d6..e1448533c8d 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c -@@ -2129,7 +2129,10 @@ static BOOL decodebin_parser_init_gst(struct wg_parser *parser) +@@ -2244,7 +2244,10 @@ static BOOL decodebin_parser_init_gst(struct wg_parser *parser) gst_bin_add(GST_BIN(parser->container), element); parser->decodebin = element; @@ -24,7 +24,7 @@ index 6da8dd3067c..6d2044d692c 100644 g_signal_connect(element, "pad-added", G_CALLBACK(pad_added_cb), parser); g_signal_connect(element, "pad-removed", G_CALLBACK(pad_removed_cb), parser); g_signal_connect(element, "autoplug-continue", G_CALLBACK(autoplug_continue_cb), parser); -@@ -2137,10 +2140,7 @@ static BOOL decodebin_parser_init_gst(struct wg_parser *parser) +@@ -2252,10 +2255,7 @@ static BOOL decodebin_parser_init_gst(struct wg_parser *parser) g_signal_connect(element, "autoplug-sort", G_CALLBACK(autoplug_sort_cb), parser); g_signal_connect(element, "no-more-pads", G_CALLBACK(no_more_pads_cb), parser); g_signal_connect(element, "deep-element-added", G_CALLBACK(deep_element_added_cb), parser); @@ -36,7 +36,7 @@ index 6da8dd3067c..6d2044d692c 100644 if (!link_src_to_element(parser->my_src, element)) return FALSE; -@@ -2158,7 +2158,10 @@ static BOOL uridecodebin_parser_init_gst(struct wg_parser *parser) +@@ -2274,7 +2274,10 @@ static BOOL uridecodebin_parser_init_gst(struct wg_parser *parser) gst_bin_add(GST_BIN(parser->container), element); parser->decodebin = element; @@ -48,7 +48,7 @@ index 6da8dd3067c..6d2044d692c 100644 g_signal_connect(element, "pad-added", G_CALLBACK(pad_added_cb), parser); g_signal_connect(element, "pad-removed", G_CALLBACK(pad_removed_cb), parser); g_signal_connect(element, "autoplug-continue", G_CALLBACK(autoplug_continue_cb), parser); -@@ -2166,10 +2169,7 @@ static BOOL uridecodebin_parser_init_gst(struct wg_parser *parser) +@@ -2282,10 +2285,7 @@ static BOOL uridecodebin_parser_init_gst(struct wg_parser *parser) g_signal_connect(element, "autoplug-sort", G_CALLBACK(autoplug_sort_cb), parser); g_signal_connect(element, "no-more-pads", G_CALLBACK(no_more_pads_cb), parser); g_signal_connect(element, "deep-element-added", G_CALLBACK(deep_element_added_cb), parser); @@ -60,7 +60,7 @@ index 6da8dd3067c..6d2044d692c 100644 return TRUE; } -@@ -2183,14 +2183,14 @@ static BOOL avi_parser_init_gst(struct wg_parser *parser) +@@ -2299,14 +2299,14 @@ static BOOL avi_parser_init_gst(struct wg_parser *parser) gst_bin_add(GST_BIN(parser->container), element); diff --git a/patches/wine-gst/0026-winegstreamer-Do-away-with-the-per-stream-condvars-a.patch b/patches/wine-gst/0022-winegstreamer-Do-away-with-the-per-stream-condvars-a.patch similarity index 75% rename from patches/wine-gst/0026-winegstreamer-Do-away-with-the-per-stream-condvars-a.patch rename to patches/wine-gst/0022-winegstreamer-Do-away-with-the-per-stream-condvars-a.patch index 8e5c80cf3..b592f9075 100644 --- a/patches/wine-gst/0026-winegstreamer-Do-away-with-the-per-stream-condvars-a.patch +++ b/patches/wine-gst/0022-winegstreamer-Do-away-with-the-per-stream-condvars-a.patch @@ -1,15 +1,15 @@ -From f329cd493e7579347b7da8f3aa6d9f29132c72f4 Mon Sep 17 00:00:00 2001 +From 3a3c7d17c4961282b72d521354c2fe0c34dd288d Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Wed, 31 Jan 2024 17:42:54 +0100 -Subject: [PATCH 26/43] winegstreamer: Do away with the per-stream condvars and +Subject: [PATCH 22/42] winegstreamer: Do away with the per-stream condvars and use one parser-wide condvar instead. --- - dlls/winegstreamer/wg_parser.c | 28 +++++++++++----------------- - 1 file changed, 11 insertions(+), 17 deletions(-) + dlls/winegstreamer/wg_parser.c | 27 ++++++++++----------------- + 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 6d2044d692c..c8409616aad 100644 +index e1448533c8d..3bb5da545c6 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -90,6 +90,7 @@ struct wg_parser @@ -21,16 +21,16 @@ index 6d2044d692c..c8409616aad 100644 { GstBuffer *buffer; @@ -124,7 +125,6 @@ struct wg_parser_stream - GstSegment segment; - struct wg_format preferred_format, current_format, codec_format; + GstCaps *current_caps; + GstCaps *desired_caps; - pthread_cond_t event_cond, event_empty_cond; GstBuffer *buffer; GstMapInfo map_info; -@@ -290,8 +290,7 @@ static NTSTATUS wg_parser_stream_disable(void *args) - stream->enabled = false; - stream->current_format.major_type = WG_MAJOR_TYPE_UNKNOWN; +@@ -360,8 +360,7 @@ static NTSTATUS wg_parser_stream_disable(void *args) + stream->desired_caps = NULL; + } pthread_mutex_unlock(&parser->mutex); - pthread_cond_signal(&stream->event_cond); - pthread_cond_signal(&stream->event_empty_cond); @@ -38,7 +38,7 @@ index 6d2044d692c..c8409616aad 100644 return S_OK; } -@@ -303,7 +302,7 @@ static GstBuffer *wait_parser_stream_buffer(struct wg_parser *parser, struct wg_ +@@ -373,7 +372,7 @@ static GstBuffer *wait_parser_stream_buffer(struct wg_parser *parser, struct wg_ * must return the buffer. */ while (stream->enabled && !(buffer = stream->buffer) && !stream->eos) @@ -47,7 +47,7 @@ index 6d2044d692c..c8409616aad 100644 return buffer; } -@@ -317,7 +316,7 @@ static void release_buffer(struct wg_parser *parser, struct wg_parser_stream *st +@@ -387,7 +386,7 @@ static void release_buffer(struct wg_parser *parser, struct wg_parser_stream *st stream->buffer = NULL; } @@ -56,7 +56,7 @@ index 6d2044d692c..c8409616aad 100644 } static NTSTATUS wg_parser_stream_get_buffer(void *args) -@@ -723,7 +722,7 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) +@@ -836,7 +835,7 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) pthread_mutex_lock(&parser->mutex); stream->eos = true; if (stream->enabled) @@ -65,7 +65,7 @@ index 6d2044d692c..c8409616aad 100644 else pthread_cond_signal(&parser->init_cond); pthread_mutex_unlock(&parser->mutex); -@@ -735,7 +734,7 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) +@@ -848,7 +847,7 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) if (stream->enabled) { stream->flushing = true; @@ -74,7 +74,7 @@ index 6d2044d692c..c8409616aad 100644 if (stream->buffer) { -@@ -813,7 +812,7 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu +@@ -925,7 +924,7 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu * implementing a queue object here. */ while (stream->enabled && !stream->flushing && stream->buffer) @@ -83,7 +83,7 @@ index 6d2044d692c..c8409616aad 100644 if (!stream->enabled) { -@@ -842,7 +841,7 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu +@@ -954,7 +953,7 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu stream->buffer = buffer; pthread_mutex_unlock(&parser->mutex); @@ -92,17 +92,16 @@ index 6d2044d692c..c8409616aad 100644 /* The chain callback is given a reference to the buffer. Transfer that * reference to the stream object, which will release it in -@@ -986,8 +985,7 @@ static struct wg_parser_stream *create_stream(struct wg_parser *parser, char *id +@@ -1108,8 +1107,6 @@ static struct wg_parser_stream *create_stream(struct wg_parser *parser, char *id + stream->parser = parser; stream->number = parser->stream_count; stream->no_more_pads = true; - stream->current_format.major_type = WG_MAJOR_TYPE_UNKNOWN; - pthread_cond_init(&stream->event_cond, NULL); - pthread_cond_init(&stream->event_empty_cond, NULL); -+ stream->next_format.major_type = WG_MAJOR_TYPE_UNKNOWN; sprintf(pad_name, "qz_sink_%u", parser->stream_count); stream->my_sink = gst_pad_new(pad_name, GST_PAD_SINK); -@@ -1019,9 +1017,6 @@ static void free_stream(struct wg_parser_stream *stream) +@@ -1141,9 +1138,6 @@ static void free_stream(struct wg_parser_stream *stream) stream->buffer = NULL; } @@ -112,7 +111,7 @@ index 6d2044d692c..c8409616aad 100644 for (i = 0; i < ARRAY_SIZE(stream->tags); ++i) { if (stream->tags[i]) -@@ -2080,10 +2075,8 @@ static NTSTATUS wg_parser_disconnect(void *args) +@@ -2195,10 +2189,8 @@ static NTSTATUS wg_parser_disconnect(void *args) /* Unblock all of our streams. */ pthread_mutex_lock(&parser->mutex); for (i = 0; i < parser->stream_count; ++i) @@ -124,7 +123,7 @@ index 6d2044d692c..c8409616aad 100644 pthread_mutex_unlock(&parser->mutex); gst_element_set_state(parser->container, GST_STATE_NULL); -@@ -2259,6 +2252,7 @@ static NTSTATUS wg_parser_create(void *args) +@@ -2375,6 +2367,7 @@ static NTSTATUS wg_parser_create(void *args) pthread_cond_init(&parser->init_cond, NULL); pthread_cond_init(&parser->read_cond, NULL); pthread_cond_init(&parser->read_done_cond, NULL); diff --git a/patches/wine-gst/0027-winegstreamer-Use-pthread_cond_broadcast-instead-of-.patch b/patches/wine-gst/0023-winegstreamer-Use-pthread_cond_broadcast-instead-of-.patch similarity index 78% rename from patches/wine-gst/0027-winegstreamer-Use-pthread_cond_broadcast-instead-of-.patch rename to patches/wine-gst/0023-winegstreamer-Use-pthread_cond_broadcast-instead-of-.patch index c8df8c2cf..61b293bd8 100644 --- a/patches/wine-gst/0027-winegstreamer-Use-pthread_cond_broadcast-instead-of-.patch +++ b/patches/wine-gst/0023-winegstreamer-Use-pthread_cond_broadcast-instead-of-.patch @@ -1,7 +1,7 @@ -From 01e1e742376e04a8b0436c6543725c4d8f1b0974 Mon Sep 17 00:00:00 2001 +From 23d10aa44bd2230077a8fe9b11d9733803510600 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Mon, 18 Mar 2024 10:18:07 +0100 -Subject: [PATCH 27/43] winegstreamer: Use pthread_cond_broadcast instead of +Subject: [PATCH 23/42] winegstreamer: Use pthread_cond_broadcast instead of pthread_cond_signal for stream_event_cond. --- @@ -9,19 +9,19 @@ Subject: [PATCH 27/43] winegstreamer: Use pthread_cond_broadcast instead of 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index c8409616aad..3e047e02de5 100644 +index 3bb5da545c6..25ce5a47530 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c -@@ -290,7 +290,7 @@ static NTSTATUS wg_parser_stream_disable(void *args) - stream->enabled = false; - stream->current_format.major_type = WG_MAJOR_TYPE_UNKNOWN; +@@ -360,7 +360,7 @@ static NTSTATUS wg_parser_stream_disable(void *args) + stream->desired_caps = NULL; + } pthread_mutex_unlock(&parser->mutex); - pthread_cond_signal(&parser->stream_event_cond); + pthread_cond_broadcast(&parser->stream_event_cond); return S_OK; } -@@ -316,7 +316,7 @@ static void release_buffer(struct wg_parser *parser, struct wg_parser_stream *st +@@ -386,7 +386,7 @@ static void release_buffer(struct wg_parser *parser, struct wg_parser_stream *st stream->buffer = NULL; } @@ -30,7 +30,7 @@ index c8409616aad..3e047e02de5 100644 } static NTSTATUS wg_parser_stream_get_buffer(void *args) -@@ -722,7 +722,7 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) +@@ -835,7 +835,7 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) pthread_mutex_lock(&parser->mutex); stream->eos = true; if (stream->enabled) @@ -39,7 +39,7 @@ index c8409616aad..3e047e02de5 100644 else pthread_cond_signal(&parser->init_cond); pthread_mutex_unlock(&parser->mutex); -@@ -734,7 +734,7 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) +@@ -847,7 +847,7 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) if (stream->enabled) { stream->flushing = true; @@ -48,7 +48,7 @@ index c8409616aad..3e047e02de5 100644 if (stream->buffer) { -@@ -841,7 +841,7 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu +@@ -953,7 +953,7 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu stream->buffer = buffer; pthread_mutex_unlock(&parser->mutex); @@ -57,7 +57,7 @@ index c8409616aad..3e047e02de5 100644 /* The chain callback is given a reference to the buffer. Transfer that * reference to the stream object, which will release it in -@@ -2076,7 +2076,7 @@ static NTSTATUS wg_parser_disconnect(void *args) +@@ -2190,7 +2190,7 @@ static NTSTATUS wg_parser_disconnect(void *args) pthread_mutex_lock(&parser->mutex); for (i = 0; i < parser->stream_count; ++i) parser->streams[i]->flushing = true; diff --git a/patches/wine-gst/0024-winegstreamer-Adjust-buffer-timestamps-after-seek.patch b/patches/wine-gst/0024-winegstreamer-Adjust-buffer-timestamps-after-seek.patch deleted file mode 100644 index fb6af30c8..000000000 --- a/patches/wine-gst/0024-winegstreamer-Adjust-buffer-timestamps-after-seek.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 4af6bcfd88a8531d958175246a612285f819f88e Mon Sep 17 00:00:00 2001 -From: Torge Matthies -Date: Tue, 19 Mar 2024 05:11:11 +0100 -Subject: [PATCH 24/43] winegstreamer: Adjust buffer timestamps after seek. - ---- - dlls/winegstreamer/wg_parser.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index e6170b96cb9..6da8dd3067c 100644 ---- a/dlls/winegstreamer/wg_parser.c -+++ b/dlls/winegstreamer/wg_parser.c -@@ -109,6 +109,8 @@ struct wg_parser - bool use_mediaconv; - bool use_opengl; - GstContext *context; -+ -+ guint64 seek_pos; - }; - static const unsigned int input_cache_chunk_size = 512 << 10; - -@@ -377,7 +379,7 @@ retry: - if (stream->segment.format != GST_FORMAT_TIME) - { - /* Some types of streams (e.g. HLS) don't provide a segment. Assume that these start their PTS at zero. */ -- wg_buffer->pts = GST_BUFFER_PTS(buffer) / 100; -+ wg_buffer->pts = (GST_BUFFER_PTS(buffer) + parser->seek_pos) / 100; - } - else - { -@@ -387,7 +389,7 @@ retry: - release_buffer(parser, stream); - goto retry; - } -- wg_buffer->pts = stream_time / 100; -+ wg_buffer->pts = (stream_time + parser->seek_pos) / 100; - } - } - if ((wg_buffer->has_duration = GST_BUFFER_DURATION_IS_VALID(buffer))) -@@ -492,6 +494,9 @@ static NTSTATUS wg_parser_stream_seek(void *args) - flags, start_type, params->start_pos * 100, stop_type, - params->stop_pos == stream->duration ? -1 : params->stop_pos * 100))) - GST_ERROR("Failed to seek."); -+ else -+ /* Pushing a seek event on one stream changes the decoding position of all streams */ -+ stream->parser->seek_pos = params->start_pos * 100; - - return S_OK; - } --- -2.45.2 - diff --git a/patches/wine-gst/0024-winegstreamer-Do-not-fail-caps-negotiation-when-ther.patch b/patches/wine-gst/0024-winegstreamer-Do-not-fail-caps-negotiation-when-ther.patch new file mode 100644 index 000000000..8e8676f12 --- /dev/null +++ b/patches/wine-gst/0024-winegstreamer-Do-not-fail-caps-negotiation-when-ther.patch @@ -0,0 +1,240 @@ +From 92f1b0e6ccf780224021b266b9db8738604c0675 Mon Sep 17 00:00:00 2001 +From: Torge Matthies +Date: Tue, 19 Mar 2024 10:09:59 +0100 +Subject: [PATCH 24/42] winegstreamer: Do not fail caps negotiation when + there's a concurrent reconfigure. + +If wg_parser_stream_enable is called between the time our sink's GST_QUERY_CAPS returns and the time our sink gets the +GST_QUERY_ACCEPT_CAPS query to finalize caps negotiation, GST_QUERY_ACCEPT_CAPS would likely return FALSE because the +caps that are being negotiated would not meet the requirements of the new stream->current_format set by +wg_parser_stream_enable. + +Instead, accept both the old and the new format as valid caps in GST_QUERY_ACCEPT_CAPS, but discard buffers until the +correct caps have been negotiated (signalled by a GST_EVENT_CAPS). + +Also try to omit the reconfigure event in some cases. +--- + dlls/winegstreamer/wg_parser.c | 105 ++++++++++++++++++++++++++++++--- + 1 file changed, 97 insertions(+), 8 deletions(-) + +diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c +index 25ce5a47530..225e66db202 100644 +--- a/dlls/winegstreamer/wg_parser.c ++++ b/dlls/winegstreamer/wg_parser.c +@@ -124,6 +124,7 @@ struct wg_parser_stream + GstCaps *codec_caps; + GstCaps *current_caps; + GstCaps *desired_caps; ++ GstCaps *next_desired_caps; + + GstBuffer *buffer; + GstMapInfo map_info; +@@ -298,16 +299,53 @@ static NTSTATUS wg_parser_stream_get_codec_format(void *args) + return S_OK; + } + ++static BOOL stream_set_next_caps(struct wg_parser_stream *stream, GstCaps *caps) ++{ ++ struct wg_parser *parser = stream->parser; ++ ++ while (stream->next_desired_caps && !parser->error) ++ pthread_cond_wait(&parser->stream_event_cond, &parser->mutex); ++ ++ if (parser->error) ++ { ++ pthread_mutex_unlock(&parser->mutex); ++ return E_FAIL; ++ } ++ ++ if (!(stream->current_caps && gst_caps_is_equal(stream->current_caps, caps))) ++ { ++ if (stream->desired_caps) ++ { ++ if (!gst_caps_is_equal(stream->desired_caps, caps)) ++ { ++ stream->next_desired_caps = caps; ++ return !!stream->current_caps; ++ } ++ } ++ else ++ stream->desired_caps = caps; ++ return TRUE; ++ } ++ else if (!(stream->desired_caps && gst_caps_is_equal(stream->desired_caps, caps))) ++ { ++ stream->desired_caps = caps; ++ return FALSE; ++ } ++ gst_caps_unref(caps); ++ return FALSE; ++} ++ + static NTSTATUS wg_parser_stream_enable(void *args) + { + const struct wg_parser_stream_enable_params *params = args; + struct wg_parser_stream *stream = get_stream(params->stream); + const struct wg_format *format = params->format; + struct wg_parser *parser = stream->parser; ++ BOOL need_reconf; + + pthread_mutex_lock(&parser->mutex); + +- stream->desired_caps = wg_format_to_caps(format); ++ need_reconf = stream_set_next_caps(stream, wg_format_to_caps(format)); + stream->enabled = true; + + pthread_mutex_unlock(&parser->mutex); +@@ -315,11 +353,18 @@ static NTSTATUS wg_parser_stream_enable(void *args) + if (format->major_type == WG_MAJOR_TYPE_VIDEO) + { + bool flip = (format->u.video.height < 0); ++ GstVideoOrientationMethod old_method = -1, new_method = flip ? GST_VIDEO_ORIENTATION_VERT : GST_VIDEO_ORIENTATION_IDENTITY; + +- gst_util_set_object_arg(G_OBJECT(stream->flip), "method", flip ? "vertical-flip" : "none"); ++ g_object_get(G_OBJECT(stream->flip), "method", &old_method, NULL); ++ if (new_method != old_method) ++ { ++ g_object_set(G_OBJECT(stream->flip), "method", new_method, NULL); ++ need_reconf = TRUE; ++ } + } + +- push_event(stream->my_sink, gst_event_new_reconfigure()); ++ if (need_reconf) ++ push_event(stream->my_sink, gst_event_new_reconfigure()); + return S_OK; + } + +@@ -328,10 +373,11 @@ static NTSTATUS wg_parser_stream_enable_type(void *args) + const struct wg_parser_stream_enable_type_params *params = args; + struct wg_parser_stream *stream = get_stream(params->stream); + struct wg_parser *parser = stream->parser; ++ BOOL need_reconf; + + pthread_mutex_lock(&parser->mutex); + +- stream->desired_caps = caps_from_media_type(¶ms->media_type); ++ need_reconf = stream_set_next_caps(stream, caps_from_media_type(¶ms->media_type)); + stream->enabled = true; + + pthread_mutex_unlock(&parser->mutex); +@@ -339,11 +385,18 @@ static NTSTATUS wg_parser_stream_enable_type(void *args) + if (IsEqualGUID(¶ms->media_type.major, &MEDIATYPE_Video) && stream->flip) + { + bool flip = !!(params->media_type.u.video->videoInfo.VideoFlags & MFVideoFlag_BottomUpLinearRep); ++ GstVideoOrientationMethod old_method = -1, new_method = flip ? GST_VIDEO_ORIENTATION_VERT : GST_VIDEO_ORIENTATION_IDENTITY; + +- gst_util_set_object_arg(G_OBJECT(stream->flip), "method", flip ? "vertical-flip" : "none"); ++ g_object_get(G_OBJECT(stream->flip), "method", &old_method, NULL); ++ if (new_method != old_method) ++ { ++ g_object_set(G_OBJECT(stream->flip), "method", new_method, NULL); ++ need_reconf = TRUE; ++ } + } + +- push_event(stream->my_sink, gst_event_new_reconfigure()); ++ if (need_reconf) ++ push_event(stream->my_sink, gst_event_new_reconfigure()); + return S_OK; + } + +@@ -359,6 +412,11 @@ static NTSTATUS wg_parser_stream_disable(void *args) + gst_caps_unref(stream->desired_caps); + stream->desired_caps = NULL; + } ++ if (stream->next_desired_caps) ++ { ++ gst_caps_unref(stream->next_desired_caps); ++ stream->next_desired_caps = NULL; ++ } + pthread_mutex_unlock(&parser->mutex); + pthread_cond_broadcast(&parser->stream_event_cond); + return S_OK; +@@ -886,6 +944,16 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) + gst_event_parse_caps(event, &caps); + pthread_mutex_lock(&parser->mutex); + stream->current_caps = gst_caps_ref(caps); ++ if (stream->next_desired_caps) ++ { ++ if (!gst_caps_can_intersect(stream->current_caps, stream->next_desired_caps)) ++ push_event(stream->my_sink, gst_event_new_reconfigure()); ++ else ++ { ++ stream->next_desired_caps = NULL; ++ pthread_cond_broadcast(&parser->stream_event_cond); ++ } ++ } + pthread_mutex_unlock(&parser->mutex); + pthread_cond_signal(&parser->init_cond); + break; +@@ -914,6 +982,14 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu + + pthread_mutex_lock(&parser->mutex); + ++ if (stream->next_desired_caps) ++ { ++ GST_DEBUG("Stream is changing format; discarding buffer."); ++ pthread_mutex_unlock(&parser->mutex); ++ gst_buffer_unref(buffer); ++ return GST_FLOW_OK; ++ } ++ + if (!stream->has_buffer) + { + stream->has_buffer = true; +@@ -1028,7 +1104,13 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) + gst_query_parse_caps(query, &filter); + + pthread_mutex_lock(&parser->mutex); +- if (stream->desired_caps) ++ if (stream->next_desired_caps) ++ { ++ caps = gst_caps_copy(stream->next_desired_caps); ++ if (stream->desired_caps) ++ gst_caps_append(caps, gst_caps_copy(stream->desired_caps)); ++ } ++ else if (stream->desired_caps) + caps = gst_caps_copy(stream->desired_caps); + else + caps = get_supported_formats(); +@@ -1063,7 +1145,7 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) + + pthread_mutex_lock(&parser->mutex); + +- if (!stream->desired_caps) ++ if (!stream->desired_caps || !stream->next_desired_caps) + { + pthread_mutex_unlock(&parser->mutex); + gst_query_set_accept_caps_result(query, TRUE); +@@ -1074,6 +1156,11 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) + wg_format_from_caps(&format, caps); + wg_format_from_caps(¤t_format, stream->desired_caps); + ret = wg_format_compare(&format, ¤t_format); ++ if (!ret) ++ { ++ wg_format_from_caps(¤t_format, stream->next_desired_caps); ++ ret = wg_format_compare(&format, ¤t_format); ++ } + + pthread_mutex_unlock(&parser->mutex); + +@@ -1760,6 +1847,7 @@ static GstBusSyncReply bus_handler_cb(GstBus *bus, GstMessage *msg, gpointer use + parser->error = true; + pthread_mutex_unlock(&parser->mutex); + pthread_cond_signal(&parser->init_cond); ++ pthread_cond_broadcast(&parser->stream_event_cond); + break; + + case GST_MESSAGE_WARNING: +@@ -1790,6 +1878,7 @@ static GstBusSyncReply bus_handler_cb(GstBus *bus, GstMessage *msg, gpointer use + GST_WARNING("Autoplugged element failed to initialise, trying again with protonvideoconvert."); + parser->error = true; + pthread_cond_signal(&parser->init_cond); ++ pthread_cond_broadcast(&parser->stream_event_cond); + } + pthread_mutex_unlock(&parser->mutex); + } +-- +2.45.2 + diff --git a/patches/wine-gst/0029-winegstreamer-Do-not-seek-live-sources.patch b/patches/wine-gst/0025-winegstreamer-Do-not-seek-live-sources.patch similarity index 82% rename from patches/wine-gst/0029-winegstreamer-Do-not-seek-live-sources.patch rename to patches/wine-gst/0025-winegstreamer-Do-not-seek-live-sources.patch index 76f56f751..5114cddbc 100644 --- a/patches/wine-gst/0029-winegstreamer-Do-not-seek-live-sources.patch +++ b/patches/wine-gst/0025-winegstreamer-Do-not-seek-live-sources.patch @@ -1,7 +1,7 @@ -From e34d7e2409002e9643d669786fb09b1cec36fec8 Mon Sep 17 00:00:00 2001 +From 770cb2d26ef8b749dd093028b5167628df8f25ab Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Sun, 14 Apr 2024 06:12:55 +0200 -Subject: [PATCH 29/43] winegstreamer: Do not seek live sources. +Subject: [PATCH 25/42] winegstreamer: Do not seek live sources. souphttpsrc seems to break from seeking sometimes: @@ -15,19 +15,19 @@ Seeking a live source doesn't make sense anyway. 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 78a5314b508..204d7fa5672 100644 +index 225e66db202..912ecd4acfc 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c -@@ -112,6 +112,8 @@ struct wg_parser +@@ -110,6 +110,8 @@ struct wg_parser + bool use_mediaconv; + bool use_opengl; GstContext *context; - - guint64 seek_pos; + + bool is_live; }; static const unsigned int input_cache_chunk_size = 512 << 10; -@@ -502,6 +504,9 @@ static NTSTATUS wg_parser_stream_seek(void *args) +@@ -605,6 +607,9 @@ static NTSTATUS wg_parser_stream_seek(void *args) stream = get_stream(params->stream); @@ -37,7 +37,7 @@ index 78a5314b508..204d7fa5672 100644 if (start_flags & AM_SEEKING_SeekToKeyFrame) flags |= GST_SEEK_FLAG_KEY_UNIT; if (start_flags & AM_SEEKING_Segment) -@@ -697,6 +702,7 @@ static void no_more_pads_cb(GstElement *element, gpointer user) +@@ -834,6 +839,7 @@ static void no_more_pads_cb(GstElement *element, gpointer user) static void deep_element_added_cb(GstBin *self, GstBin *sub_bin, GstElement *element, gpointer user) { @@ -45,7 +45,7 @@ index 78a5314b508..204d7fa5672 100644 GstElementFactory *factory = NULL; const char *name = NULL; -@@ -716,6 +722,9 @@ static void deep_element_added_cb(GstBin *self, GstBin *sub_bin, GstElement *ele +@@ -856,6 +862,9 @@ static void deep_element_added_cb(GstBin *self, GstBin *sub_bin, GstElement *ele g_object_set(element, "n-threads", G_GINT64_CONSTANT(1), NULL); #endif } @@ -55,7 +55,7 @@ index 78a5314b508..204d7fa5672 100644 } static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) -@@ -1966,7 +1975,11 @@ static NTSTATUS wg_parser_connect(void *args) +@@ -2112,7 +2121,11 @@ static NTSTATUS wg_parser_connect(void *args) goto out; gst_element_set_base_time(parser->container, gst_clock_get_time(clock)); @@ -68,7 +68,7 @@ index 78a5314b508..204d7fa5672 100644 ret = gst_element_get_state(parser->container, NULL, NULL, -1); if (ret == GST_STATE_CHANGE_FAILURE) -@@ -1985,7 +1998,11 @@ static NTSTATUS wg_parser_connect(void *args) +@@ -2131,7 +2144,11 @@ static NTSTATUS wg_parser_connect(void *args) if (parser->uri) { diff --git a/patches/wine-gst/0030-winegstreamer-Implement-buffering-events.patch b/patches/wine-gst/0026-winegstreamer-Implement-buffering-events.patch similarity index 87% rename from patches/wine-gst/0030-winegstreamer-Implement-buffering-events.patch rename to patches/wine-gst/0026-winegstreamer-Implement-buffering-events.patch index 1dfa2d423..274a47b77 100644 --- a/patches/wine-gst/0030-winegstreamer-Implement-buffering-events.patch +++ b/patches/wine-gst/0026-winegstreamer-Implement-buffering-events.patch @@ -1,7 +1,7 @@ -From 6caf81d40fa889abb34c059203e1de45c87547f9 Mon Sep 17 00:00:00 2001 +From f375665f64fd9d2903ddd5c2b7e9f9543bf43c6f Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Wed, 10 Apr 2024 15:11:02 +0200 -Subject: [PATCH 30/43] winegstreamer: Implement buffering events. +Subject: [PATCH 26/42] winegstreamer: Implement buffering events. --- dlls/winegstreamer/gst_private.h | 3 ++ @@ -12,7 +12,7 @@ Subject: [PATCH 30/43] winegstreamer: Implement buffering events. 5 files changed, 158 insertions(+) diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index bce9b5d2fe4..3bdd53dd36c 100644 +index adefeaba15c..bdc59e1e347 100644 --- a/dlls/winegstreamer/gst_private.h +++ b/dlls/winegstreamer/gst_private.h @@ -79,6 +79,9 @@ void wg_parser_disconnect(wg_parser_t parser); @@ -26,10 +26,10 @@ index bce9b5d2fe4..3bdd53dd36c 100644 wg_parser_stream_t wg_parser_get_stream(wg_parser_t parser, uint32_t index); diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c -index 992f6b3ae98..2d04b83ae9d 100644 +index 374924a3e6a..fd1bf034a69 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c -@@ -133,6 +133,27 @@ bool wg_parser_get_next_read_offset(wg_parser_t parser, uint64_t *offset, uint32 +@@ -230,6 +230,27 @@ bool wg_parser_get_next_read_offset(wg_parser_t parser, uint64_t *offset, uint32 return true; } @@ -58,7 +58,7 @@ index 992f6b3ae98..2d04b83ae9d 100644 { struct wg_parser_push_data_params params = diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index 6709af89444..8aea5d77172 100644 +index 93ddf6c6051..58b82a444b4 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c @@ -207,6 +207,9 @@ struct media_source @@ -71,7 +71,7 @@ index 6709af89444..8aea5d77172 100644 }; static inline struct media_stream *impl_from_IMFMediaStream(IMFMediaStream *iface) -@@ -825,6 +828,7 @@ static HRESULT wait_on_sample(struct media_stream *stream, IUnknown *token) +@@ -696,6 +699,7 @@ static HRESULT wait_on_sample(struct media_stream *stream, IUnknown *token) stream->busy = TRUE; LeaveCriticalSection(&source->cs); @@ -79,7 +79,7 @@ index 6709af89444..8aea5d77172 100644 ret = wg_parser_stream_get_buffer(source->wg_parser, stream->wg_stream, &buffer); EnterCriticalSection(&source->cs); stream->busy = FALSE; -@@ -961,6 +965,41 @@ static DWORD CALLBACK read_thread(void *arg) +@@ -832,6 +836,41 @@ static DWORD CALLBACK read_thread(void *arg) return 0; } @@ -121,7 +121,7 @@ index 6709af89444..8aea5d77172 100644 static HRESULT WINAPI media_stream_QueryInterface(IMFMediaStream *iface, REFIID riid, void **out) { struct media_stream *stream = impl_from_IMFMediaStream(iface); -@@ -1625,6 +1664,13 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface) +@@ -1501,6 +1540,13 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface) wg_parser_disconnect(source->wg_parser); @@ -135,7 +135,7 @@ index 6709af89444..8aea5d77172 100644 if (source->read_thread) { source->read_thread_shutdown = true; -@@ -1728,6 +1774,8 @@ static HRESULT media_source_create(struct object_context *context, IMFMediaSourc +@@ -1604,6 +1650,8 @@ static HRESULT media_source_create(struct object_context *context, IMFMediaSourc if (context->type != WG_PARSER_URIDECODEBIN) object->read_thread = CreateThread(NULL, 0, read_thread, object, 0, NULL); @@ -144,7 +144,7 @@ index 6709af89444..8aea5d77172 100644 object->state = SOURCE_OPENING; if (FAILED(hr = wg_parser_connect(parser, object->file_size, context->url))) -@@ -1812,6 +1860,12 @@ fail: +@@ -1686,6 +1734,12 @@ fail: if (stream_count != UINT_MAX) wg_parser_disconnect(object->wg_parser); @@ -158,10 +158,10 @@ index 6709af89444..8aea5d77172 100644 { object->read_thread_shutdown = true; diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h -index fe21a24f6f5..154469a096a 100644 +index f9b87e51b93..f4b33557d1a 100644 --- a/dlls/winegstreamer/unixlib.h +++ b/dlls/winegstreamer/unixlib.h -@@ -274,6 +274,16 @@ struct wg_parser_push_data_params +@@ -257,6 +257,16 @@ struct wg_parser_push_data_params UINT32 size; }; @@ -178,7 +178,7 @@ index fe21a24f6f5..154469a096a 100644 struct wg_parser_get_stream_count_params { wg_parser_t parser; -@@ -526,6 +536,8 @@ enum unix_funcs +@@ -524,6 +534,8 @@ enum unix_funcs unix_wg_parser_get_next_read_offset, unix_wg_parser_push_data, @@ -188,7 +188,7 @@ index fe21a24f6f5..154469a096a 100644 unix_wg_parser_get_stream, diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 204d7fa5672..ceaf66c92da 100644 +index 912ecd4acfc..3218259b4ac 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -43,6 +43,12 @@ @@ -204,8 +204,8 @@ index 204d7fa5672..ceaf66c92da 100644 #include "unix_private.h" extern GstGLDisplay *gl_display; -@@ -114,6 +120,9 @@ struct wg_parser - guint64 seek_pos; +@@ -112,6 +118,9 @@ struct wg_parser + GstContext *context; bool is_live; + @@ -214,7 +214,7 @@ index 204d7fa5672..ceaf66c92da 100644 }; static const unsigned int input_cache_chunk_size = 512 << 10; -@@ -239,6 +248,47 @@ static NTSTATUS wg_parser_push_data(void *args) +@@ -244,6 +253,47 @@ static NTSTATUS wg_parser_push_data(void *args) return S_OK; } @@ -259,10 +259,10 @@ index 204d7fa5672..ceaf66c92da 100644 + return hr; +} + - static NTSTATUS wg_parser_stream_get_preferred_format(void *args) + static NTSTATUS wg_parser_stream_get_current_format(void *args) { - const struct wg_parser_stream_get_preferred_format_params *params = args; -@@ -1765,6 +1815,19 @@ static GstBusSyncReply bus_handler_cb(GstBus *bus, GstMessage *msg, gpointer use + const struct wg_parser_stream_get_current_format_params *params = args; +@@ -1911,6 +1961,19 @@ static GstBusSyncReply bus_handler_cb(GstBus *bus, GstMessage *msg, gpointer use break; } @@ -282,7 +282,7 @@ index 204d7fa5672..ceaf66c92da 100644 default: break; } -@@ -2161,6 +2224,7 @@ static NTSTATUS wg_parser_disconnect(void *args) +@@ -2307,6 +2370,7 @@ static NTSTATUS wg_parser_disconnect(void *args) parser->sink_connected = false; pthread_mutex_unlock(&parser->mutex); pthread_cond_signal(&parser->read_cond); @@ -290,7 +290,7 @@ index 204d7fa5672..ceaf66c92da 100644 for (i = 0; i < parser->stream_count; ++i) free_stream(parser->streams[i]); -@@ -2374,6 +2438,8 @@ const unixlib_entry_t __wine_unix_call_funcs[] = +@@ -2521,6 +2585,8 @@ const unixlib_entry_t __wine_unix_call_funcs[] = X(wg_parser_get_next_read_offset), X(wg_parser_push_data), @@ -299,7 +299,7 @@ index 204d7fa5672..ceaf66c92da 100644 X(wg_parser_get_stream_count), X(wg_parser_get_stream), -@@ -2819,6 +2885,8 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] = +@@ -3087,6 +3153,8 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] = X(wg_parser_get_next_read_offset), X64(wg_parser_push_data), diff --git a/patches/wine-gst/0031-mf-Send-sample-requests-for-unused-space-of-sample-q.patch b/patches/wine-gst/0027-mf-Send-sample-requests-for-unused-space-of-sample-q.patch similarity index 96% rename from patches/wine-gst/0031-mf-Send-sample-requests-for-unused-space-of-sample-q.patch rename to patches/wine-gst/0027-mf-Send-sample-requests-for-unused-space-of-sample-q.patch index dd3603fe0..4dfd80dbb 100644 --- a/patches/wine-gst/0031-mf-Send-sample-requests-for-unused-space-of-sample-q.patch +++ b/patches/wine-gst/0027-mf-Send-sample-requests-for-unused-space-of-sample-q.patch @@ -1,7 +1,7 @@ -From 3dac384018f5b28f0afa2679fcffc06278c98602 Mon Sep 17 00:00:00 2001 +From 213dd767dc5cf4b2c1fa49c9b566aadaa2a1634d Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Tue, 21 May 2024 08:25:47 +0200 -Subject: [PATCH 31/43] mf: Send sample requests for unused space of sample +Subject: [PATCH 27/42] mf: Send sample requests for unused space of sample queue on pause => restart. --- diff --git a/patches/wine-gst/0028-winegstreamer-Do-not-fail-caps-negotiation-when-ther.patch b/patches/wine-gst/0028-winegstreamer-Do-not-fail-caps-negotiation-when-ther.patch deleted file mode 100644 index efde586c0..000000000 --- a/patches/wine-gst/0028-winegstreamer-Do-not-fail-caps-negotiation-when-ther.patch +++ /dev/null @@ -1,171 +0,0 @@ -From b0d53a974c18d412a1755896410b177b1b47a36a Mon Sep 17 00:00:00 2001 -From: Torge Matthies -Date: Tue, 19 Mar 2024 10:09:59 +0100 -Subject: [PATCH 28/43] winegstreamer: Do not fail caps negotiation when - there's a concurrent reconfigure. - -If wg_parser_stream_enable is called between the time our sink's GST_QUERY_CAPS returns and the time our sink gets the -GST_QUERY_ACCEPT_CAPS query to finalize caps negotiation, GST_QUERY_ACCEPT_CAPS would likely return FALSE because the -caps that are being negotiated would not meet the requirements of the new stream->current_format set by -wg_parser_stream_enable. - -Instead, accept both the old and the new format as valid caps in GST_QUERY_ACCEPT_CAPS, but discard buffers until the -correct caps have been negotiated (signalled by a GST_EVENT_CAPS). - -Also try to omit the reconfigure event in some cases. ---- - dlls/winegstreamer/wg_parser.c | 69 +++++++++++++++++++++++++++++++--- - 1 file changed, 63 insertions(+), 6 deletions(-) - -diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 3e047e02de5..78a5314b508 100644 ---- a/dlls/winegstreamer/wg_parser.c -+++ b/dlls/winegstreamer/wg_parser.c -@@ -123,7 +123,7 @@ struct wg_parser_stream - GstPad *my_sink; - GstElement *flip, *decodebin; - GstSegment segment; -- struct wg_format preferred_format, current_format, codec_format; -+ struct wg_format preferred_format, current_format, next_format, codec_format; - - GstBuffer *buffer; - GstMapInfo map_info; -@@ -262,10 +262,27 @@ static NTSTATUS wg_parser_stream_enable(void *args) - struct wg_parser_stream *stream = get_stream(params->stream); - const struct wg_format *format = params->format; - struct wg_parser *parser = stream->parser; -+ BOOL need_reconf = FALSE; - - pthread_mutex_lock(&parser->mutex); - -- stream->current_format = *format; -+ while (stream->next_format.major_type != WG_MAJOR_TYPE_UNKNOWN && !parser->error) -+ pthread_cond_wait(&parser->stream_event_cond, &parser->mutex); -+ -+ if (parser->error) -+ { -+ pthread_mutex_unlock(&parser->mutex); -+ return E_FAIL; -+ } -+ -+ if (!wg_format_compare(&stream->current_format, format) -+ && !(stream->has_caps && wg_format_compare(&stream->preferred_format, format))) -+ { -+ stream->next_format = *format; -+ need_reconf = stream->has_caps; -+ } -+ else -+ stream->current_format = *format; - stream->enabled = true; - - pthread_mutex_unlock(&parser->mutex); -@@ -273,11 +290,18 @@ static NTSTATUS wg_parser_stream_enable(void *args) - if (format->major_type == WG_MAJOR_TYPE_VIDEO) - { - bool flip = (params->flags & STREAM_ENABLE_FLAG_FLIP_RGB) && (format->u.video.height < 0); -+ GstVideoOrientationMethod old_method = -1, new_method = flip ? GST_VIDEO_ORIENTATION_VERT : GST_VIDEO_ORIENTATION_IDENTITY; - -- gst_util_set_object_arg(G_OBJECT(stream->flip), "method", flip ? "vertical-flip" : "none"); -+ g_object_get(G_OBJECT(stream->flip), "method", &old_method, NULL); -+ if (new_method != old_method) -+ { -+ g_object_set(G_OBJECT(stream->flip), "method", new_method, NULL); -+ need_reconf = TRUE; -+ } - } - -- push_event(stream->my_sink, gst_event_new_reconfigure()); -+ if (need_reconf) -+ push_event(stream->my_sink, gst_event_new_reconfigure()); - return S_OK; - } - -@@ -289,6 +313,7 @@ static NTSTATUS wg_parser_stream_disable(void *args) - pthread_mutex_lock(&parser->mutex); - stream->enabled = false; - stream->current_format.major_type = WG_MAJOR_TYPE_UNKNOWN; -+ stream->next_format.major_type = WG_MAJOR_TYPE_UNKNOWN; - pthread_mutex_unlock(&parser->mutex); - pthread_cond_broadcast(&parser->stream_event_cond); - return S_OK; -@@ -774,6 +799,17 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) - pthread_mutex_lock(&parser->mutex); - wg_format_from_caps(&stream->preferred_format, caps); - stream->has_caps = true; -+ if (stream->next_format.major_type != WG_MAJOR_TYPE_UNKNOWN) -+ { -+ if (!wg_format_compare(&stream->preferred_format, &stream->next_format)) -+ push_event(stream->my_sink, gst_event_new_reconfigure()); -+ else -+ { -+ stream->current_format = stream->next_format; -+ stream->next_format.major_type = WG_MAJOR_TYPE_UNKNOWN; -+ pthread_cond_broadcast(&parser->stream_event_cond); -+ } -+ } - pthread_mutex_unlock(&parser->mutex); - pthread_cond_signal(&parser->init_cond); - break; -@@ -802,6 +838,14 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu - - pthread_mutex_lock(&parser->mutex); - -+ if (stream->next_format.major_type != WG_MAJOR_TYPE_UNKNOWN) -+ { -+ GST_DEBUG("Stream is changing format; discarding buffer."); -+ pthread_mutex_unlock(&parser->mutex); -+ gst_buffer_unref(buffer); -+ return GST_FLOW_OK; -+ } -+ - if (!stream->has_buffer) - { - stream->has_buffer = true; -@@ -905,7 +949,17 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) - gst_query_parse_caps(query, &filter); - - pthread_mutex_lock(&parser->mutex); -- if (stream->current_format.major_type != WG_MAJOR_TYPE_UNKNOWN) -+ if (stream->next_format.major_type != WG_MAJOR_TYPE_UNKNOWN) -+ { -+ caps = wg_format_to_caps(&stream->next_format); -+ if (caps && stream->current_format.major_type != WG_MAJOR_TYPE_UNKNOWN) -+ { -+ temp = wg_format_to_caps(&stream->current_format); -+ if (temp) -+ gst_caps_append(caps, temp); -+ } -+ } -+ else if (stream->current_format.major_type != WG_MAJOR_TYPE_UNKNOWN) - caps = wg_format_to_caps(&stream->current_format); - else - caps = get_supported_formats(); -@@ -941,7 +995,8 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) - - pthread_mutex_lock(&parser->mutex); - -- if (stream->current_format.major_type == WG_MAJOR_TYPE_UNKNOWN) -+ if (stream->current_format.major_type == WG_MAJOR_TYPE_UNKNOWN -+ || stream->next_format.major_type != WG_MAJOR_TYPE_UNKNOWN) - { - pthread_mutex_unlock(&parser->mutex); - gst_query_set_accept_caps_result(query, TRUE); -@@ -1646,6 +1701,7 @@ static GstBusSyncReply bus_handler_cb(GstBus *bus, GstMessage *msg, gpointer use - parser->error = true; - pthread_mutex_unlock(&parser->mutex); - pthread_cond_signal(&parser->init_cond); -+ pthread_cond_broadcast(&parser->stream_event_cond); - break; - - case GST_MESSAGE_WARNING: -@@ -1676,6 +1732,7 @@ static GstBusSyncReply bus_handler_cb(GstBus *bus, GstMessage *msg, gpointer use - GST_WARNING("Autoplugged element failed to initialise, trying again with protonvideoconvert."); - parser->error = true; - pthread_cond_signal(&parser->init_cond); -+ pthread_cond_broadcast(&parser->stream_event_cond); - } - pthread_mutex_unlock(&parser->mutex); - } --- -2.45.2 - diff --git a/patches/wine-gst/0032-winegstreamer-Fix-race-between-wg_parser_stream_disa.patch b/patches/wine-gst/0028-winegstreamer-Fix-race-between-wg_parser_stream_disa.patch similarity index 76% rename from patches/wine-gst/0032-winegstreamer-Fix-race-between-wg_parser_stream_disa.patch rename to patches/wine-gst/0028-winegstreamer-Fix-race-between-wg_parser_stream_disa.patch index c1ac50ff1..f750382b7 100644 --- a/patches/wine-gst/0032-winegstreamer-Fix-race-between-wg_parser_stream_disa.patch +++ b/patches/wine-gst/0028-winegstreamer-Fix-race-between-wg_parser_stream_disa.patch @@ -1,7 +1,7 @@ -From ea06ee8ca40513d2d5194b2396bccc59253e4b98 Mon Sep 17 00:00:00 2001 +From 6a3d0ad6f545fe0e4ea981d2523fd30c254a9957 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Mon, 3 Jun 2024 11:05:38 +0200 -Subject: [PATCH 32/43] winegstreamer: Fix race between +Subject: [PATCH 28/42] winegstreamer: Fix race between wg_parser_stream_disable and GST_EVENT_FLUSH_STOP. --- @@ -9,10 +9,10 @@ Subject: [PATCH 32/43] winegstreamer: Fix race between 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index ceaf66c92da..703346ab887 100644 +index 3218259b4ac..4582eb98c69 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c -@@ -843,8 +843,7 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) +@@ -989,8 +989,7 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) pthread_mutex_lock(&parser->mutex); stream->eos = false; diff --git a/patches/wine-gst/0033-winegstreamer-Handle-Gstreamer-pipeline-flushes-grac.patch b/patches/wine-gst/0029-winegstreamer-Handle-Gstreamer-pipeline-flushes-grac.patch similarity index 83% rename from patches/wine-gst/0033-winegstreamer-Handle-Gstreamer-pipeline-flushes-grac.patch rename to patches/wine-gst/0029-winegstreamer-Handle-Gstreamer-pipeline-flushes-grac.patch index 6688e0c3b..4df8d07ba 100644 --- a/patches/wine-gst/0033-winegstreamer-Handle-Gstreamer-pipeline-flushes-grac.patch +++ b/patches/wine-gst/0029-winegstreamer-Handle-Gstreamer-pipeline-flushes-grac.patch @@ -1,7 +1,7 @@ -From f647e86f21ba2088736bde5b8a75048a17159135 Mon Sep 17 00:00:00 2001 +From a124abd6b9944d24a4327afc78f2b048fae3bd50 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Fri, 14 Jun 2024 03:11:44 +0200 -Subject: [PATCH 33/43] winegstreamer: Handle Gstreamer pipeline flushes +Subject: [PATCH 29/42] winegstreamer: Handle Gstreamer pipeline flushes gracefully. If a GST_EVENT_FLUSH_START event is received between the calls from PE code to wg_parser_stream_get_buffer @@ -14,10 +14,10 @@ If wg_parser_stream_copy_buffer returns an error, retry the whole wait_on_sample 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index 8aea5d77172..7380515a050 100644 +index 58b82a444b4..7808d3966ff 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c -@@ -764,6 +764,7 @@ static HRESULT media_stream_send_sample(struct media_stream *stream, const struc +@@ -635,6 +635,7 @@ static HRESULT media_stream_send_sample(struct media_stream *stream, const struc if (!wg_parser_stream_copy_buffer(stream->wg_stream, data, 0, wg_buffer->size)) { @@ -25,7 +25,7 @@ index 8aea5d77172..7380515a050 100644 wg_parser_stream_release_buffer(stream->wg_stream); IMFMediaBuffer_Unlock(buffer); goto out; -@@ -822,10 +823,10 @@ static HRESULT wait_on_sample(struct media_stream *stream, IUnknown *token) +@@ -693,10 +694,10 @@ static HRESULT wait_on_sample(struct media_stream *stream, IUnknown *token) { struct media_source *source = impl_from_IMFMediaSource(stream->media_source); struct wg_parser_buffer buffer; @@ -38,7 +38,7 @@ index 8aea5d77172..7380515a050 100644 stream->busy = TRUE; LeaveCriticalSection(&source->cs); memset(&buffer, 0, sizeof(buffer)); -@@ -841,7 +842,12 @@ static HRESULT wait_on_sample(struct media_stream *stream, IUnknown *token) +@@ -712,7 +713,12 @@ static HRESULT wait_on_sample(struct media_stream *stream, IUnknown *token) } if (ret) diff --git a/patches/wine-gst/0034-winegstreamer-Do-waits-for-samples-on-stream-specifi.patch b/patches/wine-gst/0030-winegstreamer-Do-waits-for-samples-on-stream-specifi.patch similarity index 92% rename from patches/wine-gst/0034-winegstreamer-Do-waits-for-samples-on-stream-specifi.patch rename to patches/wine-gst/0030-winegstreamer-Do-waits-for-samples-on-stream-specifi.patch index ecf58594d..45a6698eb 100644 --- a/patches/wine-gst/0034-winegstreamer-Do-waits-for-samples-on-stream-specifi.patch +++ b/patches/wine-gst/0030-winegstreamer-Do-waits-for-samples-on-stream-specifi.patch @@ -1,7 +1,7 @@ -From 305f54c3db23d9b15386ad151faa1e6d8426e5ab Mon Sep 17 00:00:00 2001 +From 3c5be2333f0068736fcd506790077ab801de134e Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Fri, 14 Jun 2024 03:08:48 +0200 -Subject: [PATCH 34/43] winegstreamer: Do waits for samples on stream-specific +Subject: [PATCH 30/42] winegstreamer: Do waits for samples on stream-specific work queues. --- @@ -10,7 +10,7 @@ Subject: [PATCH 34/43] winegstreamer: Do waits for samples on stream-specific 2 files changed, 296 insertions(+), 64 deletions(-) diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index 7380515a050..3f84c1a5a5d 100644 +index 7808d3966ff..668273b7945 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c @@ -121,9 +121,29 @@ static HRESULT object_context_create(DWORD flags, IMFByteStream *stream, const W @@ -172,7 +172,7 @@ index 7380515a050..3f84c1a5a5d 100644 source_async_command_AddRef, source_async_command_Release, }; -@@ -568,7 +635,6 @@ static BOOL enqueue_token(struct media_stream *stream, IUnknown *token) +@@ -435,7 +502,6 @@ static BOOL enqueue_token(struct media_stream *stream, IUnknown *token) static void flush_token_queue(struct media_stream *stream, BOOL send) { @@ -180,7 +180,7 @@ index 7380515a050..3f84c1a5a5d 100644 LONG i; for (i = 0; i < stream->token_queue_count; i++) -@@ -578,13 +644,12 @@ static void flush_token_queue(struct media_stream *stream, BOOL send) +@@ -445,13 +511,12 @@ static void flush_token_queue(struct media_stream *stream, BOOL send) IUnknown *op; HRESULT hr; @@ -197,7 +197,7 @@ index 7380515a050..3f84c1a5a5d 100644 IUnknown_Release(op); } if (FAILED(hr)) -@@ -884,15 +949,6 @@ static HRESULT WINAPI source_async_commands_Invoke(IMFAsyncCallback *iface, IMFA +@@ -755,15 +820,6 @@ static HRESULT WINAPI source_async_commands_Invoke(IMFAsyncCallback *iface, IMFA if (FAILED(hr = media_source_stop(source))) WARN("Failed to stop source %p, hr %#lx\n", source, hr); break; @@ -213,7 +213,7 @@ index 7380515a050..3f84c1a5a5d 100644 } LeaveCriticalSection(&source->cs); -@@ -911,6 +967,61 @@ static const IMFAsyncCallbackVtbl source_async_commands_callback_vtbl = +@@ -782,6 +838,61 @@ static const IMFAsyncCallbackVtbl source_async_commands_callback_vtbl = source_async_commands_Invoke, }; @@ -275,7 +275,7 @@ index 7380515a050..3f84c1a5a5d 100644 static DWORD CALLBACK read_thread(void *arg) { struct media_source *source = arg; -@@ -1158,15 +1269,14 @@ static HRESULT WINAPI media_stream_RequestSample(IMFMediaStream *iface, IUnknown +@@ -1029,15 +1140,14 @@ static HRESULT WINAPI media_stream_RequestSample(IMFMediaStream *iface, IUnknown hr = MF_E_MEDIA_SOURCE_WRONGSTATE; else if (stream->eos) hr = MF_E_END_OF_STREAM; @@ -294,7 +294,7 @@ index 7380515a050..3f84c1a5a5d 100644 IUnknown_Release(op); } -@@ -1201,9 +1311,11 @@ static HRESULT media_stream_create(IMFMediaSource *source, IMFStreamDescriptor * +@@ -1072,9 +1182,11 @@ static HRESULT media_stream_create(IMFMediaSource *source, IMFStreamDescriptor * return E_OUTOFMEMORY; object->IMFMediaStream_iface.lpVtbl = &media_stream_vtbl; @@ -307,7 +307,7 @@ index 7380515a050..3f84c1a5a5d 100644 { free(object); return hr; -@@ -1692,6 +1804,7 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface) +@@ -1568,6 +1680,7 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface) struct media_stream *stream = source->streams[source->stream_count]; IMFStreamDescriptor_Release(source->descriptors[source->stream_count]); IMFMediaEventQueue_Shutdown(stream->event_queue); @@ -315,7 +315,7 @@ index 7380515a050..3f84c1a5a5d 100644 IMFMediaStream_Release(&stream->IMFMediaStream_iface); } free(source->descriptors); -@@ -1854,7 +1967,11 @@ fail: +@@ -1728,7 +1841,11 @@ fail: for (i = 0; i < stream_count; i++) { if (object->streams && object->streams[i]) @@ -328,11 +328,11 @@ index 7380515a050..3f84c1a5a5d 100644 for (i = 0; i < stream_count; i++) { diff --git a/dlls/winegstreamer/new_media_source.c b/dlls/winegstreamer/new_media_source.c -index efaf6a3e087..7444fc1c788 100644 +index a97d659e58d..06482fd36dc 100644 --- a/dlls/winegstreamer/new_media_source.c +++ b/dlls/winegstreamer/new_media_source.c -@@ -239,15 +239,37 @@ static HRESULT create_media_source_fallback(struct object_context *context, IUnk - return hr; +@@ -153,15 +153,37 @@ static HRESULT object_context_create(DWORD flags, IMFByteStream *stream, const W + return S_OK; } +enum stream_async_op @@ -369,7 +369,7 @@ index efaf6a3e087..7444fc1c788 100644 IUnknown **token_queue; LONG token_queue_count; LONG token_queue_cap; -@@ -261,7 +283,6 @@ enum source_async_op +@@ -175,7 +197,6 @@ enum source_async_op SOURCE_ASYNC_START, SOURCE_ASYNC_PAUSE, SOURCE_ASYNC_STOP, @@ -377,7 +377,7 @@ index efaf6a3e087..7444fc1c788 100644 }; struct source_async_command -@@ -277,11 +298,6 @@ struct source_async_command +@@ -191,11 +212,6 @@ struct source_async_command GUID format; PROPVARIANT position; } start; @@ -389,7 +389,7 @@ index efaf6a3e087..7444fc1c788 100644 } u; }; -@@ -326,6 +342,16 @@ static inline struct media_stream *impl_from_IMFMediaStream(IMFMediaStream *ifac +@@ -240,6 +256,16 @@ static inline struct media_stream *impl_from_IMFMediaStream(IMFMediaStream *ifac return CONTAINING_RECORD(iface, struct media_stream, IMFMediaStream_iface); } @@ -406,7 +406,7 @@ index efaf6a3e087..7444fc1c788 100644 static inline struct media_source *impl_from_IMFMediaSource(IMFMediaSource *iface) { return CONTAINING_RECORD(iface, struct media_source, IMFMediaSource_iface); -@@ -356,7 +382,7 @@ static inline struct source_async_command *impl_from_async_command_IUnknown(IUnk +@@ -270,7 +296,7 @@ static inline struct source_async_command *impl_from_async_command_IUnknown(IUnk return CONTAINING_RECORD(iface, struct source_async_command, IUnknown_iface); } @@ -415,7 +415,7 @@ index efaf6a3e087..7444fc1c788 100644 { if (IsEqualIID(riid, &IID_IUnknown)) { -@@ -370,6 +396,52 @@ static HRESULT WINAPI source_async_command_QueryInterface(IUnknown *iface, REFII +@@ -284,6 +310,52 @@ static HRESULT WINAPI source_async_command_QueryInterface(IUnknown *iface, REFII return E_NOINTERFACE; } @@ -468,7 +468,7 @@ index efaf6a3e087..7444fc1c788 100644 static ULONG WINAPI source_async_command_AddRef(IUnknown *iface) { struct source_async_command *command = impl_from_async_command_IUnknown(iface); -@@ -388,11 +460,6 @@ static ULONG WINAPI source_async_command_Release(IUnknown *iface) +@@ -302,11 +374,6 @@ static ULONG WINAPI source_async_command_Release(IUnknown *iface) IMFPresentationDescriptor_Release(command->u.start.descriptor); PropVariantClear(&command->u.start.position); } @@ -480,7 +480,7 @@ index efaf6a3e087..7444fc1c788 100644 free(command); } -@@ -401,7 +468,7 @@ static ULONG WINAPI source_async_command_Release(IUnknown *iface) +@@ -315,7 +382,7 @@ static ULONG WINAPI source_async_command_Release(IUnknown *iface) static const IUnknownVtbl source_async_command_vtbl = { @@ -489,7 +489,7 @@ index efaf6a3e087..7444fc1c788 100644 source_async_command_AddRef, source_async_command_Release, }; -@@ -568,7 +635,6 @@ static BOOL enqueue_token(struct media_stream *stream, IUnknown *token) +@@ -452,7 +519,6 @@ static BOOL enqueue_token(struct media_stream *stream, IUnknown *token) static void flush_token_queue(struct media_stream *stream, BOOL send) { @@ -497,7 +497,7 @@ index efaf6a3e087..7444fc1c788 100644 LONG i; for (i = 0; i < stream->token_queue_count; i++) -@@ -578,13 +644,12 @@ static void flush_token_queue(struct media_stream *stream, BOOL send) +@@ -462,13 +528,12 @@ static void flush_token_queue(struct media_stream *stream, BOOL send) IUnknown *op; HRESULT hr; @@ -514,7 +514,7 @@ index efaf6a3e087..7444fc1c788 100644 IUnknown_Release(op); } if (FAILED(hr)) -@@ -844,15 +909,6 @@ static HRESULT WINAPI source_async_commands_Invoke(IMFAsyncCallback *iface, IMFA +@@ -734,15 +799,6 @@ static HRESULT WINAPI source_async_commands_Invoke(IMFAsyncCallback *iface, IMFA if (FAILED(hr = media_source_stop(source))) WARN("Failed to stop source %p, hr %#lx\n", source, hr); break; @@ -530,7 +530,7 @@ index efaf6a3e087..7444fc1c788 100644 } LeaveCriticalSection(&source->cs); -@@ -871,6 +927,61 @@ static const IMFAsyncCallbackVtbl source_async_commands_callback_vtbl = +@@ -761,6 +817,61 @@ static const IMFAsyncCallbackVtbl source_async_commands_callback_vtbl = source_async_commands_Invoke, }; @@ -592,7 +592,7 @@ index efaf6a3e087..7444fc1c788 100644 static HRESULT WINAPI media_stream_QueryInterface(IMFMediaStream *iface, REFIID riid, void **out) { struct media_stream *stream = impl_from_IMFMediaStream(iface); -@@ -1023,15 +1134,14 @@ static HRESULT WINAPI media_stream_RequestSample(IMFMediaStream *iface, IUnknown +@@ -913,15 +1024,14 @@ static HRESULT WINAPI media_stream_RequestSample(IMFMediaStream *iface, IUnknown hr = MF_E_MEDIA_SOURCE_WRONGSTATE; else if (stream->eos) hr = MF_E_END_OF_STREAM; @@ -611,7 +611,7 @@ index efaf6a3e087..7444fc1c788 100644 IUnknown_Release(op); } -@@ -1065,9 +1175,11 @@ static HRESULT media_stream_create(IMFMediaSource *source, IMFStreamDescriptor * +@@ -955,9 +1065,11 @@ static HRESULT media_stream_create(IMFMediaSource *source, IMFStreamDescriptor * return E_OUTOFMEMORY; object->IMFMediaStream_iface.lpVtbl = &media_stream_vtbl; @@ -624,7 +624,7 @@ index efaf6a3e087..7444fc1c788 100644 { free(object); return hr; -@@ -1517,6 +1629,7 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface) +@@ -1407,6 +1519,7 @@ static HRESULT WINAPI media_source_Shutdown(IMFMediaSource *iface) struct media_stream *stream = source->streams[source->stream_count]; IMFStreamDescriptor_Release(source->descriptors[source->stream_count]); IMFMediaEventQueue_Shutdown(stream->event_queue); @@ -632,7 +632,7 @@ index efaf6a3e087..7444fc1c788 100644 IMFMediaStream_Release(&stream->IMFMediaStream_iface); } free(source->stream_map); -@@ -1731,6 +1844,8 @@ fail: +@@ -1640,6 +1753,8 @@ fail: { struct media_stream *stream = object->streams[object->stream_count]; IMFStreamDescriptor_Release(object->descriptors[object->stream_count]); diff --git a/patches/wine-gst/0031-mf-session-Ensure-that-the-command-callback-does-not.patch b/patches/wine-gst/0031-mf-session-Ensure-that-the-command-callback-does-not.patch new file mode 100644 index 000000000..f0849c960 --- /dev/null +++ b/patches/wine-gst/0031-mf-session-Ensure-that-the-command-callback-does-not.patch @@ -0,0 +1,48 @@ +From 7bf3f7999a6399c86ecc2a6c07dad631df6a677d Mon Sep 17 00:00:00 2001 +From: Torge Matthies +Date: Mon, 8 Jul 2024 10:30:50 +0200 +Subject: [PATCH 31/42] mf/session: Ensure that the command callback does not + return without clearing SESSION_FLAG_PENDING_COMMAND. + +Leaving SESSION_FLAG_PENDING_COMMAND set results in no more work items being queued by session_submit_command, and even +if they were, callback would return immediately due to a check at the start of the function. +Thus, it is never valid to leave the function without clearing the SESSION_FLAG_PENDING_COMMAND flag. + +This case can be hit by SESSION_CMD_START, and leaves the session unable to process any commands. + +Fix this by ensuring that SESSION_FLAG_PENDING_COMMAND is always cleared before the command callback returns. +--- + dlls/mf/session.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/dlls/mf/session.c b/dlls/mf/session.c +index a5caad3c97a..752bdcf1c21 100644 +--- a/dlls/mf/session.c ++++ b/dlls/mf/session.c +@@ -2744,7 +2744,6 @@ static HRESULT WINAPI session_commands_callback_Invoke(IMFAsyncCallback *iface, + break; + case SESSION_CMD_SET_TOPOLOGY: + session_set_topology(session, op->set_topology.flags, op->set_topology.topology); +- session_command_complete(session); + break; + case SESSION_CMD_START: + session_start(session, &op->start.time_format, &op->start.start_position); +@@ -2767,12 +2766,14 @@ static HRESULT WINAPI session_commands_callback_Invoke(IMFAsyncCallback *iface, + break; + case SESSION_CMD_SHUTDOWN: + session_clear_command_list(session); +- session_command_complete(session); + break; + default: + ; + } + ++ if (session->presentation.flags & SESSION_FLAG_PENDING_COMMAND) ++ session_command_complete(session); ++ + LeaveCriticalSection(&session->cs); + + IUnknown_Release(&op->IUnknown_iface); +-- +2.45.2 + diff --git a/patches/wine-gst/0032-Revert-winegstreamer-Make-wg_parser-report-the-exact.patch b/patches/wine-gst/0032-Revert-winegstreamer-Make-wg_parser-report-the-exact.patch new file mode 100644 index 000000000..103824ff7 --- /dev/null +++ b/patches/wine-gst/0032-Revert-winegstreamer-Make-wg_parser-report-the-exact.patch @@ -0,0 +1,101 @@ +From 70ecdbf3a1602d8c468855f5d7be4a660d5745cb Mon Sep 17 00:00:00 2001 +From: Torge Matthies +Date: Tue, 9 Jul 2024 07:39:21 +0200 +Subject: [PATCH 32/42] Revert "winegstreamer: Make wg_parser report the exact + supported formats to gstreamer instead of just ANY." + +This reverts commit 7696a4041c007e7a978535b4bfe5c9cb4f349ed9. +--- + dlls/winegstreamer/wg_parser.c | 67 +++++----------------------------- + 1 file changed, 10 insertions(+), 57 deletions(-) + +diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c +index 4582eb98c69..8030b6463e1 100644 +--- a/dlls/winegstreamer/wg_parser.c ++++ b/dlls/winegstreamer/wg_parser.c +@@ -1097,54 +1097,6 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu + return GST_FLOW_OK; + } + +-static GstCaps *get_supported_formats(void) +-{ +- GstCaps *caps = gst_caps_new_empty(), *temp; +- GstAudioInfo ainfo; +- GstVideoInfo vinfo; +- gsize i; +- +- if (!caps) +- return NULL; +- +- /* video/x-raw */ +- gst_video_info_set_format(&vinfo, GST_VIDEO_FORMAT_BGRA, 1, 1); +- if (!(temp = gst_video_info_to_caps(&vinfo))) +- { +- gst_caps_unref(caps); +- return NULL; +- } +- for (i = 0; i < gst_caps_get_size(temp); ++i) +- gst_structure_remove_fields(gst_caps_get_structure(temp, i), +- "format", "width", "height", "framerate", "colorimetry", NULL); +- gst_caps_append(caps, temp); +- /* other formats */ +- gst_caps_append(caps, gst_caps_new_empty_simple("video/x-cinepak")); +- gst_caps_append(caps, gst_caps_new_simple("video/x-h264", "stream-format", G_TYPE_STRING, "byte-stream", +- "alignment", G_TYPE_STRING, "au", NULL)); +- gst_caps_append(caps, gst_caps_new_empty_simple("video/x-wmv")); +- gst_caps_append(caps, gst_caps_new_empty_simple("video/x-indeo")); +- +- /* audio/x-raw */ +- gst_audio_info_set_format(&ainfo, GST_AUDIO_FORMAT_S16LE, 1, 1, NULL); +- if (!(temp = gst_audio_info_to_caps(&ainfo))) +- { +- gst_caps_unref(caps); +- return NULL; +- } +- for (i = 0; i < gst_caps_get_size(temp); ++i) +- gst_structure_remove_fields(gst_caps_get_structure(temp, i), +- "format", "channels", "rate", "channel-mask", NULL); +- gst_caps_append(caps, temp); +- /* other formats */ +- gst_caps_append(caps, gst_caps_new_simple("audio/mpeg", "mpegversion", G_TYPE_INT, 1, +- "parsed", G_TYPE_BOOLEAN, TRUE, NULL)); +- gst_caps_append(caps, gst_caps_new_simple("audio/mpeg", "mpegversion", G_TYPE_INT, 4, NULL)); +- gst_caps_append(caps, gst_caps_new_empty_simple("audio/x-xma")); +- +- return caps; +-} +- + static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) + { + struct wg_parser_stream *stream = gst_pad_get_element_private(pad); +@@ -1164,17 +1116,18 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) + pthread_mutex_lock(&parser->mutex); + if (stream->next_desired_caps) + { +- caps = gst_caps_copy(stream->next_desired_caps); +- if (stream->desired_caps) +- gst_caps_append(caps, gst_caps_copy(stream->desired_caps)); ++ if (!(caps = gst_caps_copy(stream->next_desired_caps))) ++ { ++ pthread_mutex_unlock(&parser->mutex); ++ return FALSE; ++ } + } +- else if (stream->desired_caps) +- caps = gst_caps_copy(stream->desired_caps); +- else +- caps = get_supported_formats(); +- pthread_mutex_unlock(&parser->mutex); +- if (!caps) ++ else if (!stream->desired_caps || !(caps = gst_caps_copy(stream->desired_caps))) ++ { ++ pthread_mutex_unlock(&parser->mutex); + return FALSE; ++ } ++ pthread_mutex_unlock(&parser->mutex); + + /* Clear some fields that shouldn't prevent us from connecting. */ + for (i = 0; i < gst_caps_get_size(caps); ++i) +-- +2.45.2 + diff --git a/patches/wine-gst/0033-winegstreamer-Do-not-force-uridecodebin-to-expose-un.patch b/patches/wine-gst/0033-winegstreamer-Do-not-force-uridecodebin-to-expose-un.patch new file mode 100644 index 000000000..521fe9e5e --- /dev/null +++ b/patches/wine-gst/0033-winegstreamer-Do-not-force-uridecodebin-to-expose-un.patch @@ -0,0 +1,55 @@ +From e9876a0d2951803c827955d74682f2db0bd7fc27 Mon Sep 17 00:00:00 2001 +From: Torge Matthies +Date: Wed, 10 Jul 2024 22:50:17 +0200 +Subject: [PATCH 33/42] winegstreamer: Do not force uridecodebin to expose + uncompressed streams by failing autoplug-continue callbacks. + +Doing so makes uridecodebin expose pads that do not respond to CAPS queries correctly for HLS sources. +--- + dlls/winegstreamer/wg_parser.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c +index 8030b6463e1..f3531753943 100644 +--- a/dlls/winegstreamer/wg_parser.c ++++ b/dlls/winegstreamer/wg_parser.c +@@ -1440,15 +1440,26 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user) + { + struct wg_parser_stream *stream; + struct wg_parser *parser = user; ++ GstCaps *caps; + + GST_LOG("parser %p, element %p, pad %p.", parser, element, pad); + + if (gst_pad_is_linked(pad)) + return; + ++ /* Doesn't seem to work, included for future reference. ++ If uridecodebin exposes a pad with compressed data, enforced by ++ a check for parser->output_compressed in autoplug_continue_cb, ++ that pad seems to not respond correctly to CAPS queries. Specifically, ++ the query seems to be forwarded up to an hlsdemux element, and fail ++ there. There should already be a sticky CAPS event on the pad though, ++ so I do not understand why that happens. */ ++ if (gst_caps_is_any(caps = gst_pad_query_caps(pad, NULL))) ++ caps = gst_pad_get_current_caps(pad); ++ + if (!(stream = create_stream(parser, gst_pad_get_stream_id(pad)))) + return; +- stream->codec_caps = gst_pad_query_caps(pad, NULL); ++ stream->codec_caps = caps; + + /* For compressed stream, create an extra decodebin to decode it. */ + if (!parser->output_compressed && caps_is_compressed(stream->codec_caps)) +@@ -2383,7 +2394,7 @@ static BOOL uridecodebin_parser_init_gst(struct wg_parser *parser) + + if (!(element = create_element("uridecodebin", "base"))) + return FALSE; +- parser->output_compressed = true; ++ parser->output_compressed = false; + + gst_bin_add(GST_BIN(parser->container), element); + parser->decodebin = element; +-- +2.45.2 + diff --git a/patches/wine-gst/0035-HACK-winegstreamer-Add-a-resampler-to-wg_parser-for-.patch b/patches/wine-gst/0034-HACK-winegstreamer-Add-a-resampler-to-wg_parser-for-.patch similarity index 80% rename from patches/wine-gst/0035-HACK-winegstreamer-Add-a-resampler-to-wg_parser-for-.patch rename to patches/wine-gst/0034-HACK-winegstreamer-Add-a-resampler-to-wg_parser-for-.patch index eefb5a900..4091ef310 100644 --- a/patches/wine-gst/0035-HACK-winegstreamer-Add-a-resampler-to-wg_parser-for-.patch +++ b/patches/wine-gst/0034-HACK-winegstreamer-Add-a-resampler-to-wg_parser-for-.patch @@ -1,7 +1,7 @@ -From 0d56779fda98158f125c1adcae8bbd535a97329b Mon Sep 17 00:00:00 2001 +From ab4d635bcf12bf7b155be19ab4746e1a7b0a2a22 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Wed, 31 Jan 2024 17:42:54 +0100 -Subject: [PATCH 35/43] [HACK] winegstreamer: Add a resampler to wg_parser for +Subject: [PATCH 34/42] [HACK] winegstreamer: Add a resampler to wg_parser for raw audio. --- @@ -9,10 +9,10 @@ Subject: [PATCH 35/43] [HACK] winegstreamer: Add a resampler to wg_parser for 1 file changed, 4 insertions(+) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 703346ab887..3d9e3b78a2c 100644 +index f3531753943..20d54f1042c 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c -@@ -1266,6 +1266,10 @@ static bool stream_create_post_processing_elements(GstPad *pad, struct wg_parser +@@ -1372,6 +1372,10 @@ static bool stream_create_post_processing_elements(GstPad *pad, struct wg_parser if (!(element = create_element("audioconvert", "base")) || !append_element(parser->container, element, &first, &last)) return false; diff --git a/patches/wine-gst/0036-HACK-winegstreamer-Add-a-videoscale-element-to-wg_pa.patch b/patches/wine-gst/0035-HACK-winegstreamer-Add-a-videoscale-element-to-wg_pa.patch similarity index 83% rename from patches/wine-gst/0036-HACK-winegstreamer-Add-a-videoscale-element-to-wg_pa.patch rename to patches/wine-gst/0035-HACK-winegstreamer-Add-a-videoscale-element-to-wg_pa.patch index 4fb0c27a3..ab9a5bf49 100644 --- a/patches/wine-gst/0036-HACK-winegstreamer-Add-a-videoscale-element-to-wg_pa.patch +++ b/patches/wine-gst/0035-HACK-winegstreamer-Add-a-videoscale-element-to-wg_pa.patch @@ -1,7 +1,7 @@ -From 420c1729c09a1366a90ec60405b88ad938d3a2e5 Mon Sep 17 00:00:00 2001 +From 82aa3f134eecfd1b0da14f1625c0f2f12a4576e8 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Wed, 31 Jan 2024 17:42:54 +0100 -Subject: [PATCH 36/43] [HACK] winegstreamer: Add a videoscale element to +Subject: [PATCH 35/42] [HACK] winegstreamer: Add a videoscale element to wg_parser for raw video. --- @@ -9,10 +9,10 @@ Subject: [PATCH 36/43] [HACK] winegstreamer: Add a videoscale element to 1 file changed, 9 insertions(+) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 3d9e3b78a2c..5cbc38b0e18 100644 +index 20d54f1042c..d99dff6dc80 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c -@@ -1174,6 +1174,10 @@ static bool stream_create_post_processing_elements(GstPad *pad, struct wg_parser +@@ -1280,6 +1280,10 @@ static bool stream_create_post_processing_elements(GstPad *pad, struct wg_parser if (!(element = create_element("gldownload", "base")) || !append_element(parser->container, element, &first, &last)) return false; @@ -23,7 +23,7 @@ index 3d9e3b78a2c..5cbc38b0e18 100644 if (!link_src_to_element(pad, first) || !link_element_to_sink(last, stream->my_sink)) return false; -@@ -1254,6 +1258,11 @@ static bool stream_create_post_processing_elements(GstPad *pad, struct wg_parser +@@ -1360,6 +1364,11 @@ static bool stream_create_post_processing_elements(GstPad *pad, struct wg_parser /* Let GStreamer choose a default number of threads. */ gst_util_set_object_arg(G_OBJECT(element), "n-threads", "0"); diff --git a/patches/wine-gst/0037-HACK-mfmediaengine-Do-not-send-MF_MEDIA_ENGINE_EVENT.patch b/patches/wine-gst/0036-HACK-mfmediaengine-Do-not-send-MF_MEDIA_ENGINE_EVENT.patch similarity index 89% rename from patches/wine-gst/0037-HACK-mfmediaengine-Do-not-send-MF_MEDIA_ENGINE_EVENT.patch rename to patches/wine-gst/0036-HACK-mfmediaengine-Do-not-send-MF_MEDIA_ENGINE_EVENT.patch index 5b33e6380..0650a8e36 100644 --- a/patches/wine-gst/0037-HACK-mfmediaengine-Do-not-send-MF_MEDIA_ENGINE_EVENT.patch +++ b/patches/wine-gst/0036-HACK-mfmediaengine-Do-not-send-MF_MEDIA_ENGINE_EVENT.patch @@ -1,7 +1,7 @@ -From a78b4f13a004a9a4b52dc5ad7806186c9fd0b770 Mon Sep 17 00:00:00 2001 +From edf8fef10f54e399ffb1ad25af69ae2924dd1a10 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Sat, 2 Mar 2024 21:19:25 +0100 -Subject: [PATCH 37/43] [HACK] mfmediaengine: Do not send +Subject: [PATCH 36/42] [HACK] mfmediaengine: Do not send MF_MEDIA_ENGINE_EVENT_ERROR for VRChat. Breaks AVPro Video (used by VRChat) when a IMFMediaEngine::GetError call inside the event handler doesn't return an @@ -15,10 +15,10 @@ properly. In the meantime, this hack works around the problem. 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/dlls/mfmediaengine/main.c b/dlls/mfmediaengine/main.c -index a40f8d64f58..4180ba116bc 100644 +index fba338a8438..2986c75902f 100644 --- a/dlls/mfmediaengine/main.c +++ b/dlls/mfmediaengine/main.c -@@ -1468,11 +1468,21 @@ static HRESULT WINAPI media_engine_load_handler_Invoke(IMFAsyncCallback *iface, +@@ -1466,11 +1466,21 @@ static HRESULT WINAPI media_engine_load_handler_Invoke(IMFAsyncCallback *iface, } else { diff --git a/patches/wine-gst/0038-Marker-commit-do-not-put-into-MR.patch b/patches/wine-gst/0037-Marker-commit-do-not-put-into-MR.patch similarity index 54% rename from patches/wine-gst/0038-Marker-commit-do-not-put-into-MR.patch rename to patches/wine-gst/0037-Marker-commit-do-not-put-into-MR.patch index ce7710f7a..d77812fea 100644 --- a/patches/wine-gst/0038-Marker-commit-do-not-put-into-MR.patch +++ b/patches/wine-gst/0037-Marker-commit-do-not-put-into-MR.patch @@ -1,17 +1,17 @@ -From bfc2cb62dcc4f234aad78e1a324704e5929815e6 Mon Sep 17 00:00:00 2001 +From d3b3178e8b8fcae150bc00bb21b0e5e65150217a Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Mon, 25 Mar 2024 09:58:04 +0100 -Subject: [PATCH 38/43] === Marker commit, do not put into MR === +Subject: [PATCH 37/42] === Marker commit, do not put into MR === --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS -index 2291c99447c..2ed85ed4657 100644 +index 9b971e73e79..6f6a6296316 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -439,3 +439,4 @@ W: https://wine-staging.com/ +@@ -438,3 +438,4 @@ W: https://wine-staging.com/ seek leak diff --git a/patches/wine-gst/0039-DEBUG-winegstreamer-GST_LOG-GST_DEBUG.patch b/patches/wine-gst/0038-DEBUG-winegstreamer-GST_LOG-GST_DEBUG.patch similarity index 80% rename from patches/wine-gst/0039-DEBUG-winegstreamer-GST_LOG-GST_DEBUG.patch rename to patches/wine-gst/0038-DEBUG-winegstreamer-GST_LOG-GST_DEBUG.patch index 36651ad9f..3129c7bb6 100644 --- a/patches/wine-gst/0039-DEBUG-winegstreamer-GST_LOG-GST_DEBUG.patch +++ b/patches/wine-gst/0038-DEBUG-winegstreamer-GST_LOG-GST_DEBUG.patch @@ -1,17 +1,17 @@ -From d922f71679240a984ab0bdeb85d79eb841081b4a Mon Sep 17 00:00:00 2001 +From 0ff3652d413dff8a4bb75681eedcac05339f55b8 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Tue, 19 Mar 2024 10:20:49 +0100 -Subject: [PATCH 39/43] [DEBUG] winegstreamer: GST_LOG -> GST_DEBUG. +Subject: [PATCH 38/42] [DEBUG] winegstreamer: GST_LOG -> GST_DEBUG. --- dlls/winegstreamer/wg_parser.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c -index 5cbc38b0e18..97e247788ca 100644 +index d99dff6dc80..c9aefb5d80f 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c -@@ -599,7 +599,7 @@ static NTSTATUS wg_parser_stream_notify_qos(void *args) +@@ -701,7 +701,7 @@ static NTSTATUS wg_parser_stream_notify_qos(void *args) /* This can happen legitimately if the sample falls outside of the * segment bounds. GStreamer elements shouldn't present the sample in * that case, but DirectShow doesn't care. */ @@ -20,7 +20,7 @@ index 5cbc38b0e18..97e247788ca 100644 return S_OK; } if (!(event = gst_event_new_qos(params->underflow ? GST_QOS_TYPE_UNDERFLOW : GST_QOS_TYPE_OVERFLOW, -@@ -782,7 +782,7 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) +@@ -922,7 +922,7 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) struct wg_parser_stream *stream = gst_pad_get_element_private(pad); struct wg_parser *parser = stream->parser; @@ -29,7 +29,7 @@ index 5cbc38b0e18..97e247788ca 100644 switch (event->type) { -@@ -892,7 +892,7 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu +@@ -1036,7 +1036,7 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu struct wg_parser_stream *stream = gst_pad_get_element_private(pad); struct wg_parser *parser = stream->parser; @@ -38,7 +38,7 @@ index 5cbc38b0e18..97e247788ca 100644 pthread_mutex_lock(&parser->mutex); -@@ -918,7 +918,7 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu +@@ -1062,7 +1062,7 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu if (!stream->enabled) { @@ -47,7 +47,7 @@ index 5cbc38b0e18..97e247788ca 100644 pthread_mutex_unlock(&parser->mutex); gst_buffer_unref(buffer); return GST_FLOW_OK; -@@ -949,7 +949,7 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu +@@ -1093,7 +1093,7 @@ static GstFlowReturn sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *bu * reference to the stream object, which will release it in * wg_parser_stream_release_buffer(). */ @@ -56,7 +56,7 @@ index 5cbc38b0e18..97e247788ca 100644 return GST_FLOW_OK; } -@@ -995,7 +995,7 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) +@@ -1102,7 +1102,7 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) struct wg_parser_stream *stream = gst_pad_get_element_private(pad); struct wg_parser *parser = stream->parser; @@ -65,7 +65,7 @@ index 5cbc38b0e18..97e247788ca 100644 switch (query->type) { -@@ -1031,7 +1031,7 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) +@@ -1134,7 +1134,7 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) gst_structure_remove_fields(gst_caps_get_structure(caps, i), "framerate", "pixel-aspect-ratio", NULL); @@ -74,7 +74,7 @@ index 5cbc38b0e18..97e247788ca 100644 if (filter) { -@@ -1309,7 +1309,7 @@ static void stream_decodebin_pad_added_cb(GstElement *element, GstPad *pad, gpoi +@@ -1415,7 +1415,7 @@ static void stream_decodebin_pad_added_cb(GstElement *element, GstPad *pad, gpoi struct wg_parser_stream *stream = user; struct wg_parser *parser = stream->parser; @@ -83,7 +83,7 @@ index 5cbc38b0e18..97e247788ca 100644 if (gst_pad_is_linked(pad)) return; -@@ -1323,7 +1323,7 @@ static bool stream_decodebin_create(struct wg_parser_stream *stream) +@@ -1429,7 +1429,7 @@ static bool stream_decodebin_create(struct wg_parser_stream *stream) { struct wg_parser *parser = stream->parser; @@ -92,7 +92,7 @@ index 5cbc38b0e18..97e247788ca 100644 if (!(stream->decodebin = create_element("decodebin", "base"))) return false; -@@ -1338,7 +1338,7 @@ static bool stream_decodebin_create(struct wg_parser_stream *stream) +@@ -1444,7 +1444,7 @@ static bool stream_decodebin_create(struct wg_parser_stream *stream) pthread_mutex_unlock(&parser->mutex); gst_element_sync_state_with_parent(stream->decodebin); @@ -101,16 +101,16 @@ index 5cbc38b0e18..97e247788ca 100644 return true; } -@@ -1349,7 +1349,7 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user) +@@ -1455,7 +1455,7 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user) struct wg_parser *parser = user; - GstCaps *caps, *caps2; + GstCaps *caps; - GST_LOG("parser %p, element %p, pad %p.", parser, element, pad); + GST_DEBUG("parser %p, element %p, pad %p.", parser, element, pad); if (gst_pad_is_linked(pad)) return; -@@ -1392,7 +1392,7 @@ static void pad_removed_cb(GstElement *element, GstPad *pad, gpointer user) +@@ -1502,7 +1502,7 @@ static void pad_removed_cb(GstElement *element, GstPad *pad, gpointer user) unsigned int i; char *name; @@ -119,7 +119,7 @@ index 5cbc38b0e18..97e247788ca 100644 for (i = 0; i < parser->stream_count; ++i) { -@@ -1451,7 +1451,7 @@ static GstFlowReturn issue_read_request(struct wg_parser *parser, guint64 offset +@@ -1561,7 +1561,7 @@ static GstFlowReturn issue_read_request(struct wg_parser *parser, guint64 offset pthread_mutex_unlock(&parser->mutex); @@ -128,7 +128,7 @@ index 5cbc38b0e18..97e247788ca 100644 return ret; } -@@ -1560,7 +1560,7 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent, +@@ -1670,7 +1670,7 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent, { struct wg_parser *parser = gst_pad_get_element_private(pad); @@ -137,7 +137,7 @@ index 5cbc38b0e18..97e247788ca 100644 if (offset == GST_BUFFER_OFFSET_NONE) offset = parser->next_pull_offset; -@@ -1574,7 +1574,7 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent, +@@ -1684,7 +1684,7 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent, if (!*buffer) *buffer = gst_buffer_new_and_alloc(0); gst_buffer_set_size(*buffer, 0); @@ -146,7 +146,7 @@ index 5cbc38b0e18..97e247788ca 100644 return GST_FLOW_OK; } -@@ -1595,7 +1595,7 @@ static gboolean src_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) +@@ -1705,7 +1705,7 @@ static gboolean src_query_cb(GstPad *pad, GstObject *parent, GstQuery *query) struct wg_parser *parser = gst_pad_get_element_private(pad); GstFormat format; @@ -155,7 +155,7 @@ index 5cbc38b0e18..97e247788ca 100644 switch (GST_QUERY_TYPE(query)) { -@@ -1899,7 +1899,7 @@ static gboolean src_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) +@@ -2009,7 +2009,7 @@ static gboolean src_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) struct wg_parser *parser = gst_pad_get_element_private(pad); gboolean ret = TRUE; diff --git a/patches/wine-gst/0040-HACK-kernelbase-yt-dlp.exe-redirection-and-cmdline-m.patch b/patches/wine-gst/0039-HACK-kernelbase-yt-dlp.exe-redirection-and-cmdline-m.patch similarity index 92% rename from patches/wine-gst/0040-HACK-kernelbase-yt-dlp.exe-redirection-and-cmdline-m.patch rename to patches/wine-gst/0039-HACK-kernelbase-yt-dlp.exe-redirection-and-cmdline-m.patch index 0e27ced90..fa563b362 100644 --- a/patches/wine-gst/0040-HACK-kernelbase-yt-dlp.exe-redirection-and-cmdline-m.patch +++ b/patches/wine-gst/0039-HACK-kernelbase-yt-dlp.exe-redirection-and-cmdline-m.patch @@ -1,7 +1,7 @@ -From 06cdae196eddcae63ec30665ea78033b2cb4e33a Mon Sep 17 00:00:00 2001 +From d31c5ce2ae25a086a889a6ddb6117fcc4c673e65 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Thu, 28 Mar 2024 16:43:07 +0100 -Subject: [PATCH 40/43] [HACK] kernelbase: yt-dlp.exe redirection and cmdline +Subject: [PATCH 39/42] [HACK] kernelbase: yt-dlp.exe redirection and cmdline modification to read cookies from browser. --- @@ -9,7 +9,7 @@ Subject: [PATCH 40/43] [HACK] kernelbase: yt-dlp.exe redirection and cmdline 1 file changed, 51 insertions(+) diff --git a/dlls/kernelbase/process.c b/dlls/kernelbase/process.c -index 0898e30f603..958de08bfc3 100644 +index 387ae09bc11..f716d0bf35f 100644 --- a/dlls/kernelbase/process.c +++ b/dlls/kernelbase/process.c @@ -584,6 +584,54 @@ static int battleye_launcher_redirect_hack( const WCHAR *app_name, WCHAR *new_na @@ -67,7 +67,7 @@ index 0898e30f603..958de08bfc3 100644 static const WCHAR *hack_append_command_line( const WCHAR *cmd ) { static const struct -@@ -712,6 +760,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR +@@ -713,6 +761,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR if (battleye_launcher_redirect_hack( app_name, name, ARRAY_SIZE(name), &orig_app_name )) app_name = name; diff --git a/patches/wine-gst/0041-mf-Schedule-stored-timers-for-the-original-time-inst.patch b/patches/wine-gst/0040-mf-Schedule-stored-timers-for-the-original-time-inst.patch similarity index 95% rename from patches/wine-gst/0041-mf-Schedule-stored-timers-for-the-original-time-inst.patch rename to patches/wine-gst/0040-mf-Schedule-stored-timers-for-the-original-time-inst.patch index 98d48f95c..e4a8183a9 100644 --- a/patches/wine-gst/0041-mf-Schedule-stored-timers-for-the-original-time-inst.patch +++ b/patches/wine-gst/0040-mf-Schedule-stored-timers-for-the-original-time-inst.patch @@ -1,7 +1,7 @@ -From f987de460921dbe30dc2d283ed7e4b571ac51778 Mon Sep 17 00:00:00 2001 +From a62738cd8094c9444875293dc962be8cc7a09062 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Fri, 23 Feb 2024 21:45:44 +0100 -Subject: [PATCH 41/43] mf: Schedule stored timers for the original time +Subject: [PATCH 40/42] mf: Schedule stored timers for the original time instead of calling callbacks immediately when changing presentation clock state. diff --git a/patches/wine-gst/0042-mf-Start-forwarding-samples-only-at-the-PTS-of-the-f.patch b/patches/wine-gst/0041-mf-Start-forwarding-samples-only-at-the-PTS-of-the-f.patch similarity index 79% rename from patches/wine-gst/0042-mf-Start-forwarding-samples-only-at-the-PTS-of-the-f.patch rename to patches/wine-gst/0041-mf-Start-forwarding-samples-only-at-the-PTS-of-the-f.patch index eb64f7167..a3f604a1b 100644 --- a/patches/wine-gst/0042-mf-Start-forwarding-samples-only-at-the-PTS-of-the-f.patch +++ b/patches/wine-gst/0041-mf-Start-forwarding-samples-only-at-the-PTS-of-the-f.patch @@ -1,27 +1,33 @@ -From e950094cf2d13e5ad3ccbd04b4635127db6d1e8d Mon Sep 17 00:00:00 2001 +From e5dfc6c596220dc3495269c917cddc43a7ecf132 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Fri, 23 Feb 2024 21:50:22 +0100 -Subject: [PATCH 42/43] mf: Start forwarding samples only at the PTS of the +Subject: [PATCH 41/42] mf: Start forwarding samples only at the PTS of the first sample. Hides desynchronization in applications that ignore the PTS, e.g. VRChat. --- - dlls/mf/session.c | 179 ++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 172 insertions(+), 7 deletions(-) + dlls/mf/session.c | 182 ++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 177 insertions(+), 5 deletions(-) diff --git a/dlls/mf/session.c b/dlls/mf/session.c -index 925566d6baf..5b0cc5a344c 100644 +index 752bdcf1c21..d6c8937f513 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c -@@ -163,6 +163,7 @@ enum topo_node_flags +@@ -164,6 +164,13 @@ enum topo_node_flags { TOPO_NODE_END_OF_STREAM = 0x1, TOPO_NODE_SCRUB_SAMPLE_COMPLETE = 0x2, + TOPO_NODE_HAS_WAITED_FOR_PTS = 0x4, ++}; ++ ++struct sample ++{ ++ struct list entry; ++ IMFSample *sample; }; struct topo_node -@@ -188,6 +189,9 @@ struct topo_node +@@ -189,6 +196,9 @@ struct topo_node { IMFMediaSource *source; DWORD stream_id; @@ -31,7 +37,7 @@ index 925566d6baf..5b0cc5a344c 100644 } source; struct { -@@ -237,6 +241,7 @@ struct media_session +@@ -238,6 +248,7 @@ struct media_session IMFPresentationClock *clock; IMFPresentationTimeSource *system_time_source; IMFRateControl *clock_rate_control; @@ -39,7 +45,7 @@ index 925566d6baf..5b0cc5a344c 100644 IMFTopoLoader *topo_loader; IMFQualityManager *quality_manager; struct -@@ -313,6 +318,11 @@ static struct session_op *impl_op_from_IUnknown(IUnknown *iface) +@@ -314,6 +325,11 @@ static struct session_op *impl_op_from_IUnknown(IUnknown *iface) return CONTAINING_RECORD(iface, struct session_op, IUnknown_iface); } @@ -51,8 +57,8 @@ index 925566d6baf..5b0cc5a344c 100644 static struct topo_node *impl_node_from_IMFVideoSampleAllocatorNotify(IMFVideoSampleAllocatorNotify *iface) { return CONTAINING_RECORD(iface, struct topo_node, u.sink.notify_cb); -@@ -712,6 +722,29 @@ static void transform_stream_drop_samples(struct transform_stream *stream) - IMFSample_Release(sample); +@@ -760,6 +776,29 @@ static void transform_stream_drop_events(struct transform_stream *stream) + IMFMediaEvent_Release(event); } +static HRESULT topo_node_sourcestream_pop_sample(struct topo_node *source_node, IMFSample **sample) @@ -81,7 +87,7 @@ index 925566d6baf..5b0cc5a344c 100644 static void release_topo_node(struct topo_node *node) { unsigned int i; -@@ -721,6 +754,12 @@ static void release_topo_node(struct topo_node *node) +@@ -769,6 +808,12 @@ static void release_topo_node(struct topo_node *node) case MF_TOPOLOGY_SOURCESTREAM_NODE: if (node->u.source.source) IMFMediaSource_Release(node->u.source.source); @@ -94,7 +100,7 @@ index 925566d6baf..5b0cc5a344c 100644 break; case MF_TOPOLOGY_TRANSFORM_NODE: for (i = 0; i < node->u.transform.input_count; ++i) -@@ -1640,6 +1679,68 @@ static HRESULT session_get_stream_sink_type(IMFStreamSink *sink, IMFMediaType ** +@@ -1722,6 +1767,68 @@ static HRESULT session_get_stream_sink_type(IMFStreamSink *sink, IMFMediaType ** return hr; } @@ -163,7 +169,7 @@ index 925566d6baf..5b0cc5a344c 100644 static HRESULT WINAPI node_sample_allocator_cb_QueryInterface(IMFVideoSampleAllocatorNotify *iface, REFIID riid, void **obj) { -@@ -1737,6 +1838,9 @@ static HRESULT session_append_node(struct media_session *session, IMFTopologyNod +@@ -1836,6 +1943,9 @@ static HRESULT session_append_node(struct media_session *session, IMFTopologyNod break; case MF_TOPOLOGY_SOURCESTREAM_NODE: @@ -173,7 +179,7 @@ index 925566d6baf..5b0cc5a344c 100644 if (FAILED(IMFTopologyNode_GetUnknown(node, &MF_TOPONODE_SOURCE, &IID_IMFMediaSource, (void **)&topo_node->u.source.source))) { -@@ -2039,6 +2143,8 @@ static ULONG WINAPI mfsession_Release(IMFMediaSession *iface) +@@ -2138,6 +2248,8 @@ static ULONG WINAPI mfsession_Release(IMFMediaSession *iface) IMFPresentationTimeSource_Release(session->system_time_source); if (session->clock_rate_control) IMFRateControl_Release(session->clock_rate_control); @@ -182,8 +188,8 @@ index 925566d6baf..5b0cc5a344c 100644 if (session->topo_loader) IMFTopoLoader_Release(session->topo_loader); if (session->quality_manager) -@@ -3513,11 +3619,41 @@ static void session_request_sample(struct media_session *session, IMFStreamSink - IMFTopologyNode_Release(upstream_node); +@@ -3838,10 +3950,40 @@ static void session_request_sample(struct media_session *session, IMFStreamSink + sink_node->u.sink.requests--; } +static HRESULT topo_node_sourcestream_push_sample(struct topo_node *source_node, IMFSample *sample) @@ -203,30 +209,28 @@ index 925566d6baf..5b0cc5a344c 100644 +static void session_deliver_sample_from_source(struct media_session *session, struct topo_node *source_node, + IMFSample *sample) +{ -+ IMFTopologyNode *downstream_node; -+ DWORD downstream_input; -+ HRESULT hr; ++ struct topo_node *node; ++ DWORD input; + -+ if (FAILED(hr = IMFTopologyNode_GetOutput(source_node->node, 0, &downstream_node, &downstream_input))) ++ if (!(node = session_get_topo_node_output(session, source_node, 0, &input))) + { -+ WARN("Failed to get downstream node connection, hr %#lx.\n", hr); ++ WARN("Failed to node %p/%u output.\n", source_node, 0); + return; + } + -+ session_deliver_sample_to_node(session, downstream_node, downstream_input, sample); -+ IMFTopologyNode_Release(downstream_node); ++ session_deliver_sample_to_node(session, node, input, sample); +} + static void session_deliver_sample(struct media_session *session, IMFMediaStream *stream, const PROPVARIANT *value) { struct topo_node *source_node = NULL, *node; -- IMFTopologyNode *downstream_node; -- DWORD downstream_input; +- DWORD input; + IMFSample *sample; - HRESULT hr; ++ HRESULT hr; if (value && (value->vt != VT_UNKNOWN || !value->punkVal)) -@@ -3538,17 +3674,42 @@ static void session_deliver_sample(struct media_session *session, IMFMediaStream + { +@@ -3861,16 +4003,42 @@ static void session_deliver_sample(struct media_session *session, IMFMediaStream if (!source_node) return; @@ -235,10 +239,10 @@ index 925566d6baf..5b0cc5a344c 100644 if (!value) source_node->flags |= TOPO_NODE_END_OF_STREAM; - -- if (FAILED(hr = IMFTopologyNode_GetOutput(source_node->node, 0, &downstream_node, &downstream_input))) +- if (!(node = session_get_topo_node_output(session, source_node, 0, &input))) + else if (!(source_node->flags & TOPO_NODE_HAS_WAITED_FOR_PTS)) { -- WARN("Failed to get downstream node connection, hr %#lx.\n", hr); +- WARN("Failed to node %p/%u output.\n", source_node, 0); + LONGLONG sampletime; + + source_node->flags |= TOPO_NODE_HAS_WAITED_FOR_PTS; @@ -268,13 +272,12 @@ index 925566d6baf..5b0cc5a344c 100644 return; } -- session_deliver_sample_to_node(session, downstream_node, downstream_input, value ? (IMFSample *)value->punkVal : NULL); -- IMFTopologyNode_Release(downstream_node); -+ session_deliver_sample_from_source(session, source_node, sample); +- session_deliver_sample_to_node(session, node, input, value ? (IMFSample *)value->punkVal : NULL); ++ session_deliver_sample_from_source(session, node, sample); } static void session_sink_invalidated(struct media_session *session, IMFMediaEvent *event, IMFStreamSink *sink) -@@ -4342,6 +4503,10 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **ses +@@ -4664,6 +4832,10 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **ses goto failed; } diff --git a/patches/wine-gst/0043-ntdll-Use-unixcall-instead-of-syscall-for-QueryPerfo.patch b/patches/wine-gst/0042-ntdll-Use-unixcall-instead-of-syscall-for-QueryPerfo.patch similarity index 96% rename from patches/wine-gst/0043-ntdll-Use-unixcall-instead-of-syscall-for-QueryPerfo.patch rename to patches/wine-gst/0042-ntdll-Use-unixcall-instead-of-syscall-for-QueryPerfo.patch index 60a8a57b8..69487c276 100644 --- a/patches/wine-gst/0043-ntdll-Use-unixcall-instead-of-syscall-for-QueryPerfo.patch +++ b/patches/wine-gst/0042-ntdll-Use-unixcall-instead-of-syscall-for-QueryPerfo.patch @@ -1,7 +1,7 @@ -From 65fe0ddaa16cecb85d84ea59bd47354c8654b720 Mon Sep 17 00:00:00 2001 +From 487aa0da570b4516ad51e4dbb6ee01e7ef77a1ba Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Wed, 24 Apr 2024 22:00:49 +0200 -Subject: [PATCH 43/43] ntdll: Use unixcall instead of syscall for +Subject: [PATCH 42/42] ntdll: Use unixcall instead of syscall for QueryPerformanceCounter. ---