Nikolay Sivov : mf: Return presentation clock properties.
Alexandre Julliard
julliard at winehq.org
Fri May 31 15:53:31 CDT 2019
Module: wine
Branch: master
Commit: bd2e2141b0031ca5d0dc11f95effac3cc40b9c23
URL: https://source.winehq.org/git/wine.git/?a=commit;h=bd2e2141b0031ca5d0dc11f95effac3cc40b9c23
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Fri May 31 13:11:31 2019 +0300
mf: Return presentation clock properties.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mf/session.c | 7 +------
dlls/mf/tests/mf.c | 9 ++++++++-
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/dlls/mf/session.c b/dlls/mf/session.c
index 9c2826f..14aac77 100644
--- a/dlls/mf/session.c
+++ b/dlls/mf/session.c
@@ -894,15 +894,10 @@ static HRESULT WINAPI present_clock_GetProperties(IMFPresentationClock *iface, M
TRACE("%p, %p.\n", iface, props);
EnterCriticalSection(&clock->cs);
-
if (clock->time_source)
- {
- FIXME("%p, %p.\n", iface, props);
- hr = E_NOTIMPL;
- }
+ hr = IMFPresentationTimeSource_GetProperties(clock->time_source, props);
else
hr = MF_E_CLOCK_NO_TIME_SOURCE;
-
LeaveCriticalSection(&clock->cs);
return hr;
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index e07c824..b710d0a 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -1427,9 +1427,9 @@ static void test_presentation_clock(void)
};
IMFClockStateSink test_sink = { &test_clock_sink_vtbl };
IMFPresentationTimeSource *time_source;
+ MFCLOCK_PROPERTIES props, props2;
IMFRateControl *rate_control;
IMFPresentationClock *clock;
- MFCLOCK_PROPERTIES props;
IMFShutdown *shutdown;
LONGLONG clock_time;
MFCLOCK_STATE state;
@@ -1498,11 +1498,18 @@ todo_wine
hr = IMFPresentationClock_SetTimeSource(clock, time_source);
ok(hr == S_OK, "Failed to set time source, hr %#x.\n", hr);
+ hr = IMFPresentationTimeSource_GetProperties(time_source, &props2);
+ ok(hr == S_OK, "Failed to get time source properties, hr %#x.\n", hr);
+
hr = IMFPresentationClock_GetClockCharacteristics(clock, &value);
ok(hr == S_OK, "Failed to get clock flags, hr %#x.\n", hr);
ok(value == (MFCLOCK_CHARACTERISTICS_FLAG_FREQUENCY_10MHZ | MFCLOCK_CHARACTERISTICS_FLAG_IS_SYSTEM_CLOCK),
"Unexpected clock flags %#x.\n", value);
+ hr = IMFPresentationClock_GetProperties(clock, &props);
+ ok(hr == S_OK, "Failed to get clock properties, hr %#x.\n", hr);
+ ok(!memcmp(&props, &props2, sizeof(props)), "Unexpected clock properties.\n");
+
/* State changes. */
for (i = 0; i < ARRAY_SIZE(clock_state_change); ++i)
{
More information about the wine-cvs
mailing list