On 9/5/22 04:37, Nikolay Sivov wrote:
From: Nikolay Sivov <nsivov(a)codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/evr/evr.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
diff --git a/dlls/evr/evr.c b/dlls/evr/evr.c index 1b2930c500a..67b13cbd5af 100644 --- a/dlls/evr/evr.c +++ b/dlls/evr/evr.c @@ -312,6 +312,38 @@ static HRESULT evr_query_accept(struct strmbase_renderer *iface, const AM_MEDIA_ return hr; }
+/* FIXME: errors should be propagated from init/start/stop handlers. */ +static void evr_init_stream(struct strmbase_renderer *iface) +{ + struct evr *filter = impl_from_strmbase_renderer(iface); + + if (!filter->mixer) return; + + if (SUCCEEDED(IMFTransform_ProcessMessage(filter->mixer, MFT_MESSAGE_NOTIFY_BEGIN_STREAMING, 0))) + IMFVideoPresenter_ProcessMessage(filter->presenter, MFVP_MESSAGE_BEGINSTREAMING, 0); +} + +static void evr_start_stream(struct strmbase_renderer *iface) +{ + struct evr *filter = impl_from_strmbase_renderer(iface); + + if (filter->mixer) + IMFTransform_ProcessMessage(filter->mixer, MFT_MESSAGE_NOTIFY_START_OF_STREAM, 0); +} + +static void evr_stop_stream(struct strmbase_renderer *iface) +{ + struct evr *filter = impl_from_strmbase_renderer(iface); + + if (!filter->mixer) return; + + if (SUCCEEDED(IMFTransform_ProcessMessage(filter->mixer, MFT_MESSAGE_NOTIFY_END_OF_STREAM, 0))) + { + if (SUCCEEDED(IMFVideoPresenter_ProcessMessage(filter->presenter, MFVP_MESSAGE_ENDSTREAMING, 0))) + IMFTransform_ProcessMessage(filter->mixer, MFT_MESSAGE_NOTIFY_END_STREAMING, 0);
The documentation is not really clear about this, and I'm inclined to take your word on mfplat issues anyway, but regardless I'm curious: why is this done here and not in renderer_cleanup_stream()? If it's the counterpart to BEGIN_STREAMING I'd expect the latter.