From 675af1eb337492faec745f8032c1782e7bfed6c4 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Tue, 22 Oct 2019 18:30:05 -0500 Subject: [PATCH] strmbase: Introduce renderer_init_stream(). Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/strmbase/renderer.c | 5 +++++ include/wine/strmbase.h | 1 + 2 files changed, 6 insertions(+) diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index 9908e693e7e..0f714c2a889 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -438,6 +438,9 @@ HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStart) if (This->filter.state == State_Running) goto out; + if (This->filter.state == State_Stopped && This->pFuncsTable->renderer_init_stream) + This->pFuncsTable->renderer_init_stream(This); + SetEvent(This->state_event); if (This->sink.pin.peer) @@ -477,6 +480,8 @@ HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter * iface) hr = S_FALSE; } This->sink.end_of_stream = FALSE; + if (This->pFuncsTable->renderer_init_stream) + This->pFuncsTable->renderer_init_stream(This); } else if (This->sink.pin.peer && This->pFuncsTable->renderer_stop_stream) This->pFuncsTable->renderer_stop_stream(This); diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 74c8f4721bc..f9136fadfff 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -550,6 +550,7 @@ typedef HRESULT (WINAPI *BaseRenderer_CompleteConnect) (BaseRenderer *This, IPin typedef struct BaseRendererFuncTable { BaseRenderer_CheckMediaType pfnCheckMediaType; BaseRenderer_DoRenderSample pfnDoRenderSample; + void (*renderer_init_stream)(BaseRenderer *iface); void (*renderer_start_stream)(BaseRenderer *iface); void (*renderer_stop_stream)(BaseRenderer *iface); BaseRenderer_ShouldDrawSampleNow pfnShouldDrawSampleNow;