Commit 13106b2b authored by Bernhard Kölbl's avatar Bernhard Kölbl Committed by Alexandre Julliard

mfmediaengine: Implement RemoveAllEffects().

parent ffba650a
......@@ -2719,9 +2719,22 @@ static HRESULT WINAPI media_engine_InsertAudioEffect(IMFMediaEngineEx *iface, IU
static HRESULT WINAPI media_engine_RemoveAllEffects(IMFMediaEngineEx *iface)
{
FIXME("%p stub.\n", iface);
struct media_engine *engine = impl_from_IMFMediaEngineEx(iface);
HRESULT hr = S_OK;
return E_NOTIMPL;
TRACE("%p.\n", iface);
EnterCriticalSection(&engine->cs);
if (engine->flags & FLAGS_ENGINE_SHUT_DOWN)
hr = MF_E_SHUTDOWN;
else
{
media_engine_clear_effects(&engine->audio_effects);
media_engine_clear_effects(&engine->video_effects);
}
LeaveCriticalSection(&engine->cs);
return hr;
}
static HRESULT WINAPI media_engine_SetTimelineMarkerTimer(IMFMediaEngineEx *iface, double timeout)
......
......@@ -1829,7 +1829,7 @@ static void test_effect(void)
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaEngineEx_RemoveAllEffects(media_engine_ex);
todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = passthrough_mft_create(0, &video_effect);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
......@@ -1846,20 +1846,17 @@ static void test_effect(void)
EXPECT_REF(&video_effect2->IMFTransform_iface, 2);
hr = IMFMediaEngineEx_RemoveAllEffects(media_engine_ex);
todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine EXPECT_REF(&video_effect->IMFTransform_iface, 1);
todo_wine EXPECT_REF(&video_effect2->IMFTransform_iface, 1);
if (FAILED(hr)) /* Temporary skip */
goto done;
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(&video_effect->IMFTransform_iface, 1);
EXPECT_REF(&video_effect2->IMFTransform_iface, 1);
hr = IMFMediaEngineEx_InsertVideoEffect(media_engine_ex, (IUnknown *)&video_effect->IMFTransform_iface, FALSE);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine EXPECT_REF(&video_effect->IMFTransform_iface, 2);
EXPECT_REF(&video_effect->IMFTransform_iface, 2);
hr = IMFMediaEngineEx_InsertVideoEffect(media_engine_ex, (IUnknown *)&video_effect2->IMFTransform_iface, FALSE);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine EXPECT_REF(&video_effect2->IMFTransform_iface, 2);
EXPECT_REF(&video_effect2->IMFTransform_iface, 2);
hr = passthrough_mft_create(0, &audio_effect);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
......@@ -1911,7 +1908,7 @@ done:
IMFMediaEngineEx_Shutdown(media_engine_ex);
hr = IMFMediaEngineEx_RemoveAllEffects(media_engine_ex);
todo_wine ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
IMFMediaEngineEx_Release(media_engine_ex);
}
......
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