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
369d73a
commit ee08754
Showing
53 changed files
with
1,032 additions
and
772 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 4ae3f8ceac4f38fd471db5f740e274420a9f27f5 Mon Sep 17 00:00:00 2001 | ||
From 6d99895f2ca9e3b74de6992296e765ae286139fd Mon Sep 17 00:00:00 2001 | ||
From: Zhiyi Zhang <[email protected]> | ||
Date: Tue, 1 Aug 2023 10:52:21 +0800 | ||
Subject: [PATCH 01/46] mf: Add seeking support for IMFMediaSession::Start(). | ||
Subject: [PATCH 01/49] 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 4f94d3c30a7..a5caad3c97a 100644 | ||
index ef707dea4de..3f3be2b84b0 100644 | ||
--- a/dlls/mf/session.c | ||
+++ b/dlls/mf/session.c | ||
@@ -110,6 +110,7 @@ enum object_state | ||
|
@@ -19,7 +19,7 @@ index 4f94d3c30a7..a5caad3c97a 100644 | |
OBJ_STATE_INVALID, | ||
}; | ||
|
||
@@ -994,10 +995,28 @@ static HRESULT session_subscribe_sources(struct media_session *session) | ||
@@ -912,10 +913,28 @@ static HRESULT session_subscribe_sources(struct media_session *session) | ||
return hr; | ||
} | ||
|
||
|
@@ -48,7 +48,7 @@ index 4f94d3c30a7..a5caad3c97a 100644 | |
HRESULT hr; | ||
UINT i; | ||
|
||
@@ -1014,6 +1033,13 @@ static void session_start(struct media_session *session, const GUID *time_format | ||
@@ -932,6 +951,13 @@ static void session_start(struct media_session *session, const GUID *time_format | ||
|
||
/* fallthrough */ | ||
case SESSION_STATE_PAUSED: | ||
|
@@ -62,7 +62,7 @@ index 4f94d3c30a7..a5caad3c97a 100644 | |
|
||
session->presentation.time_format = *time_format; | ||
session->presentation.start_position.vt = VT_EMPTY; | ||
@@ -1027,6 +1053,14 @@ static void session_start(struct media_session *session, const GUID *time_format | ||
@@ -945,6 +971,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 4f94d3c30a7..a5caad3c97a 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); | ||
@@ -1047,12 +1081,22 @@ static void session_start(struct media_session *session, const GUID *time_format | ||
@@ -965,12 +999,22 @@ static void session_start(struct media_session *session, const GUID *time_format | ||
} | ||
} | ||
|
||
|
@@ -104,7 +104,7 @@ index 4f94d3c30a7..a5caad3c97a 100644 | |
default: | ||
session_command_complete_with_event(session, MESessionStarted, MF_E_INVALIDREQUEST, NULL); | ||
break; | ||
@@ -2305,6 +2349,9 @@ static HRESULT WINAPI mfsession_Start(IMFMediaSession *iface, const GUID *format | ||
@@ -2206,6 +2250,9 @@ static HRESULT WINAPI mfsession_Start(IMFMediaSession *iface, const GUID *format | ||
if (!start_position) | ||
return E_POINTER; | ||
|
||
|
@@ -114,7 +114,7 @@ index 4f94d3c30a7..a5caad3c97a 100644 | |
if (FAILED(hr = create_session_op(SESSION_CMD_START, &op))) | ||
return hr; | ||
|
||
@@ -4038,8 +4085,6 @@ static HRESULT WINAPI session_events_callback_Invoke(IMFAsyncCallback *iface, IM | ||
@@ -3714,8 +3761,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 2eeb0df8121d611c9dc8bc4552ff1ab6fd69d7c1 Mon Sep 17 00:00:00 2001 | ||
From d2546730e1c900ceb2688ba94cb3433777099580 Mon Sep 17 00:00:00 2001 | ||
From: Zhiyi Zhang <[email protected]> | ||
Date: Tue, 8 Aug 2023 15:24:34 +0800 | ||
Subject: [PATCH 02/46] mf/tests: Add a create_media_session_with_source_sink() | ||
Subject: [PATCH 02/49] 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 9382d8cae35..58d8ec73c4f 100644 | ||
index 0a34329bd75..e0bcedac20f 100644 | ||
--- a/dlls/mf/tests/mf.c | ||
+++ b/dlls/mf/tests/mf.c | ||
@@ -4996,6 +4996,53 @@ static void test_sample_grabber_is_mediatype_supported(void) | ||
@@ -4995,6 +4995,53 @@ static void test_sample_grabber_is_mediatype_supported(void) | ||
IMFSampleGrabberSinkCallback_Release(grabber_callback); | ||
} | ||
|
||
|
@@ -66,7 +66,7 @@ index 9382d8cae35..58d8ec73c4f 100644 | |
static void test_sample_grabber_orientation(GUID subtype) | ||
{ | ||
media_type_desc video_rgb32_desc = | ||
@@ -5005,17 +5052,12 @@ static void test_sample_grabber_orientation(GUID subtype) | ||
@@ -5004,17 +5051,12 @@ static void test_sample_grabber_orientation(GUID subtype) | ||
}; | ||
|
||
struct test_grabber_callback *grabber_callback; | ||
|
@@ -84,7 +84,7 @@ index 9382d8cae35..58d8ec73c4f 100644 | |
HRESULT hr; | ||
DWORD res; | ||
|
||
@@ -5036,33 +5078,6 @@ static void test_sample_grabber_orientation(GUID subtype) | ||
@@ -5035,33 +5077,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 9382d8cae35..58d8ec73c4f 100644 | |
hr = MFCreateMediaType(&output_type); | ||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); | ||
init_media_type(output_type, video_rgb32_desc, -1); | ||
@@ -5070,18 +5085,7 @@ static void test_sample_grabber_orientation(GUID subtype) | ||
@@ -5069,18 +5084,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 9595a07ba1657ee66afd24c79dc66ee3b98c3c3f Mon Sep 17 00:00:00 2001 | ||
From 23eb22d6b249a18679b1743f734f2c9c4bcf518f Mon Sep 17 00:00:00 2001 | ||
From: Zhiyi Zhang <[email protected]> | ||
Date: Mon, 7 Aug 2023 11:52:20 +0800 | ||
Subject: [PATCH 03/46] mf/tests: Test IMFMediaSession::Start(). | ||
Subject: [PATCH 03/49] 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 58d8ec73c4f..240cbf194ea 100644 | ||
index e0bcedac20f..f164a04b989 100644 | ||
--- a/dlls/mf/tests/mf.c | ||
+++ b/dlls/mf/tests/mf.c | ||
@@ -2087,6 +2087,448 @@ static IMFMediaSource *create_media_source(const WCHAR *name, const WCHAR *mime) | ||
@@ -2086,6 +2086,448 @@ static IMFMediaSource *create_media_source(const WCHAR *name, const WCHAR *mime) | ||
return source; | ||
} | ||
|
||
|
@@ -460,7 +460,7 @@ index 58d8ec73c4f..240cbf194ea 100644 | |
static void test_media_session_events(void) | ||
{ | ||
static const media_type_desc audio_float_44100 = | ||
@@ -2888,27 +3330,27 @@ static ULONG WINAPI test_grabber_callback_Release(IMFSampleGrabberSinkCallback * | ||
@@ -2887,27 +3329,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 58d8ec73c4f..240cbf194ea 100644 | |
} | ||
|
||
static HRESULT WINAPI test_grabber_callback_OnSetPresentationClock(IMFSampleGrabberSinkCallback *iface, | ||
@@ -4996,9 +5438,9 @@ static void test_sample_grabber_is_mediatype_supported(void) | ||
@@ -4995,9 +5437,9 @@ static void test_sample_grabber_is_mediatype_supported(void) | ||
IMFSampleGrabberSinkCallback_Release(grabber_callback); | ||
} | ||
|
||
|
@@ -505,7 +505,7 @@ index 58d8ec73c4f..240cbf194ea 100644 | |
{ | ||
IMFTopologyNode *src_node, *sink_node; | ||
IMFPresentationDescriptor *pd; | ||
@@ -5026,6 +5468,11 @@ static void create_media_session_with_source_sink(IMFMediaSource *source, IMFAct | ||
@@ -5025,6 +5467,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 58d8ec73c4f..240cbf194ea 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); | ||
@@ -5085,7 +5532,7 @@ static void test_sample_grabber_orientation(GUID subtype) | ||
@@ -5084,7 +5531,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 58d8ec73c4f..240cbf194ea 100644 | |
|
||
propvar.vt = VT_EMPTY; | ||
hr = IMFMediaSession_Start(session, &GUID_NULL, &propvar); | ||
@@ -7286,6 +7733,246 @@ static void test_MFCreateSequencerSegmentOffset(void) | ||
@@ -7280,6 +7727,246 @@ static void test_MFCreateSequencerSegmentOffset(void) | ||
PropVariantClear(&propvar); | ||
} | ||
|
||
|
@@ -773,7 +773,7 @@ index 58d8ec73c4f..240cbf194ea 100644 | |
START_TEST(mf) | ||
{ | ||
init_functions(); | ||
@@ -7322,4 +8009,5 @@ START_TEST(mf) | ||
@@ -7316,4 +8003,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 0f295094bd9483e854e2aa0a8b3c2d8fe90d77fa Mon Sep 17 00:00:00 2001 | ||
From c9cb24b06e0d2b41d9026eeddc929474006a606d Mon Sep 17 00:00:00 2001 | ||
From: Zhiyi Zhang <[email protected]> | ||
Date: Fri, 28 Jul 2023 18:04:30 +0800 | ||
Subject: [PATCH 04/46] mfmediaengine: Implement | ||
Subject: [PATCH 04/49] 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 85b4dbb471a..6aa84e1562b 100644 | ||
index 9e41d9dad84..28a273616c8 100644 | ||
--- a/dlls/mfmediaengine/main.c | ||
+++ b/dlls/mfmediaengine/main.c | ||
@@ -96,6 +96,7 @@ enum media_engine_flags | ||
|
@@ -36,7 +36,7 @@ index 85b4dbb471a..6aa84e1562b 100644 | |
IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PLAYING, 0, 0); | ||
break; | ||
case MESessionEnded: | ||
@@ -1844,19 +1852,9 @@ static double WINAPI media_engine_GetCurrentTime(IMFMediaEngineEx *iface) | ||
@@ -1846,19 +1854,9 @@ static double WINAPI media_engine_GetCurrentTime(IMFMediaEngineEx *iface) | ||
|
||
static HRESULT WINAPI media_engine_SetCurrentTime(IMFMediaEngineEx *iface, double time) | ||
{ | ||
|
@@ -58,7 +58,7 @@ index 85b4dbb471a..6aa84e1562b 100644 | |
} | ||
|
||
static double WINAPI media_engine_GetStartTime(IMFMediaEngineEx *iface) | ||
@@ -3135,9 +3133,43 @@ static HRESULT WINAPI media_engine_SetRealTimeMode(IMFMediaEngineEx *iface, BOOL | ||
@@ -3059,9 +3057,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.