Module: wine Branch: master Commit: 57eddc004b3337382f5dacd0b6cae8ac4295bfae URL: https://source.winehq.org/git/wine.git/?a=commit;h=57eddc004b3337382f5dacd0b...
Author: Zebediah Figura z.figura12@gmail.com Date: Sun Nov 15 11:04:33 2020 -0600
quartz/tests: Test adding and removing filters while the graph is running.
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/quartz/tests/filtergraph.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 4d2a3195b6d..2e1a8b7ad66 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -3708,6 +3708,35 @@ todo_wine hr = IMediaControl_Stop(control); ok(hr == S_OK, "Got hr %#x.\n", hr);
+ /* Add and remove a filter while the graph is running. */ + + hr = IFilterGraph2_AddFilter(graph, &dummy.IBaseFilter_iface, L"dummy"); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(dummy.state == State_Stopped, "Got state %#x.\n", dummy.state); + + hr = IMediaControl_Pause(control); + ok(hr == S_OK, "Got hr %#x.\n", hr); + check_filter_state(graph, State_Paused); + ok(dummy.state == State_Paused, "Got state %#x.\n", dummy.state); + + hr = IFilterGraph2_RemoveFilter(graph, &dummy.IBaseFilter_iface); + ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(dummy.state == State_Paused, "Got state %#x.\n", dummy.state); + + hr = IFilterGraph2_AddFilter(graph, &dummy.IBaseFilter_iface, L"dummy"); + ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(dummy.state == State_Paused, "Got state %#x.\n", dummy.state); + + if (dummy.state == State_Stopped) + dummy.expect_stop_prev = State_Stopped; + hr = IMediaControl_Stop(control); + ok(hr == S_OK, "Got hr %#x.\n", hr); + check_filter_state(graph, State_Stopped); + + hr = IFilterGraph2_RemoveFilter(graph, &dummy.IBaseFilter_iface); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(dummy.state == State_Stopped, "Got state %#x.\n", dummy.state); + /* Destroying the graph while it's running stops all filters. */
hr = IMediaControl_Run(control);