Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfmediaengine/main.c | 4 ++++ dlls/mfmediaengine/tests/mfmediaengine.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/mfmediaengine/main.c b/dlls/mfmediaengine/main.c index 5c00c10f718..99beb17e429 100644 --- a/dlls/mfmediaengine/main.c +++ b/dlls/mfmediaengine/main.c @@ -1464,11 +1464,15 @@ static HRESULT WINAPI media_engine_GetCurrentSource(IMFMediaEngineEx *iface, BST *url = NULL;
EnterCriticalSection(&engine->cs); + + if (engine->flags & FLAGS_ENGINE_SHUT_DOWN) + hr = MF_E_SHUTDOWN; if (engine->current_source) { if (!(*url = SysAllocString(engine->current_source))) hr = E_OUTOFMEMORY; } + LeaveCriticalSection(&engine->cs);
return hr; diff --git a/dlls/mfmediaengine/tests/mfmediaengine.c b/dlls/mfmediaengine/tests/mfmediaengine.c index 8584554a2b6..6448e7f2169 100644 --- a/dlls/mfmediaengine/tests/mfmediaengine.c +++ b/dlls/mfmediaengine/tests/mfmediaengine.c @@ -319,7 +319,6 @@ static void test_Shutdown(void) ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
hr = IMFMediaEngine_GetCurrentSource(media_engine, &str); -todo_wine ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
state = IMFMediaEngine_GetNetworkState(media_engine);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfmediaengine/main.c | 32 ++++++++++++++---------- dlls/mfmediaengine/tests/mfmediaengine.c | 1 - 2 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/dlls/mfmediaengine/main.c b/dlls/mfmediaengine/main.c index 99beb17e429..87851cee9c4 100644 --- a/dlls/mfmediaengine/main.c +++ b/dlls/mfmediaengine/main.c @@ -1784,31 +1784,37 @@ static HRESULT WINAPI media_engine_SetLoop(IMFMediaEngineEx *iface, BOOL loop) static HRESULT WINAPI media_engine_Play(IMFMediaEngineEx *iface) { struct media_engine *engine = impl_from_IMFMediaEngineEx(iface); + HRESULT hr = S_OK;
TRACE("%p.\n", iface);
EnterCriticalSection(&engine->cs);
- IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS, 0, 0); - - if (!(engine->flags & FLAGS_ENGINE_WAITING)) + if (engine->flags & FLAGS_ENGINE_SHUT_DOWN) + hr = MF_E_SHUTDOWN; + else { - media_engine_set_flag(engine, FLAGS_ENGINE_PAUSED | FLAGS_ENGINE_IS_ENDED, FALSE); - IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PLAY, 0, 0); + IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS, 0, 0);
- if (!(engine->flags & FLAGS_ENGINE_SOURCE_PENDING)) - media_engine_start_playback(engine); - else - media_engine_set_flag(engine, FLAGS_ENGINE_PLAY_PENDING, TRUE); + if (!(engine->flags & FLAGS_ENGINE_WAITING)) + { + media_engine_set_flag(engine, FLAGS_ENGINE_PAUSED | FLAGS_ENGINE_IS_ENDED, FALSE); + IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PLAY, 0, 0);
- media_engine_set_flag(engine, FLAGS_ENGINE_WAITING, TRUE); - } + if (!(engine->flags & FLAGS_ENGINE_SOURCE_PENDING)) + media_engine_start_playback(engine); + else + media_engine_set_flag(engine, FLAGS_ENGINE_PLAY_PENDING, TRUE);
- IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_WAITING, 0, 0); + media_engine_set_flag(engine, FLAGS_ENGINE_WAITING, TRUE); + } + + IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_WAITING, 0, 0); + }
LeaveCriticalSection(&engine->cs);
- return S_OK; + return hr; }
static HRESULT WINAPI media_engine_Pause(IMFMediaEngineEx *iface) diff --git a/dlls/mfmediaengine/tests/mfmediaengine.c b/dlls/mfmediaengine/tests/mfmediaengine.c index 6448e7f2169..ac34bd7c4cd 100644 --- a/dlls/mfmediaengine/tests/mfmediaengine.c +++ b/dlls/mfmediaengine/tests/mfmediaengine.c @@ -414,7 +414,6 @@ todo_wine ok(!!state, "Unexpected state.\n");
hr = IMFMediaEngine_Play(media_engine); -todo_wine ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
hr = IMFMediaEngine_Pause(media_engine);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfmediaengine/main.c | 22 ++++++++++++++-------- dlls/mfmediaengine/tests/mfmediaengine.c | 1 - 2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/dlls/mfmediaengine/main.c b/dlls/mfmediaengine/main.c index 87851cee9c4..490d1630e95 100644 --- a/dlls/mfmediaengine/main.c +++ b/dlls/mfmediaengine/main.c @@ -1820,25 +1820,31 @@ static HRESULT WINAPI media_engine_Play(IMFMediaEngineEx *iface) static HRESULT WINAPI media_engine_Pause(IMFMediaEngineEx *iface) { struct media_engine *engine = impl_from_IMFMediaEngineEx(iface); + HRESULT hr = S_OK;
TRACE("%p.\n", iface);
EnterCriticalSection(&engine->cs);
- if (!(engine->flags & FLAGS_ENGINE_PAUSED)) + if (engine->flags & FLAGS_ENGINE_SHUT_DOWN) + hr = MF_E_SHUTDOWN; + else { - media_engine_set_flag(engine, FLAGS_ENGINE_WAITING | FLAGS_ENGINE_IS_ENDED, FALSE); - media_engine_set_flag(engine, FLAGS_ENGINE_PAUSED, TRUE); + if (!(engine->flags & FLAGS_ENGINE_PAUSED)) + { + media_engine_set_flag(engine, FLAGS_ENGINE_WAITING | FLAGS_ENGINE_IS_ENDED, FALSE); + media_engine_set_flag(engine, FLAGS_ENGINE_PAUSED, TRUE);
- IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_TIMEUPDATE, 0, 0); - IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PAUSE, 0, 0); - } + IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_TIMEUPDATE, 0, 0); + IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PAUSE, 0, 0); + }
- IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS, 0, 0); + IMFMediaEngineNotify_EventNotify(engine->callback, MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS, 0, 0); + }
LeaveCriticalSection(&engine->cs);
- return S_OK; + return hr; }
static BOOL WINAPI media_engine_GetMuted(IMFMediaEngineEx *iface) diff --git a/dlls/mfmediaengine/tests/mfmediaengine.c b/dlls/mfmediaengine/tests/mfmediaengine.c index ac34bd7c4cd..388af4b1877 100644 --- a/dlls/mfmediaengine/tests/mfmediaengine.c +++ b/dlls/mfmediaengine/tests/mfmediaengine.c @@ -417,7 +417,6 @@ todo_wine ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
hr = IMFMediaEngine_Pause(media_engine); -todo_wine ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
state = IMFMediaEngine_GetMuted(media_engine);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfmediaengine/main.c | 6 +++++- dlls/mfmediaengine/tests/mfmediaengine.c | 1 - 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/mfmediaengine/main.c b/dlls/mfmediaengine/main.c index 490d1630e95..91f1224f4b0 100644 --- a/dlls/mfmediaengine/main.c +++ b/dlls/mfmediaengine/main.c @@ -1525,8 +1525,12 @@ static HRESULT WINAPI media_engine_GetBuffered(IMFMediaEngineEx *iface, IMFMedia return hr;
EnterCriticalSection(&engine->cs); - if (!isnan(engine->duration)) + + if (engine->flags & FLAGS_ENGINE_SHUT_DOWN) + hr = MF_E_SHUTDOWN; + else if (!isnan(engine->duration)) hr = IMFMediaTimeRange_AddRange(*range, 0.0, engine->duration); + LeaveCriticalSection(&engine->cs);
return hr; diff --git a/dlls/mfmediaengine/tests/mfmediaengine.c b/dlls/mfmediaengine/tests/mfmediaengine.c index 388af4b1877..6e201893b0c 100644 --- a/dlls/mfmediaengine/tests/mfmediaengine.c +++ b/dlls/mfmediaengine/tests/mfmediaengine.c @@ -341,7 +341,6 @@ static void test_Shutdown(void) ok(state == 100, "Unexpected state %d.\n", state);
hr = IMFMediaEngine_GetBuffered(media_engine, &time_range); -todo_wine ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
hr = IMFMediaEngine_Load(media_engine);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfmediaengine/main.c | 60 ++++++++++++++++++++++-- dlls/mfmediaengine/tests/mfmediaengine.c | 5 -- 2 files changed, 55 insertions(+), 10 deletions(-)
diff --git a/dlls/mfmediaengine/main.c b/dlls/mfmediaengine/main.c index 91f1224f4b0..84d7677a328 100644 --- a/dlls/mfmediaengine/main.c +++ b/dlls/mfmediaengine/main.c @@ -1538,16 +1538,36 @@ static HRESULT WINAPI media_engine_GetBuffered(IMFMediaEngineEx *iface, IMFMedia
static HRESULT WINAPI media_engine_Load(IMFMediaEngineEx *iface) { + struct media_engine *engine = impl_from_IMFMediaEngineEx(iface); + HRESULT hr = E_NOTIMPL; + FIXME("(%p): stub.\n", iface);
- return E_NOTIMPL; + EnterCriticalSection(&engine->cs); + + if (engine->flags & FLAGS_ENGINE_SHUT_DOWN) + hr = MF_E_SHUTDOWN; + + LeaveCriticalSection(&engine->cs); + + return hr; }
static HRESULT WINAPI media_engine_CanPlayType(IMFMediaEngineEx *iface, BSTR type, MF_MEDIA_ENGINE_CANPLAY *answer) { + struct media_engine *engine = impl_from_IMFMediaEngineEx(iface); + HRESULT hr = E_NOTIMPL; + FIXME("(%p, %s, %p): stub.\n", iface, debugstr_w(type), answer);
- return E_NOTIMPL; + EnterCriticalSection(&engine->cs); + + if (engine->flags & FLAGS_ENGINE_SHUT_DOWN) + hr = MF_E_SHUTDOWN; + + LeaveCriticalSection(&engine->cs); + + return hr; }
static USHORT WINAPI media_engine_GetReadyState(IMFMediaEngineEx *iface) @@ -1595,9 +1615,19 @@ static double WINAPI media_engine_GetCurrentTime(IMFMediaEngineEx *iface)
static HRESULT WINAPI media_engine_SetCurrentTime(IMFMediaEngineEx *iface, double time) { + struct media_engine *engine = impl_from_IMFMediaEngineEx(iface); + HRESULT hr = E_NOTIMPL; + FIXME("(%p, %f): stub.\n", iface, time);
- return E_NOTIMPL; + EnterCriticalSection(&engine->cs); + + if (engine->flags & FLAGS_ENGINE_SHUT_DOWN) + hr = MF_E_SHUTDOWN; + + LeaveCriticalSection(&engine->cs); + + return hr; }
static double WINAPI media_engine_GetStartTime(IMFMediaEngineEx *iface) @@ -1705,16 +1735,36 @@ static HRESULT WINAPI media_engine_SetPlaybackRate(IMFMediaEngineEx *iface, doub
static HRESULT WINAPI media_engine_GetPlayed(IMFMediaEngineEx *iface, IMFMediaTimeRange **played) { + struct media_engine *engine = impl_from_IMFMediaEngineEx(iface); + HRESULT hr = E_NOTIMPL; + FIXME("(%p, %p): stub.\n", iface, played);
- return E_NOTIMPL; + EnterCriticalSection(&engine->cs); + + if (engine->flags & FLAGS_ENGINE_SHUT_DOWN) + hr = MF_E_SHUTDOWN; + + LeaveCriticalSection(&engine->cs); + + return hr; }
static HRESULT WINAPI media_engine_GetSeekable(IMFMediaEngineEx *iface, IMFMediaTimeRange **seekable) { + struct media_engine *engine = impl_from_IMFMediaEngineEx(iface); + HRESULT hr = E_NOTIMPL; + FIXME("(%p, %p): stub.\n", iface, seekable);
- return E_NOTIMPL; + EnterCriticalSection(&engine->cs); + + if (engine->flags & FLAGS_ENGINE_SHUT_DOWN) + hr = MF_E_SHUTDOWN; + + LeaveCriticalSection(&engine->cs); + + return hr; }
static BOOL WINAPI media_engine_IsEnded(IMFMediaEngineEx *iface) diff --git a/dlls/mfmediaengine/tests/mfmediaengine.c b/dlls/mfmediaengine/tests/mfmediaengine.c index 6e201893b0c..00690b25ebe 100644 --- a/dlls/mfmediaengine/tests/mfmediaengine.c +++ b/dlls/mfmediaengine/tests/mfmediaengine.c @@ -344,12 +344,10 @@ static void test_Shutdown(void) ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
hr = IMFMediaEngine_Load(media_engine); -todo_wine ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
str = SysAllocString(L"video/mp4"); hr = IMFMediaEngine_CanPlayType(media_engine, str, &state); -todo_wine ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); SysFreeString(str);
@@ -363,7 +361,6 @@ todo_wine ok(val == 0.0, "Unexpected time %f.\n", val);
hr = IMFMediaEngine_SetCurrentTime(media_engine, 1.0); -todo_wine ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
val = IMFMediaEngine_GetStartTime(media_engine); @@ -382,11 +379,9 @@ todo_wine ok(val == 1.0, "Unexpected rate %f.\n", val);
hr = IMFMediaEngine_GetPlayed(media_engine, &time_range); -todo_wine ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
hr = IMFMediaEngine_GetSeekable(media_engine, &time_range); -todo_wine ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
state = IMFMediaEngine_IsEnded(media_engine);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfmediaengine/main.c | 28 ++++++- dlls/mfmediaengine/tests/mfmediaengine.c | 101 ++++++++++++++++++++--- 2 files changed, 115 insertions(+), 14 deletions(-)
diff --git a/dlls/mfmediaengine/main.c b/dlls/mfmediaengine/main.c index 84d7677a328..4b5a3f83446 100644 --- a/dlls/mfmediaengine/main.c +++ b/dlls/mfmediaengine/main.c @@ -653,13 +653,35 @@ static BOOL WINAPI time_range_ContainsTime(IMFMediaTimeRange *iface, double time static HRESULT WINAPI time_range_AddRange(IMFMediaTimeRange *iface, double start, double end) { struct time_range *range = impl_from_IMFMediaTimeRange(iface); + struct range *c; + size_t i;
TRACE("%p, %.8e, %.8e.\n", iface, start, end);
- if (range->count) + for (i = 0; i < range->count; ++i) { - FIXME("Range merging is not implemented.\n"); - return E_NOTIMPL; + c = &range->ranges[i]; + + /* New range is fully contained within existing one. */ + if (c->start <= start && c->end >= end) + return S_OK; + + /* New range fully contains existing one. */ + if (c->start >= start && c->end <= end) + { + c->start = start; + c->end = end; + return S_OK; + } + + /* Merge if ranges intersect. */ + if ((start >= c->start && start <= c->end) || + (end >= c->start && end <= c->end)) + { + c->start = min(c->start, start); + c->end = max(c->end, end); + return S_OK; + } }
if (!mf_array_reserve((void **)&range->ranges, &range->capacity, range->count + 1, sizeof(*range->ranges))) diff --git a/dlls/mfmediaengine/tests/mfmediaengine.c b/dlls/mfmediaengine/tests/mfmediaengine.c index 00690b25ebe..d5a118677e5 100644 --- a/dlls/mfmediaengine/tests/mfmediaengine.c +++ b/dlls/mfmediaengine/tests/mfmediaengine.c @@ -729,7 +729,6 @@ static void test_time_range(void) ok(end == 1.0, "Unexpected end %.e.\n", end);
hr = IMFMediaTimeRange_AddRange(range, 2.0, 3.0); -todo_wine ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
count = IMFMediaTimeRange_GetLength(range); @@ -737,49 +736,129 @@ todo_wine
hr = IMFMediaTimeRange_GetStart(range, 0, &start); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); -todo_wine ok(start == 2.0, "Unexpected start %.8e.\n", start);
hr = IMFMediaTimeRange_GetEnd(range, 0, &end); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); -todo_wine ok(end == 3.0, "Unexpected end %.8e.\n", end);
hr = IMFMediaTimeRange_AddRange(range, 10.0, 9.0); -todo_wine ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
count = IMFMediaTimeRange_GetLength(range); -todo_wine ok(count == 2, "Unexpected range count.\n");
hr = IMFMediaTimeRange_GetStart(range, 0, &start); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); -todo_wine ok(start == 2.0, "Unexpected start %.8e.\n", start);
hr = IMFMediaTimeRange_GetEnd(range, 0, &end); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); -todo_wine ok(end == 3.0, "Unexpected end %.8e.\n", end);
start = 0.0; hr = IMFMediaTimeRange_GetStart(range, 1, &start); -todo_wine { ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(start == 10.0, "Unexpected start %.8e.\n", start); -} + hr = IMFMediaTimeRange_GetEnd(range, 1, &end); -todo_wine { ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(end == 9.0, "Unexpected end %.8e.\n", end); -} + + hr = IMFMediaTimeRange_AddRange(range, 2.0, 9.1); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + count = IMFMediaTimeRange_GetLength(range); + ok(count == 2, "Unexpected range count.\n"); + + hr = IMFMediaTimeRange_GetStart(range, 0, &start); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(start == 2.0, "Unexpected start %.8e.\n", start); + + hr = IMFMediaTimeRange_GetEnd(range, 0, &end); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(end == 9.1, "Unexpected end %.8e.\n", end); + + hr = IMFMediaTimeRange_GetStart(range, 1, &start); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(start == 10.0, "Unexpected start %.8e.\n", start); + + hr = IMFMediaTimeRange_GetEnd(range, 1, &end); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(end == 9.0, "Unexpected end %.8e.\n", end); + + hr = IMFMediaTimeRange_AddRange(range, 8.5, 2.5); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + count = IMFMediaTimeRange_GetLength(range); + ok(count == 2, "Unexpected range count.\n"); + + hr = IMFMediaTimeRange_GetStart(range, 0, &start); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(start == 2.0, "Unexpected start %.8e.\n", start); + + hr = IMFMediaTimeRange_GetEnd(range, 0, &end); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(end == 9.1, "Unexpected end %.8e.\n", end); + + hr = IMFMediaTimeRange_AddRange(range, 20.0, 20.0); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + count = IMFMediaTimeRange_GetLength(range); + ok(count == 3, "Unexpected range count.\n"); + hr = IMFMediaTimeRange_Clear(range); ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
count = IMFMediaTimeRange_GetLength(range); ok(!count, "Unexpected range count.\n");
+ /* Intersect */ + hr = IMFMediaTimeRange_AddRange(range, 5.0, 10.0); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMFMediaTimeRange_AddRange(range, 6.0, 12.0); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMFMediaTimeRange_GetStart(range, 0, &start); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(start == 5.0, "Unexpected start %.8e.\n", start); + + hr = IMFMediaTimeRange_GetEnd(range, 0, &end); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(end == 12.0, "Unexpected end %.8e.\n", end); + + count = IMFMediaTimeRange_GetLength(range); + ok(count == 1, "Unexpected range count.\n"); + + hr = IMFMediaTimeRange_AddRange(range, 4.0, 6.0); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + count = IMFMediaTimeRange_GetLength(range); + ok(count == 1, "Unexpected range count.\n"); + + hr = IMFMediaTimeRange_GetStart(range, 0, &start); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(start == 4.0, "Unexpected start %.8e.\n", start); + + hr = IMFMediaTimeRange_GetEnd(range, 0, &end); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(end == 12.0, "Unexpected end %.8e.\n", end); + + hr = IMFMediaTimeRange_AddRange(range, 5.0, 3.0); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + count = IMFMediaTimeRange_GetLength(range); + ok(count == 1, "Unexpected range count.\n"); + + hr = IMFMediaTimeRange_GetStart(range, 0, &start); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(start == 4.0, "Unexpected start %.8e.\n", start); + + hr = IMFMediaTimeRange_GetEnd(range, 0, &end); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(end == 12.0, "Unexpected end %.8e.\n", end); + IMFMediaTimeRange_Release(range); }