mf: Get presentation clock flags from current time source.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0efb33c2da
commit
34ffec67a7
|
@ -841,9 +841,19 @@ static ULONG WINAPI present_clock_Release(IMFPresentationClock *iface)
|
||||||
|
|
||||||
static HRESULT WINAPI present_clock_GetClockCharacteristics(IMFPresentationClock *iface, DWORD *flags)
|
static HRESULT WINAPI present_clock_GetClockCharacteristics(IMFPresentationClock *iface, DWORD *flags)
|
||||||
{
|
{
|
||||||
FIXME("%p, %p.\n", iface, flags);
|
struct presentation_clock *clock = impl_from_IMFPresentationClock(iface);
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
return E_NOTIMPL;
|
TRACE("%p, %p.\n", iface, flags);
|
||||||
|
|
||||||
|
EnterCriticalSection(&clock->cs);
|
||||||
|
if (clock->time_source)
|
||||||
|
hr = IMFPresentationTimeSource_GetClockCharacteristics(clock->time_source, flags);
|
||||||
|
else
|
||||||
|
hr = MF_E_CLOCK_NO_TIME_SOURCE;
|
||||||
|
LeaveCriticalSection(&clock->cs);
|
||||||
|
|
||||||
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI present_clock_GetCorrelatedTime(IMFPresentationClock *iface, DWORD reserved,
|
static HRESULT WINAPI present_clock_GetCorrelatedTime(IMFPresentationClock *iface, DWORD reserved,
|
||||||
|
|
|
@ -1449,7 +1449,6 @@ static void test_presentation_clock(void)
|
||||||
ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr);
|
ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr);
|
||||||
|
|
||||||
hr = IMFPresentationClock_GetClockCharacteristics(clock, &value);
|
hr = IMFPresentationClock_GetClockCharacteristics(clock, &value);
|
||||||
todo_wine
|
|
||||||
ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr);
|
ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr);
|
||||||
|
|
||||||
value = 1;
|
value = 1;
|
||||||
|
@ -1491,9 +1490,19 @@ todo_wine
|
||||||
hr = MFCreateSystemTimeSource(&time_source);
|
hr = MFCreateSystemTimeSource(&time_source);
|
||||||
ok(hr == S_OK, "Failed to create time source, hr %#x.\n", hr);
|
ok(hr == S_OK, "Failed to create time source, hr %#x.\n", hr);
|
||||||
|
|
||||||
|
hr = IMFPresentationTimeSource_GetClockCharacteristics(time_source, &value);
|
||||||
|
ok(hr == S_OK, "Failed to get time source 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_SetTimeSource(clock, time_source);
|
hr = IMFPresentationClock_SetTimeSource(clock, time_source);
|
||||||
ok(hr == S_OK, "Failed to set time source, hr %#x.\n", hr);
|
ok(hr == S_OK, "Failed to set time source, 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);
|
||||||
|
|
||||||
/* State changes. */
|
/* State changes. */
|
||||||
for (i = 0; i < ARRAY_SIZE(clock_state_change); ++i)
|
for (i = 0; i < ARRAY_SIZE(clock_state_change); ++i)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue