Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/strmbase/renderer.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index ee8ff4c623f..daa407ba42e 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -246,8 +246,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);
Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/quartz/tests/videorenderer.c | 4 ++-- dlls/quartz/tests/vmr9.c | 4 ++-- dlls/strmbase/renderer.c | 14 +++++++++++++- 3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index 470652543ad..4ff84e77012 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); - 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); @@ -1151,7 +1151,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 c7a84d65b7b..5bca91faecd 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -1295,7 +1295,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); @@ -1303,7 +1303,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 daa407ba42e..01fabfc98de 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); @@ -250,6 +252,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; }
@@ -437,7 +448,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: Zebediah Figura zfigura@codeweavers.com
Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/quartz/dsoundrender.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 656a5e1f7ab..7c92eb6e6cc 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -605,10 +605,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); - }
return S_OK; }
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=91285
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
=== 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 (64 bit WoW report) ===
quartz: filtergraph.c:515: Test failed: didn't get EOS filtergraph.c:519: Test failed: expected 1243c8, got 0
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/quartz/dsoundrender.c | 14 +++++++++++++- dlls/quartz/tests/dsoundrender.c | 4 ++-- 2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 7c92eb6e6cc..68c88ea5a15 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;
@@ -607,6 +610,15 @@ static HRESULT dsound_render_start_stream(struct strmbase_filter *iface, REFEREN if (filter->sink.pin.peer) 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 87c3706b145..fdc23d2b48c 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); - 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); @@ -928,7 +928,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=91286
Your paranoid android.
=== w1064_tsign (64 bit report) ===
quartz: dsoundrender.c:957: Test failed: Expected EC_COMPLETE.
=== 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 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
Signed-off-by: Zebediah Figura zfigura@codeweavers.com