Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/dsoundrender.c | 39 +++----------------------------------- 1 file changed, 3 insertions(+), 36 deletions(-)
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index f9fef51b562..8afb094af82 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -64,8 +64,6 @@ typedef struct DSoundRenderImpl
REFERENCE_TIME play_time;
- HANDLE blocked; - LONG volume; LONG pan;
@@ -245,7 +243,7 @@ static HRESULT DSoundRender_HandleEndOfStream(DSoundRenderImpl *This) This->in_loop = 1; LeaveCriticalSection(&This->renderer.filter.csFilter); LeaveCriticalSection(&This->renderer.csRenderLock); - WaitForSingleObject(This->blocked, 10); + WaitForSingleObject(This->renderer.flush_event, 10); EnterCriticalSection(&This->renderer.csRenderLock); EnterCriticalSection(&This->renderer.filter.csFilter); This->in_loop = 0; @@ -270,7 +268,7 @@ static HRESULT DSoundRender_SendSampleData(DSoundRenderImpl* This, REFERENCE_TIM if (hr != S_OK) { This->in_loop = 1; LeaveCriticalSection(&This->renderer.csRenderLock); - ret = WaitForSingleObject(This->blocked, 10); + ret = WaitForSingleObject(This->renderer.flush_event, 10); EnterCriticalSection(&This->renderer.csRenderLock); This->in_loop = 0; if (This->renderer.sink.flushing || This->renderer.filter.state == State_Stopped) @@ -434,7 +432,6 @@ static VOID WINAPI DSoundRender_OnStopStreaming(BaseRenderer * iface)
IDirectSoundBuffer_Stop(This->dsbuffer); This->writepos = This->buf_size; - SetEvent(This->blocked); }
static VOID WINAPI DSoundRender_OnStartStreaming(BaseRenderer * iface) @@ -445,13 +442,7 @@ static VOID WINAPI DSoundRender_OnStartStreaming(BaseRenderer * iface)
if (This->renderer.sink.pin.pConnectedTo) { - if (This->renderer.filter.state == State_Paused) - { - /* Unblock our thread, state changing from paused to running doesn't need a reset for state change */ - SetEvent(This->blocked); - } IDirectSoundBuffer_Play(This->dsbuffer, 0, 0, DSBPLAY_LOOPING); - ResetEvent(This->blocked); } }
@@ -548,17 +539,6 @@ static HRESULT WINAPI DSoundRender_EndOfStream(BaseRenderer* iface) return hr; }
-static HRESULT WINAPI DSoundRender_BeginFlush(BaseRenderer* iface) -{ - DSoundRenderImpl *This = impl_from_BaseRenderer(iface); - - TRACE("\n"); - BaseRendererImpl_BeginFlush(iface); - SetEvent(This->blocked); - - return S_OK; -} - static HRESULT WINAPI DSoundRender_EndFlush(BaseRenderer* iface) { DSoundRenderImpl *This = impl_from_BaseRenderer(iface); @@ -566,8 +546,6 @@ static HRESULT WINAPI DSoundRender_EndFlush(BaseRenderer* iface) TRACE("\n");
BaseRendererImpl_EndFlush(iface); - if (This->renderer.filter.state != State_Stopped) - ResetEvent(This->blocked);
if (This->dsbuffer) { @@ -602,8 +580,6 @@ static void dsound_render_destroy(BaseRenderer *iface) IDirectSound8_Release(filter->dsound); filter->dsound = NULL;
- CloseHandle(filter->blocked); - strmbase_renderer_cleanup(&filter->renderer); CoTaskMemFree(filter); } @@ -643,7 +619,7 @@ static const BaseRendererFuncTable BaseFuncTable = { DSoundRender_CompleteConnect, DSoundRender_BreakConnect, DSoundRender_EndOfStream, - DSoundRender_BeginFlush, + NULL, DSoundRender_EndFlush, dsound_render_destroy, dsound_render_query_interface, @@ -694,14 +670,6 @@ HRESULT DSoundRender_create(IUnknown *outer, void **out)
if (SUCCEEDED(hr)) { - pDSoundRender->blocked = CreateEventW(NULL, TRUE, TRUE, NULL); - - if (!pDSoundRender->blocked || FAILED(hr)) - { - IBaseFilter_Release(&pDSoundRender->renderer.filter.IBaseFilter_iface); - return HRESULT_FROM_WIN32(GetLastError()); - } - *out = &pDSoundRender->renderer.filter.IUnknown_inner; } else @@ -734,7 +702,6 @@ static HRESULT WINAPI DSoundRender_Pause(IBaseFilter * iface) if (SUCCEEDED(hr)) This->renderer.filter.state = State_Paused;
- ResetEvent(This->blocked); ResetEvent(This->renderer.flush_event); } LeaveCriticalSection(&This->renderer.csRenderLock);
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/dsoundrender.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-)
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 8afb094af82..3f1e5429fc6 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -681,34 +681,6 @@ HRESULT DSoundRender_create(IUnknown *outer, void **out) return hr; }
-static HRESULT WINAPI DSoundRender_Pause(IBaseFilter * iface) -{ - DSoundRenderImpl *This = impl_from_IBaseFilter(iface); - HRESULT hr = S_OK; - - TRACE("(%p/%p)->()\n", This, iface); - - EnterCriticalSection(&This->renderer.csRenderLock); - if (This->renderer.filter.state != State_Paused) - { - if (This->renderer.filter.state == State_Stopped) - { - if (This->renderer.sink.pin.pConnectedTo) - ResetEvent(This->renderer.state_event); - This->renderer.sink.end_of_stream = 0; - } - - hr = IDirectSoundBuffer_Stop(This->dsbuffer); - if (SUCCEEDED(hr)) - This->renderer.filter.state = State_Paused; - - ResetEvent(This->renderer.flush_event); - } - LeaveCriticalSection(&This->renderer.csRenderLock); - - return hr; -} - static const IBaseFilterVtbl DSoundRender_Vtbl = { BaseFilterImpl_QueryInterface, @@ -716,7 +688,7 @@ static const IBaseFilterVtbl DSoundRender_Vtbl = BaseFilterImpl_Release, BaseFilterImpl_GetClassID, BaseRendererImpl_Stop, - DSoundRender_Pause, + BaseRendererImpl_Pause, BaseRendererImpl_Run, BaseRendererImpl_GetState, BaseRendererImpl_SetSyncSource,
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qedit/nullrenderer.c | 26 +++++--------------------- dlls/quartz/dsoundrender.c | 36 ++++++++++++++---------------------- dlls/quartz/videorenderer.c | 32 ++++++++++---------------------- dlls/quartz/vmr9.c | 33 +++++++++++---------------------- dlls/strmbase/renderer.c | 23 ++--------------------- include/wine/strmbase.h | 34 ++++++++++++---------------------- 6 files changed, 54 insertions(+), 130 deletions(-)
diff --git a/dlls/qedit/nullrenderer.c b/dlls/qedit/nullrenderer.c index 82e6284bfe4..2c9aff8bc0f 100644 --- a/dlls/qedit/nullrenderer.c +++ b/dlls/qedit/nullrenderer.c @@ -55,27 +55,11 @@ static void null_renderer_destroy(BaseRenderer *iface) CoTaskMemFree(filter); }
-static const BaseRendererFuncTable RendererFuncTable = { - NullRenderer_CheckMediaType, - NullRenderer_DoRenderSample, - /**/ - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - /**/ - NULL, - NULL, - NULL, - NULL, - NULL, - null_renderer_destroy, +static const BaseRendererFuncTable RendererFuncTable = +{ + .pfnCheckMediaType = NullRenderer_CheckMediaType, + .pfnDoRenderSample = NullRenderer_DoRenderSample, + .renderer_destroy = null_renderer_destroy, };
static const IBaseFilterVtbl NullRenderer_Vtbl = diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 3f1e5429fc6..5cd5e11f9fe 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -601,28 +601,20 @@ static HRESULT dsound_render_query_interface(BaseRenderer *iface, REFIID iid, vo return S_OK; }
-static const BaseRendererFuncTable BaseFuncTable = { - DSoundRender_CheckMediaType, - DSoundRender_DoRenderSample, - /**/ - NULL, - NULL, - NULL, - DSoundRender_OnStartStreaming, - DSoundRender_OnStopStreaming, - NULL, - NULL, - NULL, - DSoundRender_ShouldDrawSampleNow, - DSoundRender_PrepareReceive, - /**/ - DSoundRender_CompleteConnect, - DSoundRender_BreakConnect, - DSoundRender_EndOfStream, - NULL, - DSoundRender_EndFlush, - dsound_render_destroy, - dsound_render_query_interface, +static const BaseRendererFuncTable BaseFuncTable = +{ + .pfnCheckMediaType = DSoundRender_CheckMediaType, + .pfnDoRenderSample = DSoundRender_DoRenderSample, + .pfnOnStartStreaming = DSoundRender_OnStartStreaming, + .pfnOnStopStreaming = DSoundRender_OnStopStreaming, + .pfnShouldDrawSampleNow = DSoundRender_ShouldDrawSampleNow, + .pfnPrepareReceive = DSoundRender_PrepareReceive, + .pfnCompleteConnect = DSoundRender_CompleteConnect, + .pfnBreakConnect = DSoundRender_BreakConnect, + .pfnEndOfStream = DSoundRender_EndOfStream, + .pfnEndFlush = DSoundRender_EndFlush, + .renderer_destroy = dsound_render_destroy, + .renderer_query_interface = dsound_render_query_interface, };
HRESULT DSoundRender_create(IUnknown *outer, void **out) diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 9a10fd275a0..ae866c8c62e 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -469,28 +469,16 @@ static BOOL WINAPI VideoRenderer_OnSize(BaseWindow *iface, LONG Width, LONG Heig return BaseWindowImpl_OnSize(iface, Width, Height); }
-static const BaseRendererFuncTable BaseFuncTable = { - VideoRenderer_CheckMediaType, - VideoRenderer_DoRenderSample, - /**/ - NULL, - NULL, - NULL, - VideoRenderer_OnStartStreaming, - VideoRenderer_OnStopStreaming, - NULL, - NULL, - NULL, - VideoRenderer_ShouldDrawSampleNow, - NULL, - /**/ - NULL, - NULL, - NULL, - NULL, - VideoRenderer_EndFlush, - video_renderer_destroy, - video_renderer_query_interface, +static const BaseRendererFuncTable BaseFuncTable = +{ + .pfnCheckMediaType = VideoRenderer_CheckMediaType, + .pfnDoRenderSample = VideoRenderer_DoRenderSample, + .pfnOnStartStreaming = VideoRenderer_OnStartStreaming, + .pfnOnStopStreaming = VideoRenderer_OnStopStreaming, + .pfnShouldDrawSampleNow = VideoRenderer_ShouldDrawSampleNow, + .pfnEndFlush = VideoRenderer_EndFlush, + .renderer_destroy = video_renderer_destroy, + .renderer_query_interface = video_renderer_query_interface, };
static const BaseWindowFuncTable renderer_BaseWindowFuncTable = { diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index ee2d7a92956..bafe91da36a 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -558,28 +558,17 @@ static HRESULT vmr_query_interface(BaseRenderer *iface, REFIID iid, void **out) return S_OK; }
-static const BaseRendererFuncTable BaseFuncTable = { - VMR9_CheckMediaType, - VMR9_DoRenderSample, - /**/ - NULL, - NULL, - NULL, - VMR9_OnStartStreaming, - VMR9_OnStopStreaming, - NULL, - NULL, - NULL, - VMR9_ShouldDrawSampleNow, - NULL, - /**/ - VMR9_CompleteConnect, - VMR9_BreakConnect, - NULL, - NULL, - NULL, - vmr_destroy, - vmr_query_interface, +static const BaseRendererFuncTable BaseFuncTable = +{ + .pfnCheckMediaType = VMR9_CheckMediaType, + .pfnDoRenderSample = VMR9_DoRenderSample, + .pfnOnStartStreaming = VMR9_OnStartStreaming, + .pfnOnStopStreaming = VMR9_OnStopStreaming, + .pfnShouldDrawSampleNow = VMR9_ShouldDrawSampleNow, + .pfnCompleteConnect = VMR9_CompleteConnect, + .pfnBreakConnect = VMR9_BreakConnect, + .renderer_destroy = vmr_destroy, + .renderer_query_interface = vmr_query_interface, };
static LPWSTR WINAPI VMR9_GetClassWindowStyles(BaseWindow *This, DWORD *pClassStyles, DWORD *pWindowStyles, DWORD *pWindowStylesEx) diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index 46f0da2fa5d..b73ce5469cd 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -117,12 +117,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_BeginFlush(IPin * iface) EnterCriticalSection(&pFilter->filter.csFilter); hr = BaseInputPinImpl_BeginFlush(iface); if (SUCCEEDED(hr)) - { - if (pFilter->pFuncsTable->pfnBeginFlush) - hr = pFilter->pFuncsTable->pfnBeginFlush(pFilter); - else - hr = BaseRendererImpl_BeginFlush(pFilter); - } + hr = BaseRendererImpl_BeginFlush(pFilter); LeaveCriticalSection(&pFilter->filter.csFilter); LeaveCriticalSection(&pFilter->csRenderLock); return hr; @@ -334,17 +329,9 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp return hr; }
- if (This->pFuncsTable->pfnPrepareRender) - This->pFuncsTable->pfnPrepareRender(This); - EnterCriticalSection(&This->csRenderLock); - if ( This->filter.state == State_Paused ) - { - if (This->pFuncsTable->pfnOnReceiveFirstSample) - This->pFuncsTable->pfnOnReceiveFirstSample(This, pSample); - + if (This->filter.state == State_Paused) SetEvent(This->state_event); - }
/* Wait for render Time */ if (This->filter.pClock && SUCCEEDED(IMediaSample_GetTime(pSample, &start, &stop))) @@ -361,9 +348,6 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp REFERENCE_TIME now; DWORD_PTR cookie;
- if (This->pFuncsTable->pfnOnWaitStart) - This->pFuncsTable->pfnOnWaitStart(This); - IReferenceClock_GetTime(This->filter.pClock, &now);
if (now - This->filter.rtStreamStart - start <= -10000) @@ -380,9 +364,6 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp
EnterCriticalSection(&This->csRenderLock); } - - if (This->pFuncsTable->pfnOnWaitEnd) - This->pFuncsTable->pfnOnWaitEnd(This); } else { diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index a499374fe40..6e369b872f9 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -576,28 +576,18 @@ typedef HRESULT (WINAPI *BaseRenderer_BreakConnect) (BaseRenderer *This); typedef HRESULT (WINAPI *BaseRenderer_CompleteConnect) (BaseRenderer *This, IPin *pReceivePin);
typedef struct BaseRendererFuncTable { - /* Required */ - BaseRenderer_CheckMediaType pfnCheckMediaType; - BaseRenderer_DoRenderSample pfnDoRenderSample; - /* Optional, Data Handlers */ - BaseRenderer_OnReceiveFirstSample pfnOnReceiveFirstSample; - BaseRenderer_OnRenderEnd pfnOnRenderEnd; - BaseRenderer_OnRenderStart pfnOnRenderStart; - BaseRenderer_OnStartStreaming pfnOnStartStreaming; - BaseRenderer_OnStopStreaming pfnOnStopStreaming; - BaseRenderer_OnWaitEnd pfnOnWaitEnd; - BaseRenderer_OnWaitStart pfnOnWaitStart; - BaseRenderer_PrepareRender pfnPrepareRender; - BaseRenderer_ShouldDrawSampleNow pfnShouldDrawSampleNow; - BaseRenderer_PrepareReceive pfnPrepareReceive; - /* Optional, Input Pin */ - BaseRenderer_CompleteConnect pfnCompleteConnect; - BaseRenderer_BreakConnect pfnBreakConnect; - BaseRenderer_EndOfStream pfnEndOfStream; - BaseRenderer_BeginFlush pfnBeginFlush; - BaseRenderer_EndFlush pfnEndFlush; - void (*renderer_destroy)(BaseRenderer *iface); - HRESULT (*renderer_query_interface)(BaseRenderer *iface, REFIID iid, void **out); + BaseRenderer_CheckMediaType pfnCheckMediaType; + BaseRenderer_DoRenderSample pfnDoRenderSample; + BaseRenderer_OnStartStreaming pfnOnStartStreaming; + BaseRenderer_OnStopStreaming pfnOnStopStreaming; + BaseRenderer_ShouldDrawSampleNow pfnShouldDrawSampleNow; + BaseRenderer_PrepareReceive pfnPrepareReceive; + BaseRenderer_CompleteConnect pfnCompleteConnect; + BaseRenderer_BreakConnect pfnBreakConnect; + BaseRenderer_EndOfStream pfnEndOfStream; + BaseRenderer_EndFlush pfnEndFlush; + void (*renderer_destroy)(BaseRenderer *iface); + HRESULT (*renderer_query_interface)(BaseRenderer *iface, REFIID iid, void **out); } BaseRendererFuncTable;
HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSample);
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/dsoundrender.c | 4 ++-- dlls/quartz/videorenderer.c | 4 ++-- dlls/quartz/vmr9.c | 4 ++-- dlls/strmbase/renderer.c | 4 ++-- include/wine/strmbase.h | 3 +-- 5 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 5cd5e11f9fe..a4e374b5897 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -434,7 +434,7 @@ static VOID WINAPI DSoundRender_OnStopStreaming(BaseRenderer * iface) This->writepos = This->buf_size; }
-static VOID WINAPI DSoundRender_OnStartStreaming(BaseRenderer * iface) +static void dsound_render_start_stream(BaseRenderer *iface) { DSoundRenderImpl *This = impl_from_BaseRenderer(iface);
@@ -605,7 +605,7 @@ static const BaseRendererFuncTable BaseFuncTable = { .pfnCheckMediaType = DSoundRender_CheckMediaType, .pfnDoRenderSample = DSoundRender_DoRenderSample, - .pfnOnStartStreaming = DSoundRender_OnStartStreaming, + .renderer_start_stream = dsound_render_start_stream, .pfnOnStopStreaming = DSoundRender_OnStopStreaming, .pfnShouldDrawSampleNow = DSoundRender_ShouldDrawSampleNow, .pfnPrepareReceive = DSoundRender_PrepareReceive, diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index ae866c8c62e..970e9f411f1 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -417,7 +417,7 @@ static VOID WINAPI VideoRenderer_OnStopStreaming(BaseRenderer* iface) RedrawWindow(This->baseControlWindow.baseWindow.hWnd, NULL, NULL, RDW_INVALIDATE|RDW_ERASE); }
-static VOID WINAPI VideoRenderer_OnStartStreaming(BaseRenderer* iface) +static void video_renderer_start_stream(BaseRenderer *iface) { VideoRendererImpl *This = impl_from_BaseRenderer(iface);
@@ -473,7 +473,7 @@ static const BaseRendererFuncTable BaseFuncTable = { .pfnCheckMediaType = VideoRenderer_CheckMediaType, .pfnDoRenderSample = VideoRenderer_DoRenderSample, - .pfnOnStartStreaming = VideoRenderer_OnStartStreaming, + .renderer_start_stream = video_renderer_start_stream, .pfnOnStopStreaming = VideoRenderer_OnStopStreaming, .pfnShouldDrawSampleNow = VideoRenderer_ShouldDrawSampleNow, .pfnEndFlush = VideoRenderer_EndFlush, diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index bafe91da36a..6c0d6a5ffc7 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -429,7 +429,7 @@ static HRESULT VMR9_maybe_init(struct quartz_vmr *This, BOOL force) return hr; }
-static VOID WINAPI VMR9_OnStartStreaming(BaseRenderer* iface) +static void vmr_start_stream(BaseRenderer *iface) { struct quartz_vmr *This = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
@@ -562,7 +562,7 @@ static const BaseRendererFuncTable BaseFuncTable = { .pfnCheckMediaType = VMR9_CheckMediaType, .pfnDoRenderSample = VMR9_DoRenderSample, - .pfnOnStartStreaming = VMR9_OnStartStreaming, + .renderer_start_stream = vmr_start_stream, .pfnOnStopStreaming = VMR9_OnStopStreaming, .pfnShouldDrawSampleNow = VMR9_ShouldDrawSampleNow, .pfnCompleteConnect = VMR9_CompleteConnect, diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index b73ce5469cd..6a6119afdd1 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -441,8 +441,8 @@ HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStart) if (SUCCEEDED(hr)) { QualityControlRender_Start(This->qcimpl, This->filter.rtStreamStart); - if (This->pFuncsTable->pfnOnStartStreaming) - This->pFuncsTable->pfnOnStartStreaming(This); + if (This->pFuncsTable->renderer_start_stream) + This->pFuncsTable->renderer_start_stream(This); if (This->filter.state == State_Stopped) BaseRendererImpl_ClearPendingSample(This); This->filter.state = State_Running; diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 6e369b872f9..942f7806294 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -562,7 +562,6 @@ typedef HRESULT (WINAPI *BaseRenderer_DoRenderSample)(BaseRenderer *This, IMedia typedef VOID (WINAPI *BaseRenderer_OnReceiveFirstSample)(BaseRenderer *This, IMediaSample *pMediaSample); typedef VOID (WINAPI *BaseRenderer_OnRenderEnd)(BaseRenderer *This, IMediaSample *pMediaSample); typedef VOID (WINAPI *BaseRenderer_OnRenderStart)(BaseRenderer *This, IMediaSample *pMediaSample); -typedef VOID (WINAPI *BaseRenderer_OnStartStreaming)(BaseRenderer *This); typedef VOID (WINAPI *BaseRenderer_OnStopStreaming)(BaseRenderer *This); typedef VOID (WINAPI *BaseRenderer_OnWaitEnd)(BaseRenderer *This); typedef VOID (WINAPI *BaseRenderer_OnWaitStart)(BaseRenderer *This); @@ -578,7 +577,7 @@ typedef HRESULT (WINAPI *BaseRenderer_CompleteConnect) (BaseRenderer *This, IPin typedef struct BaseRendererFuncTable { BaseRenderer_CheckMediaType pfnCheckMediaType; BaseRenderer_DoRenderSample pfnDoRenderSample; - BaseRenderer_OnStartStreaming pfnOnStartStreaming; + void (*renderer_start_stream)(BaseRenderer *iface); BaseRenderer_OnStopStreaming pfnOnStopStreaming; BaseRenderer_ShouldDrawSampleNow pfnShouldDrawSampleNow; BaseRenderer_PrepareReceive pfnPrepareReceive;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/dsoundrender.c | 4 ++-- dlls/quartz/videorenderer.c | 4 ++-- dlls/quartz/vmr9.c | 4 ++-- dlls/strmbase/renderer.c | 8 ++++---- include/wine/strmbase.h | 3 +-- 5 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index a4e374b5897..8db7263d1e1 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -424,7 +424,7 @@ static HRESULT WINAPI DSoundRender_CheckMediaType(BaseRenderer *iface, const AM_ return S_OK; }
-static VOID WINAPI DSoundRender_OnStopStreaming(BaseRenderer * iface) +static void dsound_render_stop_stream(BaseRenderer *iface) { DSoundRenderImpl *This = impl_from_BaseRenderer(iface);
@@ -606,7 +606,7 @@ static const BaseRendererFuncTable BaseFuncTable = .pfnCheckMediaType = DSoundRender_CheckMediaType, .pfnDoRenderSample = DSoundRender_DoRenderSample, .renderer_start_stream = dsound_render_start_stream, - .pfnOnStopStreaming = DSoundRender_OnStopStreaming, + .renderer_stop_stream = dsound_render_stop_stream, .pfnShouldDrawSampleNow = DSoundRender_ShouldDrawSampleNow, .pfnPrepareReceive = DSoundRender_PrepareReceive, .pfnCompleteConnect = DSoundRender_CompleteConnect, diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 970e9f411f1..00abfdf6370 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -405,7 +405,7 @@ static HRESULT video_renderer_query_interface(BaseRenderer *iface, REFIID iid, v return S_OK; }
-static VOID WINAPI VideoRenderer_OnStopStreaming(BaseRenderer* iface) +static void video_renderer_stop_stream(BaseRenderer *iface) { VideoRendererImpl *This = impl_from_BaseRenderer(iface);
@@ -474,7 +474,7 @@ static const BaseRendererFuncTable BaseFuncTable = .pfnCheckMediaType = VideoRenderer_CheckMediaType, .pfnDoRenderSample = VideoRenderer_DoRenderSample, .renderer_start_stream = video_renderer_start_stream, - .pfnOnStopStreaming = VideoRenderer_OnStopStreaming, + .renderer_stop_stream = video_renderer_stop_stream, .pfnShouldDrawSampleNow = VideoRenderer_ShouldDrawSampleNow, .pfnEndFlush = VideoRenderer_EndFlush, .renderer_destroy = video_renderer_destroy, diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 6c0d6a5ffc7..55fb171a176 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -447,7 +447,7 @@ static void vmr_start_stream(BaseRenderer *iface) GetClientRect(This->baseControlWindow.baseWindow.hWnd, &This->target_rect); }
-static VOID WINAPI VMR9_OnStopStreaming(BaseRenderer* iface) +static void vmr_stop_stream(BaseRenderer *iface) { struct quartz_vmr *This = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
@@ -563,7 +563,7 @@ static const BaseRendererFuncTable BaseFuncTable = .pfnCheckMediaType = VMR9_CheckMediaType, .pfnDoRenderSample = VMR9_DoRenderSample, .renderer_start_stream = vmr_start_stream, - .pfnOnStopStreaming = VMR9_OnStopStreaming, + .renderer_stop_stream = vmr_stop_stream, .pfnShouldDrawSampleNow = VMR9_ShouldDrawSampleNow, .pfnCompleteConnect = VMR9_CompleteConnect, .pfnBreakConnect = VMR9_BreakConnect, diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index 6a6119afdd1..0972f499c5a 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -399,8 +399,8 @@ HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter * iface) EnterCriticalSection(&This->csRenderLock); { RendererPosPassThru_ResetMediaTime(This->pPosition); - if (This->pFuncsTable->pfnOnStopStreaming) - This->pFuncsTable->pfnOnStopStreaming(This); + if (This->pFuncsTable->renderer_stop_stream) + This->pFuncsTable->renderer_stop_stream(This); This->filter.state = State_Stopped; SetEvent(This->state_event); SetEvent(This->flush_event); @@ -469,8 +469,8 @@ HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter * iface) ResetEvent(This->state_event); This->sink.end_of_stream = FALSE; } - else if (This->pFuncsTable->pfnOnStopStreaming) - This->pFuncsTable->pfnOnStopStreaming(This); + else if (This->pFuncsTable->renderer_stop_stream) + This->pFuncsTable->renderer_stop_stream(This);
if (This->filter.state == State_Stopped) BaseRendererImpl_ClearPendingSample(This); diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 942f7806294..b1483fc26c9 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -562,7 +562,6 @@ typedef HRESULT (WINAPI *BaseRenderer_DoRenderSample)(BaseRenderer *This, IMedia typedef VOID (WINAPI *BaseRenderer_OnReceiveFirstSample)(BaseRenderer *This, IMediaSample *pMediaSample); typedef VOID (WINAPI *BaseRenderer_OnRenderEnd)(BaseRenderer *This, IMediaSample *pMediaSample); typedef VOID (WINAPI *BaseRenderer_OnRenderStart)(BaseRenderer *This, IMediaSample *pMediaSample); -typedef VOID (WINAPI *BaseRenderer_OnStopStreaming)(BaseRenderer *This); typedef VOID (WINAPI *BaseRenderer_OnWaitEnd)(BaseRenderer *This); typedef VOID (WINAPI *BaseRenderer_OnWaitStart)(BaseRenderer *This); typedef VOID (WINAPI *BaseRenderer_PrepareRender)(BaseRenderer *This); @@ -578,7 +577,7 @@ typedef struct BaseRendererFuncTable { BaseRenderer_CheckMediaType pfnCheckMediaType; BaseRenderer_DoRenderSample pfnDoRenderSample; void (*renderer_start_stream)(BaseRenderer *iface); - BaseRenderer_OnStopStreaming pfnOnStopStreaming; + void (*renderer_stop_stream)(BaseRenderer *iface); BaseRenderer_ShouldDrawSampleNow pfnShouldDrawSampleNow; BaseRenderer_PrepareReceive pfnPrepareReceive; BaseRenderer_CompleteConnect pfnCompleteConnect;