Commit 2bc81c53 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mf: Forward GetCorrelatedTime() to time source.

parent f8537c5a
......@@ -857,9 +857,17 @@ static HRESULT WINAPI present_clock_GetClockCharacteristics(IMFPresentationClock
static HRESULT WINAPI present_clock_GetCorrelatedTime(IMFPresentationClock *iface, DWORD reserved,
LONGLONG *clock_time, MFTIME *system_time)
{
FIXME("%p, %#x, %p, %p.\n", iface, reserved, clock_time, system_time);
struct presentation_clock *clock = impl_from_IMFPresentationClock(iface);
HRESULT hr = MF_E_CLOCK_NO_TIME_SOURCE;
return E_NOTIMPL;
TRACE("%p, %#x, %p, %p.\n", iface, reserved, clock_time, system_time);
EnterCriticalSection(&clock->cs);
if (clock->time_source)
hr = IMFPresentationTimeSource_GetCorrelatedTime(clock->time_source, reserved, clock_time, system_time);
LeaveCriticalSection(&clock->cs);
return hr;
}
static HRESULT WINAPI present_clock_GetContinuityKey(IMFPresentationClock *iface, DWORD *key)
......
......@@ -1476,7 +1476,12 @@ static void test_presentation_clock(void)
ok(state == MFCLOCK_STATE_INVALID, "Unexpected state %d.\n", state);
hr = IMFPresentationClock_GetCorrelatedTime(clock, 0, &clock_time, &systime);
todo_wine
ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr);
hr = IMFPresentationClock_GetCorrelatedTime(clock, 0, NULL, &systime);
ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr);
hr = IMFPresentationClock_GetCorrelatedTime(clock, 0, &time, NULL);
ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr);
/* Sinks. */
......@@ -1564,6 +1569,10 @@ todo_wine
ok(hr == S_OK, "Failed to get time source time, hr %#x.\n", hr);
ok(time == clock_time, "Unexpected clock time.\n");
hr = IMFPresentationClock_GetCorrelatedTime(clock, 0, &time, &systime);
ok(hr == S_OK, "Failed to get clock time, hr %#x.\n", hr);
ok(time == clock_time, "Unexpected clock time.\n");
IMFPresentationTimeSource_Release(time_source);
hr = IMFPresentationClock_QueryInterface(clock, &IID_IMFRateControl, (void **)&rate_control);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment