Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/quartz/tests/filtergraph.c | 165 +++++++++++++++++++++++++++++++- 1 file changed, 161 insertions(+), 4 deletions(-)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index c663b5d8a99..7f3372e2acf 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -848,6 +848,7 @@ struct testfilter ULONG misc_flags;
IMediaSeeking IMediaSeeking_iface; + IMediaPosition IMediaPosition_iface; LONG seeking_ref; DWORD seek_caps; BOOL support_testguid, support_media_time; @@ -1315,6 +1316,10 @@ static HRESULT WINAPI testfilter_QueryInterface(IBaseFilter *iface, REFIID iid, { *out = &filter->IMediaSeeking_iface; } + else if (IsEqualGUID(iid, &IID_IMediaPosition) && filter->IMediaPosition_iface.lpVtbl) + { + *out = &filter->IMediaPosition_iface; + } else if (IsEqualGUID(iid, &IID_IReferenceClock) && filter->IReferenceClock_iface.lpVtbl) { *out = &filter->IReferenceClock_iface; @@ -1610,7 +1615,7 @@ static HRESULT WINAPI testseek_QueryPreferredFormat(IMediaSeeking *iface, GUID *
static HRESULT WINAPI testseek_GetTimeFormat(IMediaSeeking *iface, GUID *format) { - ok(0, "Unexpected call.\n"); + if (winetest_debug > 1) trace("%p->GetTimeFormat()\n", iface); return E_NOTIMPL; }
@@ -1733,6 +1738,141 @@ static const IMediaSeekingVtbl testseek_vtbl = testseek_GetPreroll, };
+static struct testfilter *impl_from_IMediaPosition(IMediaPosition *iface) +{ + return CONTAINING_RECORD(iface, struct testfilter, IMediaPosition_iface); +} + +static HRESULT WINAPI testpos_QueryInterface(IMediaPosition *iface, REFIID iid, void **out) +{ + struct testfilter *filter = impl_from_IMediaPosition(iface); + return IBaseFilter_QueryInterface(&filter->IBaseFilter_iface, iid, out); +} + +static ULONG WINAPI testpos_AddRef(IMediaPosition *iface) +{ + struct testfilter *filter = impl_from_IMediaPosition(iface); + return IBaseFilter_AddRef(&filter->IBaseFilter_iface); +} + +static ULONG WINAPI testpos_Release(IMediaPosition *iface) +{ + struct testfilter *filter = impl_from_IMediaPosition(iface); + return IBaseFilter_Release(&filter->IBaseFilter_iface); +} + +static HRESULT WINAPI testpos_GetTypeInfoCount(IMediaPosition *iface, UINT *count) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testpos_GetTypeInfo(IMediaPosition *iface, UINT index, LCID lcid, ITypeInfo **typeinfo) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testpos_GetIDsOfNames(IMediaPosition *iface, REFIID riid, LPOLESTR *names, UINT count, LCID lcid, DISPID *ids) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testpos_Invoke(IMediaPosition *iface, DISPID id, REFIID iid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *error_arg) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testpos_get_Duration(IMediaPosition *iface, REFTIME *length) +{ + if (winetest_debug > 1) trace("%p->get_Duration()\n", iface); + return E_NOTIMPL; +} + +static HRESULT WINAPI testpos_put_CurrentPosition(IMediaPosition *iface, REFTIME time) +{ + if (winetest_debug > 1) trace("%p->put_CurrentPosition(%f)\n", iface, time); + return E_NOTIMPL; +} + +static HRESULT WINAPI testpos_get_CurrentPosition(IMediaPosition *iface, REFTIME *time) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testpos_get_StopTime(IMediaPosition *iface, REFTIME *time) +{ + if (winetest_debug > 1) trace("%p->get_StopTime()\n", iface); + return E_NOTIMPL; +} + +static HRESULT WINAPI testpos_put_StopTime(IMediaPosition *iface, REFTIME time) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testpos_get_PrerollTime(IMediaPosition *iface, REFTIME *time) +{ + if (winetest_debug > 1) trace("%p->get_PrerollTime()\n", iface); + return E_NOTIMPL; +} + +static HRESULT WINAPI testpos_put_PrerollTime(IMediaPosition *iface, REFTIME time) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testpos_put_Rate(IMediaPosition *iface, double rate) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testpos_get_Rate(IMediaPosition *iface, double *rate) +{ + if (winetest_debug > 1) trace("%p->get_Rate()\n", iface); + return E_NOTIMPL; +} + +static HRESULT WINAPI testpos_CanSeekForward(IMediaPosition *iface, LONG *can_seek_forward) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testpos_CanSeekBackward(IMediaPosition *iface, LONG *can_seek_backward) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static const IMediaPositionVtbl testpos_vtbl = +{ + testpos_QueryInterface, + testpos_AddRef, + testpos_Release, + testpos_GetTypeInfoCount, + testpos_GetTypeInfo, + testpos_GetIDsOfNames, + testpos_Invoke, + testpos_get_Duration, + testpos_put_CurrentPosition, + testpos_get_CurrentPosition, + testpos_get_StopTime, + testpos_put_StopTime, + testpos_get_PrerollTime, + testpos_put_PrerollTime, + testpos_put_Rate, + testpos_get_Rate, + testpos_CanSeekForward, + testpos_CanSeekBackward, +}; + static struct testfilter *impl_from_IReferenceClock(IReferenceClock *iface) { return CONTAINING_RECORD(iface, struct testfilter, IReferenceClock_iface); @@ -3964,9 +4104,9 @@ static void test_ec_complete(void) ok(hr == S_OK, "Got hr %#x.\n", hr);
/* A filter counts as a renderer if it (1) exposes IAMFilterMiscFlags and - * reports itself as a renderer, or (2) exposes IMediaSeeking and has no - * output pins. Despite MSDN, QueryInternalConnections() does not seem to - * be used. */ + * reports itself as a renderer, or (2) exposes IMediaSeeking or + * IMediaPosition and has no output pins. Despite MSDN, + * QueryInternalConnections() does not seem to be used. */
IFilterGraph2_RemoveFilter(graph, &filter1.IBaseFilter_iface); IFilterGraph2_RemoveFilter(graph, &filter2.IBaseFilter_iface); @@ -4010,7 +4150,16 @@ static void test_ec_complete(void) ok(filter1.seeking_ref == 0, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); IFilterGraph2_RemoveFilter(graph, &filter1.IBaseFilter_iface);
+ filter1.IMediaPosition_iface.lpVtbl = &testpos_vtbl; + IFilterGraph2_AddFilter(graph, &filter1.IBaseFilter_iface, NULL); + + hr = check_ec_complete(graph, &filter1.IBaseFilter_iface); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + + IFilterGraph2_RemoveFilter(graph, &filter1.IBaseFilter_iface); + filter1.IMediaSeeking_iface.lpVtbl = NULL; + filter1.IMediaPosition_iface.lpVtbl = NULL; filter1_pin.dir = PINDIR_INPUT; filter1.pin_count = 1; filter1_pin.QueryInternalConnections_hr = S_OK; @@ -4019,6 +4168,14 @@ static void test_ec_complete(void) hr = check_ec_complete(graph, &filter1.IBaseFilter_iface); ok(hr == E_ABORT, "Got hr %#x.\n", hr);
+ IFilterGraph2_RemoveFilter(graph, &filter1.IBaseFilter_iface); + + filter1.IMediaPosition_iface.lpVtbl = &testpos_vtbl; + IFilterGraph2_AddFilter(graph, &filter1.IBaseFilter_iface, NULL); + + hr = check_ec_complete(graph, &filter1.IBaseFilter_iface); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + IMediaControl_Release(control); IMediaEvent_Release(eventsrc); IMediaEventSink_Release(eventsink);
The new test failures are expected since the renderers are now actually considered renderers by the filter graph.
Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/quartz/filtergraph.c | 7 +++++++ dlls/quartz/tests/dsoundrender.c | 8 ++++---- dlls/quartz/tests/filtergraph.c | 4 ++-- dlls/quartz/tests/videorenderer.c | 8 ++++---- 4 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 825bef9e12e..f509bdad332 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -565,6 +565,7 @@ static void update_seeking(struct filter *filter)
static BOOL is_renderer(struct filter *filter) { + IMediaPosition *media_position; IAMFilterMiscFlags *flags; BOOL ret = FALSE;
@@ -574,6 +575,12 @@ static BOOL is_renderer(struct filter *filter) ret = TRUE; IAMFilterMiscFlags_Release(flags); } + else if (SUCCEEDED(IBaseFilter_QueryInterface(filter->filter, &IID_IMediaPosition, (void **)&media_position))) + { + if (!has_output_pins(filter->filter)) + ret = TRUE; + IMediaPosition_Release(media_position); + } else { update_seeking(filter); diff --git a/dlls/quartz/tests/dsoundrender.c b/dlls/quartz/tests/dsoundrender.c index e591e1832d5..87c3706b145 100644 --- a/dlls/quartz/tests/dsoundrender.c +++ b/dlls/quartz/tests/dsoundrender.c @@ -920,7 +920,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) hr = IMediaControl_GetState(control, 1000, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - ok(!ret, "Got unexpected EC_COMPLETE.\n"); + todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = send_frame(input); todo_wine ok(hr == VFW_E_SAMPLE_REJECTED_EOS, "Got hr %#x.\n", hr); @@ -952,7 +952,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) hr = IPin_EndOfStream(pin); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - ok(!ret, "Got unexpected EC_COMPLETE.\n"); + todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n"); ret = check_ec_complete(eventsrc, 2000); todo_wine ok(ret == 1, "Expected EC_COMPLETE.\n");
@@ -978,7 +978,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) hr = IMediaControl_Stop(control); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - ok(!ret, "Got unexpected EC_COMPLETE.\n"); + todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n");
/* Test sending EOS and then flushing or stopping. */
@@ -996,7 +996,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) hr = IPin_EndOfStream(pin); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - ok(!ret, "Got unexpected EC_COMPLETE.\n"); + todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IPin_BeginFlush(pin); ok(hr == S_OK, "Got hr %#x.\n", hr); diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 7f3372e2acf..fdcfcead0be 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -4154,7 +4154,7 @@ static void test_ec_complete(void) IFilterGraph2_AddFilter(graph, &filter1.IBaseFilter_iface, NULL);
hr = check_ec_complete(graph, &filter1.IBaseFilter_iface); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr);
IFilterGraph2_RemoveFilter(graph, &filter1.IBaseFilter_iface);
@@ -4174,7 +4174,7 @@ static void test_ec_complete(void) IFilterGraph2_AddFilter(graph, &filter1.IBaseFilter_iface, NULL);
hr = check_ec_complete(graph, &filter1.IBaseFilter_iface); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr);
IMediaControl_Release(control); IMediaEvent_Release(eventsrc); diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index 22cc703a539..470652543ad 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -1143,7 +1143,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) hr = IMediaControl_GetState(control, 1000, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - ok(!ret, "Got unexpected EC_COMPLETE.\n"); + todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = join_thread(send_frame(input)); todo_wine ok(hr == E_UNEXPECTED, "Got hr %#x.\n", hr); @@ -1173,7 +1173,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) hr = IPin_EndOfStream(pin); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - ok(!ret, "Got unexpected EC_COMPLETE.\n"); + todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n"); ret = check_ec_complete(eventsrc, 1600); todo_wine ok(ret == 1, "Expected EC_COMPLETE.\n");
@@ -1199,7 +1199,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) hr = IMediaControl_Stop(control); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - ok(!ret, "Got unexpected EC_COMPLETE.\n"); + todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n");
/* Test sending EOS and then flushing or stopping. */
@@ -1213,7 +1213,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) hr = IPin_EndOfStream(pin); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - ok(!ret, "Got unexpected EC_COMPLETE.\n"); + todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IPin_BeginFlush(pin); ok(hr == S_OK, "Got hr %#x.\n", hr);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=91071
Your paranoid android.
=== w1064v1809 (32 bit report) ===
quartz: dsoundrender.c:807: Test failed: Got hr 0x80040227.
=== w1064v1809 (64 bit report) ===
quartz: dsoundrender.c:807: Test failed: Got hr 0x80040227.
=== debiant2 (32 bit Hebrew:Israel report) ===
quartz: filtergraph.c:426: Test failed: GetState() failed: 40237
Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/quartz/tests/dsoundrender.c | 2 ++ dlls/quartz/tests/videorenderer.c | 2 ++ dlls/quartz/tests/vmr9.c | 2 ++ 3 files changed, 6 insertions(+)
diff --git a/dlls/quartz/tests/dsoundrender.c b/dlls/quartz/tests/dsoundrender.c index 87c3706b145..093e901ffa4 100644 --- a/dlls/quartz/tests/dsoundrender.c +++ b/dlls/quartz/tests/dsoundrender.c @@ -909,6 +909,8 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control)
IMediaControl_QueryInterface(control, &IID_IMediaEvent, (void **)&eventsrc);
+ /* Test that EC_COMPLETE is deferred until the renderer is running. */ + hr = IMediaControl_Pause(control); ok(hr == S_FALSE, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index 470652543ad..2130c8f1122 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -1132,6 +1132,8 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control)
IMediaControl_QueryInterface(control, &IID_IMediaEvent, (void **)&eventsrc);
+ /* Test that EC_COMPLETE is deferred until the renderer is running. */ + hr = IMediaControl_Pause(control); ok(hr == S_FALSE, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index c7a84d65b7b..811392beee5 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -1283,6 +1283,8 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control)
IMediaControl_QueryInterface(control, &IID_IMediaEvent, (void **)&eventsrc);
+ /* Test that EC_COMPLETE is deferred until the renderer is running. */ + commit_allocator(input); hr = IMediaControl_Pause(control); ok(hr == S_FALSE, "Got hr %#x.\n", hr);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=91072
Your paranoid android.
=== w10pro64_ja (64 bit report) ===
quartz: videorenderer.c:1150: Test failed: Wait failed. videorenderer.c:1151: Test failed: Got hr 0x103.
Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/quartz/tests/videorenderer.c | 2 +- dlls/quartz/tests/vmr9.c | 2 +- dlls/strmbase/renderer.c | 14 +++++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index 2130c8f1122..6462ab1ab97 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -1145,7 +1145,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) hr = IMediaControl_GetState(control, 1000, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n"); + ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = join_thread(send_frame(input)); todo_wine ok(hr == E_UNEXPECTED, "Got hr %#x.\n", hr); diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 811392beee5..bfade18983d 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -1297,7 +1297,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) hr = IMediaControl_GetState(control, 1000, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n"); + ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = join_thread(send_frame(input)); todo_wine ok(hr == E_UNEXPECTED, "Got hr %#x.\n", hr); diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index ee8ff4c623f..6c3262a2f70 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -242,6 +242,8 @@ static HRESULT renderer_init_stream(struct strmbase_filter *iface) static HRESULT renderer_start_stream(struct strmbase_filter *iface, REFERENCE_TIME start) { struct strmbase_renderer *filter = impl_from_strmbase_filter(iface); + IFilterGraph *graph = filter->filter.graph; + IMediaEventSink *event_sink;
filter->stream_start = start; SetEvent(filter->state_event); @@ -252,6 +254,15 @@ static HRESULT renderer_start_stream(struct strmbase_filter *iface, REFERENCE_TI if (filter->sink.pin.peer && filter->ops->renderer_start_stream) filter->ops->renderer_start_stream(filter);
+ if (filter->eos && graph + && SUCCEEDED(IFilterGraph_QueryInterface(graph, + &IID_IMediaEventSink, (void **)&event_sink))) + { + IMediaEventSink_Notify(event_sink, EC_COMPLETE, S_OK, + (LONG_PTR)&filter->filter.IBaseFilter_iface); + IMediaEventSink_Release(event_sink); + } + return S_OK; }
@@ -439,7 +450,8 @@ static HRESULT sink_eos(struct strmbase_sink *iface)
filter->eos = TRUE;
- if (graph && SUCCEEDED(IFilterGraph_QueryInterface(graph, + if (filter->filter.state == State_Running && graph + && SUCCEEDED(IFilterGraph_QueryInterface(graph, &IID_IMediaEventSink, (void **)&event_sink))) { IMediaEventSink_Notify(event_sink, EC_COMPLETE, S_OK,
Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/quartz/tests/videorenderer.c | 2 +- dlls/quartz/tests/vmr9.c | 2 +- dlls/strmbase/renderer.c | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index 6462ab1ab97..9aaac2f8cfd 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -1153,7 +1153,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) hr = IMediaControl_Run(control); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - todo_wine ok(ret == 1, "Expected EC_COMPLETE.\n"); + ok(ret == 1, "Expected EC_COMPLETE.\n");
hr = IMediaControl_Stop(control); ok(hr == S_OK, "Got hr %#x.\n", hr); diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index bfade18983d..21ed35aff07 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -1305,7 +1305,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) hr = IMediaControl_Run(control); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - todo_wine ok(ret == 1, "Expected EC_COMPLETE.\n"); + ok(ret == 1, "Expected EC_COMPLETE.\n");
hr = IMediaControl_Stop(control); ok(hr == S_OK, "Got hr %#x.\n", hr); diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index 6c3262a2f70..01fabfc98de 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -248,8 +248,6 @@ static HRESULT renderer_start_stream(struct strmbase_filter *iface, REFERENCE_TI filter->stream_start = start; SetEvent(filter->state_event); SetEvent(filter->run_event); - if (filter->sink.pin.peer) - filter->eos = FALSE; reset_qos(filter); if (filter->sink.pin.peer && filter->ops->renderer_start_stream) filter->ops->renderer_start_stream(filter);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=91074
Your paranoid android.
=== w10pro64 (32 bit report) ===
quartz: videorenderer.c:999: Test failed: Got hr 0x1.
Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/quartz/dsoundrender.c | 14 +++++++++++++- dlls/quartz/tests/dsoundrender.c | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 656a5e1f7ab..30884671838 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -461,7 +461,8 @@ static HRESULT dsound_render_sink_eos(struct strmbase_sink *iface)
filter->eos = TRUE;
- if (graph && SUCCEEDED(IFilterGraph_QueryInterface(graph, + if (filter->filter.state == State_Running && graph + && SUCCEEDED(IFilterGraph_QueryInterface(graph, &IID_IMediaEventSink, (void **)&event_sink))) { IMediaEventSink_Notify(event_sink, EC_COMPLETE, S_OK, @@ -599,6 +600,8 @@ static HRESULT dsound_render_init_stream(struct strmbase_filter *iface) static HRESULT dsound_render_start_stream(struct strmbase_filter *iface, REFERENCE_TIME start) { struct dsound_render *filter = impl_from_strmbase_filter(iface); + IFilterGraph *graph = filter->filter.graph; + IMediaEventSink *event_sink;
filter->stream_start = start;
@@ -610,6 +613,15 @@ static HRESULT dsound_render_start_stream(struct strmbase_filter *iface, REFEREN IDirectSoundBuffer_Play(filter->dsbuffer, 0, 0, DSBPLAY_LOOPING); }
+ if (filter->eos && graph + && SUCCEEDED(IFilterGraph_QueryInterface(graph, + &IID_IMediaEventSink, (void **)&event_sink))) + { + IMediaEventSink_Notify(event_sink, EC_COMPLETE, S_OK, + (LONG_PTR)&filter->filter.IBaseFilter_iface); + IMediaEventSink_Release(event_sink); + } + return S_OK; }
diff --git a/dlls/quartz/tests/dsoundrender.c b/dlls/quartz/tests/dsoundrender.c index 093e901ffa4..41c5e7fde4e 100644 --- a/dlls/quartz/tests/dsoundrender.c +++ b/dlls/quartz/tests/dsoundrender.c @@ -922,7 +922,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) hr = IMediaControl_GetState(control, 1000, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n"); + ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = send_frame(input); todo_wine ok(hr == VFW_E_SAMPLE_REJECTED_EOS, "Got hr %#x.\n", hr);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=91075
Your paranoid android.
=== debiant2 (32 bit report) ===
quartz: filtergraph.c:515: Test failed: didn't get EOS filtergraph.c:519: Test failed: expected 1243c8, got 0 filtergraph.c:515: Test failed: didn't get EOS filtergraph.c:519: Test failed: expected 1243c8, got 0
=== debiant2 (32 bit Chinese:China report) ===
quartz: filtergraph.c:515: Test failed: didn't get EOS filtergraph.c:519: Test failed: expected 1243c8, got 0
=== debiant2 (32 bit WoW report) ===
quartz: filtergraph.c:515: Test failed: didn't get EOS filtergraph.c:519: Test failed: expected 1243c8, got 0
=== debiant2 (64 bit WoW report) ===
quartz: filtergraph.c:515: Test failed: didn't get EOS filtergraph.c:519: Test failed: expected 1243c8, got 0 filtergraph.c:515: Test failed: didn't get EOS filtergraph.c:519: Test failed: expected 1243c8, got 0
Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/quartz/dsoundrender.c | 3 --- dlls/quartz/tests/dsoundrender.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 30884671838..68c88ea5a15 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -608,10 +608,7 @@ static HRESULT dsound_render_start_stream(struct strmbase_filter *iface, REFEREN SetEvent(filter->state_event);
if (filter->sink.pin.peer) - { - filter->eos = FALSE; IDirectSoundBuffer_Play(filter->dsbuffer, 0, 0, DSBPLAY_LOOPING); - }
if (filter->eos && graph && SUCCEEDED(IFilterGraph_QueryInterface(graph, diff --git a/dlls/quartz/tests/dsoundrender.c b/dlls/quartz/tests/dsoundrender.c index 41c5e7fde4e..eebdd0ad9f7 100644 --- a/dlls/quartz/tests/dsoundrender.c +++ b/dlls/quartz/tests/dsoundrender.c @@ -930,7 +930,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) hr = IMediaControl_Run(control); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - todo_wine ok(ret == 1, "Expected EC_COMPLETE.\n"); + ok(ret == 1, "Expected EC_COMPLETE.\n");
hr = IMediaControl_Stop(control); ok(hr == S_OK, "Got hr %#x.\n", hr);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=91076
Your paranoid android.
=== debiant2 (32 bit report) ===
quartz: filtergraph.c:515: Test failed: didn't get EOS filtergraph.c:519: Test failed: expected 1243c8, got 0 filtergraph.c:515: Test failed: didn't get EOS filtergraph.c:519: Test failed: expected 1243c8, got 0
=== debiant2 (32 bit WoW report) ===
quartz: filtergraph.c:515: Test failed: didn't get EOS filtergraph.c:519: Test failed: expected 1243c8, got 0
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=91070
Your paranoid android.
=== debiant2 (32 bit Hebrew:Israel report) ===
quartz: filtergraph.c:426: Test failed: GetState() failed: 40237