forked from GloriousEggroll/proton-ge-custom
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a332ec
commit 06b768e
Showing
51 changed files
with
655 additions
and
556 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 6d99895f2ca9e3b74de6992296e765ae286139fd Mon Sep 17 00:00:00 2001 | ||
From 7918790918b7ee249d04f6766ea0d6e304100205 Mon Sep 17 00:00:00 2001 | ||
From: Zhiyi Zhang <[email protected]> | ||
Date: Tue, 1 Aug 2023 10:52:21 +0800 | ||
Subject: [PATCH 01/49] mf: Add seeking support for IMFMediaSession::Start(). | ||
|
@@ -8,7 +8,7 @@ Subject: [PATCH 01/49] mf: Add seeking support for IMFMediaSession::Start(). | |
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: | ||
|
@@ -124,5 +124,5 @@ index ef707dea4de..3f3be2b84b0 100644 | |
case MESourcePaused: | ||
case MESourceStopped: | ||
-- | ||
2.46.0 | ||
2.47.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From d2546730e1c900ceb2688ba94cb3433777099580 Mon Sep 17 00:00:00 2001 | ||
From 6c06159c765dfdf524b3729e3e046954dd4baaa1 Mon Sep 17 00:00:00 2001 | ||
From: Zhiyi Zhang <[email protected]> | ||
Date: Tue, 8 Aug 2023 15:24:34 +0800 | ||
Subject: [PATCH 02/49] mf/tests: Add a create_media_session_with_source_sink() | ||
|
@@ -9,10 +9,10 @@ Subject: [PATCH 02/49] 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); | ||
|
||
|
@@ -139,5 +139,5 @@ index 0a34329bd75..e0bcedac20f 100644 | |
propvar.vt = VT_EMPTY; | ||
hr = IMFMediaSession_Start(session, &GUID_NULL, &propvar); | ||
-- | ||
2.46.0 | ||
2.47.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 23eb22d6b249a18679b1743f734f2c9c4bcf518f Mon Sep 17 00:00:00 2001 | ||
From 17f7aa6528c839bf56c6fd41a853ba924cd67f44 Mon Sep 17 00:00:00 2001 | ||
From: Zhiyi Zhang <[email protected]> | ||
Date: Mon, 7 Aug 2023 11:52:20 +0800 | ||
Subject: [PATCH 03/49] mf/tests: Test IMFMediaSession::Start(). | ||
|
@@ -8,10 +8,10 @@ Subject: [PATCH 03/49] mf/tests: Test IMFMediaSession::Start(). | |
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,12 +773,12 @@ 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(); | ||
+ test_media_session_Start(); | ||
} | ||
-- | ||
2.46.0 | ||
2.47.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From c9cb24b06e0d2b41d9026eeddc929474006a606d Mon Sep 17 00:00:00 2001 | ||
From 538f935fa7b23f9502975f7902c24e5c9de0757d Mon Sep 17 00:00:00 2001 | ||
From: Zhiyi Zhang <[email protected]> | ||
Date: Fri, 28 Jul 2023 18:04:30 +0800 | ||
Subject: [PATCH 04/49] mfmediaengine: Implement | ||
|
@@ -9,7 +9,7 @@ Subject: [PATCH 04/49] 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 57bd2f82cec..d6d6b2fd7ab 100644 | ||
--- a/dlls/mfmediaengine/main.c | ||
+++ b/dlls/mfmediaengine/main.c | ||
@@ -96,6 +96,7 @@ enum media_engine_flags | ||
|
@@ -20,7 +20,7 @@ index 9e41d9dad84..28a273616c8 100644 | |
}; | ||
|
||
struct vec3 | ||
@@ -982,7 +983,14 @@ static HRESULT WINAPI media_engine_session_events_Invoke(IMFAsyncCallback *iface | ||
@@ -955,7 +956,14 @@ static HRESULT WINAPI media_engine_session_events_Invoke(IMFAsyncCallback *iface | ||
break; | ||
} | ||
case MESessionStarted: | ||
|
@@ -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) | ||
@@ -1817,19 +1825,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 | ||
@@ -3108,9 +3106,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) | ||
{ | ||
|
@@ -105,5 +105,5 @@ index 9e41d9dad84..28a273616c8 100644 | |
|
||
static HRESULT WINAPI media_engine_EnableTimeUpdateTimer(IMFMediaEngineEx *iface, BOOL enable) | ||
-- | ||
2.46.0 | ||
2.47.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From aa917ac9bc5d31f786f16bb4d5765d53d63b50ea Mon Sep 17 00:00:00 2001 | ||
From 0961c4c7828f15209444a55e807a0360f6037a08 Mon Sep 17 00:00:00 2001 | ||
From: Zhiyi Zhang <[email protected]> | ||
Date: Mon, 7 Aug 2023 11:53:41 +0800 | ||
Subject: [PATCH 05/49] mfmediaengine/tests: Test | ||
|
@@ -9,10 +9,10 @@ Subject: [PATCH 05/49] 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(); | ||
|
@@ -239,5 +239,5 @@ index 47130d8e436..29a11d034cd 100644 | |
IMFMediaEngineClassFactory_Release(factory); | ||
|
||
-- | ||
2.46.0 | ||
2.47.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From db326d9633962a78802f104d3d1eb10b4df9fd60 Mon Sep 17 00:00:00 2001 | ||
From bd72831d81187c1a476563bd12b0e2c782ead62a Mon Sep 17 00:00:00 2001 | ||
From: Torge Matthies <[email protected]> | ||
Date: Fri, 14 Jun 2024 03:09:34 +0200 | ||
Subject: [PATCH 06/49] mfmediaengine: Implement IMFMediaEngine::IsSeeking. | ||
|
@@ -8,10 +8,10 @@ Subject: [PATCH 06/49] mfmediaengine: Implement IMFMediaEngine::IsSeeking. | |
1 file changed, 9 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/dlls/mfmediaengine/main.c b/dlls/mfmediaengine/main.c | ||
index 28a273616c8..a40f8d64f58 100644 | ||
index d6d6b2fd7ab..cd68c122851 100644 | ||
--- a/dlls/mfmediaengine/main.c | ||
+++ b/dlls/mfmediaengine/main.c | ||
@@ -1825,9 +1825,16 @@ static USHORT WINAPI media_engine_GetReadyState(IMFMediaEngineEx *iface) | ||
@@ -1796,9 +1796,16 @@ static USHORT WINAPI media_engine_GetReadyState(IMFMediaEngineEx *iface) | ||
|
||
static BOOL WINAPI media_engine_IsSeeking(IMFMediaEngineEx *iface) | ||
{ | ||
|
@@ -31,5 +31,5 @@ index 28a273616c8..a40f8d64f58 100644 | |
|
||
static double WINAPI media_engine_GetCurrentTime(IMFMediaEngineEx *iface) | ||
-- | ||
2.46.0 | ||
2.47.0 | ||
|
Oops, something went wrong.