forked from GloriousEggroll/proton-ge-custom
-
Notifications
You must be signed in to change notification settings - Fork 4
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
272b630
commit 334a767
Showing
48 changed files
with
854 additions
and
673 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,14 +1,14 @@ | ||
From bc88e82ada1457245f246b6d5621b13b3d9ab760 Mon Sep 17 00:00:00 2001 | ||
From 5a42c6f7a56ffae4ac2d1367eac2d659b5336ca8 Mon Sep 17 00:00:00 2001 | ||
From: Zhiyi Zhang <[email protected]> | ||
Date: Tue, 1 Aug 2023 10:52:21 +0800 | ||
Subject: [PATCH 01/43] mf: Add seeking support for IMFMediaSession::Start(). | ||
Subject: [PATCH 01/42] mf: Add seeking support for IMFMediaSession::Start(). | ||
|
||
--- | ||
dlls/mf/session.c | 57 ++++++++++++++++++++++++++++++++++++++++++----- | ||
1 file changed, 51 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/dlls/mf/session.c b/dlls/mf/session.c | ||
index ef707dea4de..3f3be2b84b0 100644 | ||
index 4f94d3c30a7..a5caad3c97a 100644 | ||
--- a/dlls/mf/session.c | ||
+++ b/dlls/mf/session.c | ||
@@ -110,6 +110,7 @@ enum object_state | ||
|
@@ -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: | ||
|
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,18 +1,18 @@ | ||
From 4ba015c45201d9cbdba3237d2c9c3a243c4e70f4 Mon Sep 17 00:00:00 2001 | ||
From 134b5bbd0f07cdeaa3acd6e1d205ba1fd6cfe5c2 Mon Sep 17 00:00:00 2001 | ||
From: Zhiyi Zhang <[email protected]> | ||
Date: Tue, 8 Aug 2023 15:24:34 +0800 | ||
Subject: [PATCH 02/43] mf/tests: Add a create_media_session_with_source_sink() | ||
Subject: [PATCH 02/42] mf/tests: Add a create_media_session_with_source_sink() | ||
helper. | ||
|
||
--- | ||
dlls/mf/tests/mf.c | 92 ++++++++++++++++++++++++---------------------- | ||
1 file changed, 48 insertions(+), 44 deletions(-) | ||
|
||
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c | ||
index 0a34329bd75..e0bcedac20f 100644 | ||
index 9382d8cae35..58d8ec73c4f 100644 | ||
--- a/dlls/mf/tests/mf.c | ||
+++ b/dlls/mf/tests/mf.c | ||
@@ -4995,6 +4995,53 @@ static void test_sample_grabber_is_mediatype_supported(void) | ||
@@ -4996,6 +4996,53 @@ static void test_sample_grabber_is_mediatype_supported(void) | ||
IMFSampleGrabberSinkCallback_Release(grabber_callback); | ||
} | ||
|
||
|
@@ -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); | ||
|
||
|
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,17 +1,17 @@ | ||
From d4553e13b2110b7cfbcc39b5c5cc890e1a8da145 Mon Sep 17 00:00:00 2001 | ||
From ca2e4786f3a1e43aa542d79df84a434a6bbe03d6 Mon Sep 17 00:00:00 2001 | ||
From: Zhiyi Zhang <[email protected]> | ||
Date: Mon, 7 Aug 2023 11:52:20 +0800 | ||
Subject: [PATCH 03/43] mf/tests: Test IMFMediaSession::Start(). | ||
Subject: [PATCH 03/42] mf/tests: Test IMFMediaSession::Start(). | ||
|
||
--- | ||
dlls/mf/tests/mf.c | 704 ++++++++++++++++++++++++++++++++++++++++++++- | ||
1 file changed, 696 insertions(+), 8 deletions(-) | ||
|
||
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c | ||
index e0bcedac20f..f164a04b989 100644 | ||
index 58d8ec73c4f..240cbf194ea 100644 | ||
--- a/dlls/mf/tests/mf.c | ||
+++ b/dlls/mf/tests/mf.c | ||
@@ -2086,6 +2086,448 @@ static IMFMediaSource *create_media_source(const WCHAR *name, const WCHAR *mime) | ||
@@ -2087,6 +2087,448 @@ static IMFMediaSource *create_media_source(const WCHAR *name, const WCHAR *mime) | ||
return source; | ||
} | ||
|
||
|
@@ -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(); | ||
|
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,15 +1,15 @@ | ||
From d74ea960a50420934759d2addfa649fae15f878a Mon Sep 17 00:00:00 2001 | ||
From 502f072eec3417eb1ae1fde7c28ac68529d51ba5 Mon Sep 17 00:00:00 2001 | ||
From: Zhiyi Zhang <[email protected]> | ||
Date: Fri, 28 Jul 2023 18:04:30 +0800 | ||
Subject: [PATCH 04/43] mfmediaengine: Implement | ||
Subject: [PATCH 04/42] mfmediaengine: Implement | ||
IMFMediaEngineEx::SetCurrentTime/Ex(). | ||
|
||
--- | ||
dlls/mfmediaengine/main.c | 62 +++++++++++++++++++++++++++++---------- | ||
1 file changed, 47 insertions(+), 15 deletions(-) | ||
|
||
diff --git a/dlls/mfmediaengine/main.c b/dlls/mfmediaengine/main.c | ||
index 9e41d9dad84..28a273616c8 100644 | ||
index 85b4dbb471a..6aa84e1562b 100644 | ||
--- a/dlls/mfmediaengine/main.c | ||
+++ b/dlls/mfmediaengine/main.c | ||
@@ -96,6 +96,7 @@ enum media_engine_flags | ||
|
@@ -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) | ||
{ | ||
|
Oops, something went wrong.