Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/evr/evr.c | 12 ++++---- dlls/qedit/nullrenderer.c | 12 ++++---- dlls/quartz/dsoundrender.c | 49 +++++++++++++++--------------- dlls/quartz/videorenderer.c | 35 +++++++++++----------- dlls/quartz/vmr9.c | 23 +++++++------- dlls/strmbase/renderer.c | 60 ++++++++++++++++++------------------- include/wine/strmbase.h | 56 ++++++++++++++++------------------ 7 files changed, 122 insertions(+), 125 deletions(-)
diff --git a/dlls/evr/evr.c b/dlls/evr/evr.c index 8bd38c243d..b1721db027 100644 --- a/dlls/evr/evr.c +++ b/dlls/evr/evr.c @@ -33,29 +33,29 @@ WINE_DEFAULT_DEBUG_CHANNEL(evr);
typedef struct { - BaseRenderer renderer; + struct strmbase_renderer renderer; } evr_filter;
-static inline evr_filter *impl_from_BaseRenderer(BaseRenderer *iface) +static inline evr_filter *impl_from_strmbase_renderer(struct strmbase_renderer *iface) { return CONTAINING_RECORD(iface, evr_filter, renderer); }
-static void evr_destroy(BaseRenderer *iface) +static void evr_destroy(struct strmbase_renderer *iface) { - evr_filter *filter = impl_from_BaseRenderer(iface); + evr_filter *filter = impl_from_strmbase_renderer(iface);
strmbase_renderer_cleanup(&filter->renderer); CoTaskMemFree(filter); }
-static HRESULT WINAPI evr_DoRenderSample(BaseRenderer *iface, IMediaSample *sample) +static HRESULT WINAPI evr_DoRenderSample(struct strmbase_renderer *iface, IMediaSample *sample) { FIXME("Not implemented.\n"); return E_NOTIMPL; }
-static HRESULT WINAPI evr_CheckMediaType(BaseRenderer *iface, const AM_MEDIA_TYPE *mt) +static HRESULT WINAPI evr_CheckMediaType(struct strmbase_renderer *iface, const AM_MEDIA_TYPE *mt) { FIXME("Not implemented.\n"); return E_NOTIMPL; diff --git a/dlls/qedit/nullrenderer.c b/dlls/qedit/nullrenderer.c index ee68e6244c..b9bc3fec25 100644 --- a/dlls/qedit/nullrenderer.c +++ b/dlls/qedit/nullrenderer.c @@ -28,28 +28,28 @@ WINE_DEFAULT_DEBUG_CHANNEL(qedit);
typedef struct NullRendererImpl { - BaseRenderer renderer; + struct strmbase_renderer renderer; } NullRendererImpl;
-static inline NullRendererImpl *impl_from_BaseRenderer(BaseRenderer *iface) +static inline NullRendererImpl *impl_from_strmbase_renderer(struct strmbase_renderer *iface) { return CONTAINING_RECORD(iface, NullRendererImpl, renderer); }
-static HRESULT WINAPI NullRenderer_DoRenderSample(BaseRenderer *iface, IMediaSample *pMediaSample) +static HRESULT WINAPI NullRenderer_DoRenderSample(struct strmbase_renderer *iface, IMediaSample *sample) { return S_OK; }
-static HRESULT WINAPI NullRenderer_CheckMediaType(BaseRenderer *iface, const AM_MEDIA_TYPE * pmt) +static HRESULT WINAPI NullRenderer_CheckMediaType(struct strmbase_renderer *iface, const AM_MEDIA_TYPE *mt) { TRACE("Not a stub!\n"); return S_OK; }
-static void null_renderer_destroy(BaseRenderer *iface) +static void null_renderer_destroy(struct strmbase_renderer *iface) { - NullRendererImpl *filter = impl_from_BaseRenderer(iface); + NullRendererImpl *filter = impl_from_strmbase_renderer(iface);
strmbase_renderer_cleanup(&filter->renderer); CoTaskMemFree(filter); diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index c0ff8ca5af..54b4c59903 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -45,7 +45,7 @@ static const IAMDirectSoundVtbl IAMDirectSound_Vtbl;
typedef struct DSoundRenderImpl { - BaseRenderer renderer; + struct strmbase_renderer renderer;
IBasicAudio IBasicAudio_iface; IReferenceClock IReferenceClock_iface; @@ -66,7 +66,7 @@ typedef struct DSoundRenderImpl HANDLE advisethread, thread_wait; } DSoundRenderImpl;
-static inline DSoundRenderImpl *impl_from_BaseRenderer(BaseRenderer *iface) +static inline DSoundRenderImpl *impl_from_strmbase_renderer(struct strmbase_renderer *iface) { return CONTAINING_RECORD(iface, DSoundRenderImpl, renderer); } @@ -298,16 +298,17 @@ static HRESULT DSoundRender_SendSampleData(DSoundRenderImpl* This, REFERENCE_TIM return S_OK; }
-static HRESULT WINAPI DSoundRender_ShouldDrawSampleNow(BaseRenderer *This, IMediaSample *pMediaSample, REFERENCE_TIME *pStartTime, REFERENCE_TIME *pEndTime) +static HRESULT WINAPI DSoundRender_ShouldDrawSampleNow(struct strmbase_renderer *iface, + IMediaSample *sample, REFERENCE_TIME *start, REFERENCE_TIME *end) { /* We time ourselves do not use the base renderers timing */ return S_OK; }
-static HRESULT WINAPI DSoundRender_PrepareReceive(BaseRenderer *iface, IMediaSample *pSample) +static HRESULT WINAPI DSoundRender_PrepareReceive(struct strmbase_renderer *iface, IMediaSample *pSample) { - DSoundRenderImpl *This = impl_from_BaseRenderer(iface); + DSoundRenderImpl *This = impl_from_strmbase_renderer(iface); HRESULT hr; AM_MEDIA_TYPE *amt;
@@ -340,9 +341,9 @@ static HRESULT WINAPI DSoundRender_PrepareReceive(BaseRenderer *iface, IMediaSam return S_OK; }
-static HRESULT WINAPI DSoundRender_DoRenderSample(BaseRenderer *iface, IMediaSample * pSample) +static HRESULT WINAPI DSoundRender_DoRenderSample(struct strmbase_renderer *iface, IMediaSample *pSample) { - DSoundRenderImpl *This = impl_from_BaseRenderer(iface); + DSoundRenderImpl *This = impl_from_strmbase_renderer(iface); LPBYTE pbSrcStream = NULL; LONG cbSrcStream = 0; REFERENCE_TIME tStart, tStop; @@ -397,7 +398,7 @@ static HRESULT WINAPI DSoundRender_DoRenderSample(BaseRenderer *iface, IMediaSam return hr; }
-static HRESULT WINAPI DSoundRender_CheckMediaType(BaseRenderer *iface, const AM_MEDIA_TYPE * pmt) +static HRESULT WINAPI DSoundRender_CheckMediaType(struct strmbase_renderer *iface, const AM_MEDIA_TYPE * pmt) { if (!IsEqualIID(&pmt->majortype, &MEDIATYPE_Audio)) return S_FALSE; @@ -408,9 +409,9 @@ static HRESULT WINAPI DSoundRender_CheckMediaType(BaseRenderer *iface, const AM_ return S_OK; }
-static void dsound_render_stop_stream(BaseRenderer *iface) +static void dsound_render_stop_stream(struct strmbase_renderer *iface) { - DSoundRenderImpl *This = impl_from_BaseRenderer(iface); + DSoundRenderImpl *This = impl_from_strmbase_renderer(iface);
TRACE("(%p/%p)->()\n", This, iface);
@@ -418,9 +419,9 @@ static void dsound_render_stop_stream(BaseRenderer *iface) This->writepos = This->buf_size; }
-static void dsound_render_start_stream(BaseRenderer *iface) +static void dsound_render_start_stream(struct strmbase_renderer *iface) { - DSoundRenderImpl *This = impl_from_BaseRenderer(iface); + DSoundRenderImpl *This = impl_from_strmbase_renderer(iface);
TRACE("(%p)\n", This);
@@ -430,9 +431,9 @@ static void dsound_render_start_stream(BaseRenderer *iface) } }
-static HRESULT WINAPI DSoundRender_CompleteConnect(BaseRenderer * iface, IPin * pReceivePin) +static HRESULT WINAPI DSoundRender_CompleteConnect(struct strmbase_renderer *iface, IPin *pReceivePin) { - DSoundRenderImpl *This = impl_from_BaseRenderer(iface); + DSoundRenderImpl *This = impl_from_strmbase_renderer(iface); const AM_MEDIA_TYPE *pmt = &This->renderer.sink.pin.mtCurrent; HRESULT hr = S_OK; WAVEFORMATEX *format; @@ -478,9 +479,9 @@ static HRESULT WINAPI DSoundRender_CompleteConnect(BaseRenderer * iface, IPin * return hr; }
-static HRESULT WINAPI DSoundRender_BreakConnect(BaseRenderer* iface) +static HRESULT WINAPI DSoundRender_BreakConnect(struct strmbase_renderer *iface) { - DSoundRenderImpl *This = impl_from_BaseRenderer(iface); + DSoundRenderImpl *This = impl_from_strmbase_renderer(iface);
TRACE("(%p)->()\n", iface);
@@ -498,9 +499,9 @@ static HRESULT WINAPI DSoundRender_BreakConnect(BaseRenderer* iface) return S_OK; }
-static HRESULT WINAPI DSoundRender_EndOfStream(BaseRenderer* iface) +static HRESULT WINAPI DSoundRender_EndOfStream(struct strmbase_renderer *iface) { - DSoundRenderImpl *This = impl_from_BaseRenderer(iface); + DSoundRenderImpl *This = impl_from_strmbase_renderer(iface); HRESULT hr;
TRACE("(%p)->()\n",iface); @@ -517,9 +518,9 @@ static HRESULT WINAPI DSoundRender_EndOfStream(BaseRenderer* iface) return hr; }
-static HRESULT WINAPI DSoundRender_EndFlush(BaseRenderer* iface) +static HRESULT WINAPI DSoundRender_EndFlush(struct strmbase_renderer *iface) { - DSoundRenderImpl *This = impl_from_BaseRenderer(iface); + DSoundRenderImpl *This = impl_from_strmbase_renderer(iface);
TRACE("\n");
@@ -540,9 +541,9 @@ static HRESULT WINAPI DSoundRender_EndFlush(BaseRenderer* iface) return S_OK; }
-static void dsound_render_destroy(BaseRenderer *iface) +static void dsound_render_destroy(struct strmbase_renderer *iface) { - DSoundRenderImpl *filter = impl_from_BaseRenderer(iface); + DSoundRenderImpl *filter = impl_from_strmbase_renderer(iface);
if (filter->threadid) { @@ -562,9 +563,9 @@ static void dsound_render_destroy(BaseRenderer *iface) CoTaskMemFree(filter); }
-static HRESULT dsound_render_query_interface(BaseRenderer *iface, REFIID iid, void **out) +static HRESULT dsound_render_query_interface(struct strmbase_renderer *iface, REFIID iid, void **out) { - DSoundRenderImpl *filter = impl_from_BaseRenderer(iface); + DSoundRenderImpl *filter = impl_from_strmbase_renderer(iface);
if (IsEqualGUID(iid, &IID_IBasicAudio)) *out = &filter->IBasicAudio_iface; diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 48b845a14b..0752a586bd 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
typedef struct VideoRendererImpl { - BaseRenderer renderer; + struct strmbase_renderer renderer; BaseControlWindow baseControlWindow; BaseControlVideo baseControlVideo;
@@ -61,7 +61,7 @@ static inline VideoRendererImpl *impl_from_BaseWindow(BaseWindow *iface) return CONTAINING_RECORD(iface, VideoRendererImpl, baseControlWindow.baseWindow); }
-static inline VideoRendererImpl *impl_from_BaseRenderer(BaseRenderer *iface) +static inline VideoRendererImpl *impl_from_strmbase_renderer(struct strmbase_renderer *iface) { return CONTAINING_RECORD(iface, VideoRendererImpl, renderer); } @@ -176,7 +176,8 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data, return S_OK; }
-static HRESULT WINAPI VideoRenderer_ShouldDrawSampleNow(BaseRenderer *This, IMediaSample *pSample, REFERENCE_TIME *pStartTime, REFERENCE_TIME *pEndTime) +static HRESULT WINAPI VideoRenderer_ShouldDrawSampleNow(struct strmbase_renderer *filter, + IMediaSample *pSample, REFERENCE_TIME *start, REFERENCE_TIME *end) { /* Preroll means the sample isn't shown, this is used for key frames and things like that */ if (IMediaSample_IsPreroll(pSample) == S_OK) @@ -184,9 +185,9 @@ static HRESULT WINAPI VideoRenderer_ShouldDrawSampleNow(BaseRenderer *This, IMed return S_FALSE; }
-static HRESULT WINAPI VideoRenderer_DoRenderSample(BaseRenderer* iface, IMediaSample * pSample) +static HRESULT WINAPI VideoRenderer_DoRenderSample(struct strmbase_renderer *iface, IMediaSample *pSample) { - VideoRendererImpl *This = impl_from_BaseRenderer(iface); + VideoRendererImpl *This = impl_from_strmbase_renderer(iface); LPBYTE pbSrcStream = NULL; LONG cbSrcStream = 0; HRESULT hr; @@ -235,9 +236,9 @@ static HRESULT WINAPI VideoRenderer_DoRenderSample(BaseRenderer* iface, IMediaSa return S_OK; }
-static HRESULT WINAPI VideoRenderer_CheckMediaType(BaseRenderer *iface, const AM_MEDIA_TYPE * pmt) +static HRESULT WINAPI VideoRenderer_CheckMediaType(struct strmbase_renderer *iface, const AM_MEDIA_TYPE *pmt) { - VideoRendererImpl *This = impl_from_BaseRenderer(iface); + VideoRendererImpl *This = impl_from_strmbase_renderer(iface);
if (!IsEqualIID(&pmt->majortype, &MEDIATYPE_Video)) return S_FALSE; @@ -284,9 +285,9 @@ static HRESULT WINAPI VideoRenderer_CheckMediaType(BaseRenderer *iface, const AM return S_FALSE; }
-static void video_renderer_destroy(BaseRenderer *iface) +static void video_renderer_destroy(struct strmbase_renderer *iface) { - VideoRendererImpl *filter = impl_from_BaseRenderer(iface); + VideoRendererImpl *filter = impl_from_strmbase_renderer(iface);
BaseControlWindow_Destroy(&filter->baseControlWindow); BaseControlVideo_Destroy(&filter->baseControlVideo); @@ -295,9 +296,9 @@ static void video_renderer_destroy(BaseRenderer *iface) CoTaskMemFree(filter); }
-static HRESULT video_renderer_query_interface(BaseRenderer *iface, REFIID iid, void **out) +static HRESULT video_renderer_query_interface(struct strmbase_renderer *iface, REFIID iid, void **out) { - VideoRendererImpl *filter = impl_from_BaseRenderer(iface); + VideoRendererImpl *filter = impl_from_strmbase_renderer(iface);
if (IsEqualGUID(iid, &IID_IBasicVideo)) *out = &filter->baseControlVideo.IBasicVideo_iface; @@ -310,9 +311,9 @@ static HRESULT video_renderer_query_interface(BaseRenderer *iface, REFIID iid, v return S_OK; }
-static HRESULT video_renderer_pin_query_interface(BaseRenderer *iface, REFIID iid, void **out) +static HRESULT video_renderer_pin_query_interface(struct strmbase_renderer *iface, REFIID iid, void **out) { - VideoRendererImpl *filter = impl_from_BaseRenderer(iface); + VideoRendererImpl *filter = impl_from_strmbase_renderer(iface);
if (IsEqualGUID(iid, &IID_IOverlay)) *out = &filter->IOverlay_iface; @@ -323,9 +324,9 @@ static HRESULT video_renderer_pin_query_interface(BaseRenderer *iface, REFIID ii return S_OK; }
-static void video_renderer_stop_stream(BaseRenderer *iface) +static void video_renderer_stop_stream(struct strmbase_renderer *iface) { - VideoRendererImpl *This = impl_from_BaseRenderer(iface); + VideoRendererImpl *This = impl_from_strmbase_renderer(iface);
TRACE("(%p)->()\n", This);
@@ -334,9 +335,9 @@ static void video_renderer_stop_stream(BaseRenderer *iface) RedrawWindow(This->baseControlWindow.baseWindow.hWnd, NULL, NULL, RDW_INVALIDATE|RDW_ERASE); }
-static void video_renderer_init_stream(BaseRenderer *iface) +static void video_renderer_init_stream(struct strmbase_renderer *iface) { - VideoRendererImpl *filter = impl_from_BaseRenderer(iface); + VideoRendererImpl *filter = impl_from_strmbase_renderer(iface);
VideoRenderer_AutoShowWindow(filter); } diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index d631165d1b..6a039db99a 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -41,7 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
struct quartz_vmr { - BaseRenderer renderer; + struct strmbase_renderer renderer; BaseControlWindow baseControlWindow; BaseControlVideo baseControlVideo;
@@ -256,7 +256,7 @@ static DWORD VMR9_SendSampleData(struct quartz_vmr *This, VMR9PresentationInfo * return hr; }
-static HRESULT WINAPI VMR9_DoRenderSample(BaseRenderer *iface, IMediaSample * pSample) +static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMediaSample *pSample) { struct quartz_vmr *This = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface); LPBYTE pbSrcStream = NULL; @@ -321,7 +321,7 @@ static HRESULT WINAPI VMR9_DoRenderSample(BaseRenderer *iface, IMediaSample * pS return hr; }
-static HRESULT WINAPI VMR9_CheckMediaType(BaseRenderer *iface, const AM_MEDIA_TYPE * pmt) +static HRESULT WINAPI VMR9_CheckMediaType(struct strmbase_renderer *iface, const AM_MEDIA_TYPE *pmt) { struct quartz_vmr *This = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
@@ -412,7 +412,7 @@ static HRESULT VMR9_maybe_init(struct quartz_vmr *This, BOOL force) return hr; }
-static void vmr_start_stream(BaseRenderer *iface) +static void vmr_start_stream(struct strmbase_renderer *iface) { struct quartz_vmr *This = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
@@ -430,7 +430,7 @@ static void vmr_start_stream(BaseRenderer *iface) GetClientRect(This->baseControlWindow.baseWindow.hWnd, &This->target_rect); }
-static void vmr_stop_stream(BaseRenderer *iface) +static void vmr_stop_stream(struct strmbase_renderer *iface) { struct quartz_vmr *This = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
@@ -440,7 +440,8 @@ static void vmr_stop_stream(BaseRenderer *iface) IVMRImagePresenter9_StopPresenting(This->presenter, This->cookie); }
-static HRESULT WINAPI VMR9_ShouldDrawSampleNow(BaseRenderer *This, IMediaSample *pSample, REFERENCE_TIME *pStartTime, REFERENCE_TIME *pEndTime) +static HRESULT WINAPI VMR9_ShouldDrawSampleNow(struct strmbase_renderer *iface, + IMediaSample *pSample, REFERENCE_TIME *start, REFERENCE_TIME *end) { /* Preroll means the sample isn't shown, this is used for key frames and things like that */ if (IMediaSample_IsPreroll(pSample) == S_OK) @@ -448,7 +449,7 @@ static HRESULT WINAPI VMR9_ShouldDrawSampleNow(BaseRenderer *This, IMediaSample return S_FALSE; }
-static HRESULT WINAPI VMR9_CompleteConnect(BaseRenderer *This, IPin *pReceivePin) +static HRESULT WINAPI VMR9_CompleteConnect(struct strmbase_renderer *This, IPin *pReceivePin) { struct quartz_vmr *pVMR9 = impl_from_IBaseFilter(&This->filter.IBaseFilter_iface); HRESULT hr; @@ -462,7 +463,7 @@ static HRESULT WINAPI VMR9_CompleteConnect(BaseRenderer *This, IPin *pReceivePin return hr; }
-static HRESULT WINAPI VMR9_BreakConnect(BaseRenderer *This) +static HRESULT WINAPI VMR9_BreakConnect(struct strmbase_renderer *This) { struct quartz_vmr *pVMR9 = impl_from_IBaseFilter(&This->filter.IBaseFilter_iface); HRESULT hr = S_OK; @@ -483,7 +484,7 @@ static HRESULT WINAPI VMR9_BreakConnect(BaseRenderer *This) return hr; }
-static void vmr_destroy(BaseRenderer *iface) +static void vmr_destroy(struct strmbase_renderer *iface) { struct quartz_vmr *filter = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
@@ -506,7 +507,7 @@ static void vmr_destroy(BaseRenderer *iface) CoTaskMemFree(filter); }
-static HRESULT vmr_query_interface(BaseRenderer *iface, REFIID iid, void **out) +static HRESULT vmr_query_interface(struct strmbase_renderer *iface, REFIID iid, void **out) { struct quartz_vmr *filter = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
@@ -541,7 +542,7 @@ static HRESULT vmr_query_interface(BaseRenderer *iface, REFIID iid, void **out) return S_OK; }
-static HRESULT vmr_pin_query_interface(BaseRenderer *iface, REFIID iid, void **out) +static HRESULT vmr_pin_query_interface(struct strmbase_renderer *iface, REFIID iid, void **out) { struct quartz_vmr *filter = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index 81afc7c8d7..8ff687e453 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -22,14 +22,14 @@
WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
-static inline BaseRenderer *impl_from_IBaseFilter(IBaseFilter *iface) +static inline struct strmbase_renderer *impl_from_IBaseFilter(IBaseFilter *iface) { - return CONTAINING_RECORD(iface, BaseRenderer, filter.IBaseFilter_iface); + return CONTAINING_RECORD(iface, struct strmbase_renderer, filter.IBaseFilter_iface); }
-static inline BaseRenderer *impl_from_strmbase_filter(struct strmbase_filter *iface) +static inline struct strmbase_renderer *impl_from_strmbase_filter(struct strmbase_filter *iface) { - return CONTAINING_RECORD(iface, BaseRenderer, filter); + return CONTAINING_RECORD(iface, struct strmbase_renderer, filter); }
static const IQualityControlVtbl Renderer_QualityControl_Vtbl = { @@ -40,14 +40,14 @@ static const IQualityControlVtbl Renderer_QualityControl_Vtbl = { QualityControlImpl_SetSink };
-static inline BaseRenderer *impl_from_IPin(IPin *iface) +static inline struct strmbase_renderer *impl_from_IPin(IPin *iface) { - return CONTAINING_RECORD(iface, BaseRenderer, sink.pin.IPin_iface); + return CONTAINING_RECORD(iface, struct strmbase_renderer, sink.pin.IPin_iface); }
static HRESULT WINAPI BaseRenderer_InputPin_ReceiveConnection(IPin *iface, IPin *peer, const AM_MEDIA_TYPE *mt) { - BaseRenderer *filter = impl_from_IPin(iface); + struct strmbase_renderer *filter = impl_from_IPin(iface); HRESULT hr;
TRACE("iface %p, peer %p, mt %p.\n", iface, peer, mt); @@ -67,7 +67,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_ReceiveConnection(IPin *iface, IPin
static HRESULT WINAPI BaseRenderer_InputPin_Disconnect(IPin * iface) { - BaseRenderer *filter = impl_from_IPin(iface); + struct strmbase_renderer *filter = impl_from_IPin(iface); HRESULT hr;
TRACE("iface %p.\n", iface); @@ -87,7 +87,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_Disconnect(IPin * iface)
static HRESULT WINAPI BaseRenderer_InputPin_EndOfStream(IPin * iface) { - BaseRenderer *pFilter = impl_from_IPin(iface); + struct strmbase_renderer *pFilter = impl_from_IPin(iface); HRESULT hr;
TRACE("iface %p.\n", iface); @@ -109,7 +109,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndOfStream(IPin * iface)
static HRESULT WINAPI BaseRenderer_InputPin_BeginFlush(IPin * iface) { - BaseRenderer *pFilter = impl_from_IPin(iface); + struct strmbase_renderer *pFilter = impl_from_IPin(iface); HRESULT hr;
TRACE("iface %p.\n", iface); @@ -126,7 +126,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_BeginFlush(IPin * iface)
static HRESULT WINAPI BaseRenderer_InputPin_EndFlush(IPin * iface) { - BaseRenderer *pFilter = impl_from_IPin(iface); + struct strmbase_renderer *pFilter = impl_from_IPin(iface); HRESULT hr;
TRACE("iface %p.\n", iface); @@ -170,7 +170,7 @@ static const IPinVtbl BaseRenderer_InputPin_Vtbl =
static IPin *renderer_get_pin(struct strmbase_filter *iface, unsigned int index) { - BaseRenderer *filter = impl_from_strmbase_filter(iface); + struct strmbase_renderer *filter = impl_from_strmbase_filter(iface);
if (index == 0) return &filter->sink.pin.IPin_iface; @@ -179,13 +179,13 @@ static IPin *renderer_get_pin(struct strmbase_filter *iface, unsigned int index)
static void renderer_destroy(struct strmbase_filter *iface) { - BaseRenderer *filter = impl_from_strmbase_filter(iface); + struct strmbase_renderer *filter = impl_from_strmbase_filter(iface); filter->pFuncsTable->renderer_destroy(filter); }
static HRESULT renderer_query_interface(struct strmbase_filter *iface, REFIID iid, void **out) { - BaseRenderer *filter = impl_from_strmbase_filter(iface); + struct strmbase_renderer *filter = impl_from_strmbase_filter(iface); HRESULT hr;
if (filter->pFuncsTable->renderer_query_interface @@ -214,13 +214,13 @@ static const struct strmbase_filter_ops filter_ops =
static HRESULT sink_query_accept(struct strmbase_pin *pin, const AM_MEDIA_TYPE *mt) { - BaseRenderer *filter = impl_from_IPin(&pin->IPin_iface); + struct strmbase_renderer *filter = impl_from_IPin(&pin->IPin_iface); return filter->pFuncsTable->pfnCheckMediaType(filter, mt); }
static HRESULT sink_query_interface(struct strmbase_pin *iface, REFIID iid, void **out) { - BaseRenderer *filter = impl_from_IPin(&iface->IPin_iface); + struct strmbase_renderer *filter = impl_from_IPin(&iface->IPin_iface); HRESULT hr;
if (filter->pFuncsTable->renderer_pin_query_interface @@ -238,7 +238,7 @@ static HRESULT sink_query_interface(struct strmbase_pin *iface, REFIID iid, void
static HRESULT WINAPI BaseRenderer_Receive(BaseInputPin *pin, IMediaSample *sample) { - BaseRenderer *filter = impl_from_IPin(&pin->pin.IPin_iface); + struct strmbase_renderer *filter = impl_from_IPin(&pin->pin.IPin_iface); return BaseRendererImpl_Receive(filter, sample); }
@@ -250,7 +250,7 @@ static const BaseInputPinFuncTable input_BaseInputFuncTable = .pfnReceive = BaseRenderer_Receive, };
-void strmbase_renderer_cleanup(BaseRenderer *filter) +void strmbase_renderer_cleanup(struct strmbase_renderer *filter) { if (filter->sink.pin.peer) IPin_Disconnect(filter->sink.pin.peer); @@ -271,7 +271,7 @@ void strmbase_renderer_cleanup(BaseRenderer *filter) strmbase_filter_cleanup(&filter->filter); }
-HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSample) +HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSample *pSample) { HRESULT hr = S_OK; REFERENCE_TIME start, stop; @@ -373,7 +373,7 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp
static HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter *iface) { - BaseRenderer *This = impl_from_IBaseFilter(iface); + struct strmbase_renderer *This = impl_from_IBaseFilter(iface);
TRACE("(%p)->()\n", This);
@@ -393,7 +393,7 @@ static HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter *iface)
static HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter *iface, REFERENCE_TIME tStart) { - BaseRenderer *This = impl_from_IBaseFilter(iface); + struct strmbase_renderer *This = impl_from_IBaseFilter(iface);
TRACE("iface %p, start %s.\n", iface, debugstr_time(tStart));
@@ -427,7 +427,7 @@ out:
static HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter *iface) { - BaseRenderer *This = impl_from_IBaseFilter(iface); + struct strmbase_renderer *This = impl_from_IBaseFilter(iface); HRESULT hr = S_OK;
TRACE("(%p)->()\n", This); @@ -463,7 +463,7 @@ static HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter *iface)
static HRESULT WINAPI BaseRendererImpl_SetSyncSource(IBaseFilter *iface, IReferenceClock *clock) { - BaseRenderer *This = impl_from_IBaseFilter(iface); + struct strmbase_renderer *This = impl_from_IBaseFilter(iface); HRESULT hr;
EnterCriticalSection(&This->filter.csFilter); @@ -477,7 +477,7 @@ static HRESULT WINAPI BaseRendererImpl_SetSyncSource(IBaseFilter *iface, IRefere static HRESULT WINAPI BaseRendererImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState) { HRESULT hr; - BaseRenderer *This = impl_from_IBaseFilter(iface); + struct strmbase_renderer *This = impl_from_IBaseFilter(iface);
TRACE("(%p)->(%d, %p)\n", This, dwMilliSecsTimeout, pState);
@@ -510,7 +510,7 @@ static const IBaseFilterVtbl strmbase_renderer_vtbl = BaseFilterImpl_QueryVendorInfo };
-HRESULT WINAPI BaseRendererImpl_EndOfStream(BaseRenderer* iface) +HRESULT WINAPI BaseRendererImpl_EndOfStream(struct strmbase_renderer *iface) { IMediaEventSink* pEventSink; IFilterGraph *graph; @@ -533,7 +533,7 @@ HRESULT WINAPI BaseRendererImpl_EndOfStream(BaseRenderer* iface) return hr; }
-HRESULT WINAPI BaseRendererImpl_BeginFlush(BaseRenderer* iface) +HRESULT WINAPI BaseRendererImpl_BeginFlush(struct strmbase_renderer *iface) { TRACE("(%p)\n", iface); BaseRendererImpl_ClearPendingSample(iface); @@ -541,7 +541,7 @@ HRESULT WINAPI BaseRendererImpl_BeginFlush(BaseRenderer* iface) return S_OK; }
-HRESULT WINAPI BaseRendererImpl_EndFlush(BaseRenderer* iface) +HRESULT WINAPI BaseRendererImpl_EndFlush(struct strmbase_renderer *iface) { TRACE("(%p)\n", iface); QualityControlRender_Start(iface->qcimpl, iface->stream_start); @@ -550,7 +550,7 @@ HRESULT WINAPI BaseRendererImpl_EndFlush(BaseRenderer* iface) return S_OK; }
-HRESULT WINAPI BaseRendererImpl_ClearPendingSample(BaseRenderer *iface) +HRESULT WINAPI BaseRendererImpl_ClearPendingSample(struct strmbase_renderer *iface) { if (iface->pMediaSample) { @@ -560,7 +560,7 @@ HRESULT WINAPI BaseRendererImpl_ClearPendingSample(BaseRenderer *iface) return S_OK; }
-HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, IUnknown *outer, +HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown *outer, const CLSID *clsid, const WCHAR *sink_name, const BaseRendererFuncTable *func_table) { HRESULT hr; @@ -583,7 +583,7 @@ HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, IUnknown *outer, }
InitializeCriticalSection(&filter->csRenderLock); - filter->csRenderLock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": BaseRenderer.csRenderLock"); + filter->csRenderLock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": strmbase_renderer.csRenderLock"); filter->state_event = CreateEventW(NULL, TRUE, TRUE, NULL); filter->advise_event = CreateEventW(NULL, FALSE, FALSE, NULL); filter->flush_event = CreateEventW(NULL, TRUE, TRUE, NULL); diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index acfe6d8ab4..3c90223955 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -505,8 +505,7 @@ HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo); #endif #endif
-/* BaseRenderer Filter */ -typedef struct BaseRendererTag +struct strmbase_renderer { struct strmbase_filter filter;
@@ -529,50 +528,45 @@ typedef struct BaseRendererTag struct QualityControlImpl *qcimpl;
const struct BaseRendererFuncTable *pFuncsTable; -} BaseRenderer; +};
-typedef HRESULT (WINAPI *BaseRenderer_CheckMediaType)(BaseRenderer *This, const AM_MEDIA_TYPE *pmt); -typedef HRESULT (WINAPI *BaseRenderer_DoRenderSample)(BaseRenderer *This, IMediaSample *pMediaSample); -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_OnWaitEnd)(BaseRenderer *This); -typedef VOID (WINAPI *BaseRenderer_OnWaitStart)(BaseRenderer *This); -typedef VOID (WINAPI *BaseRenderer_PrepareRender)(BaseRenderer *This); -typedef HRESULT (WINAPI *BaseRenderer_ShouldDrawSampleNow)(BaseRenderer *This, IMediaSample *pMediaSample, REFERENCE_TIME *pStartTime, REFERENCE_TIME *pEndTime); -typedef HRESULT (WINAPI *BaseRenderer_PrepareReceive)(BaseRenderer *This, IMediaSample *pMediaSample); -typedef HRESULT (WINAPI *BaseRenderer_EndOfStream)(BaseRenderer *This); -typedef HRESULT (WINAPI *BaseRenderer_BeginFlush) (BaseRenderer *This); -typedef HRESULT (WINAPI *BaseRenderer_EndFlush) (BaseRenderer *This); -typedef HRESULT (WINAPI *BaseRenderer_BreakConnect) (BaseRenderer *This); -typedef HRESULT (WINAPI *BaseRenderer_CompleteConnect) (BaseRenderer *This, IPin *pReceivePin); +typedef HRESULT (WINAPI *BaseRenderer_CheckMediaType)(struct strmbase_renderer *iface, const AM_MEDIA_TYPE *mt); +typedef HRESULT (WINAPI *BaseRenderer_DoRenderSample)(struct strmbase_renderer *iface, IMediaSample *sample); +typedef HRESULT (WINAPI *BaseRenderer_ShouldDrawSampleNow)(struct strmbase_renderer *iface, + IMediaSample *sample, REFERENCE_TIME *start, REFERENCE_TIME *end); +typedef HRESULT (WINAPI *BaseRenderer_PrepareReceive)(struct strmbase_renderer *iface, IMediaSample *sample); +typedef HRESULT (WINAPI *BaseRenderer_EndOfStream)(struct strmbase_renderer *iface); +typedef HRESULT (WINAPI *BaseRenderer_BeginFlush) (struct strmbase_renderer *iface); +typedef HRESULT (WINAPI *BaseRenderer_EndFlush) (struct strmbase_renderer *iface); +typedef HRESULT (WINAPI *BaseRenderer_BreakConnect) (struct strmbase_renderer *iface); +typedef HRESULT (WINAPI *BaseRenderer_CompleteConnect) (struct strmbase_renderer *iface, IPin *peer);
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); + void (*renderer_init_stream)(struct strmbase_renderer *iface); + void (*renderer_start_stream)(struct strmbase_renderer *iface); + void (*renderer_stop_stream)(struct strmbase_renderer *iface); 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); - HRESULT (*renderer_pin_query_interface)(BaseRenderer *iface, REFIID iid, void **out); + void (*renderer_destroy)(struct strmbase_renderer *iface); + HRESULT (*renderer_query_interface)(struct strmbase_renderer *iface, REFIID iid, void **out); + HRESULT (*renderer_pin_query_interface)(struct strmbase_renderer *iface, REFIID iid, void **out); } BaseRendererFuncTable;
-HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSample); -HRESULT WINAPI BaseRendererImpl_EndOfStream(BaseRenderer* iface); -HRESULT WINAPI BaseRendererImpl_BeginFlush(BaseRenderer* iface); -HRESULT WINAPI BaseRendererImpl_EndFlush(BaseRenderer* iface); -HRESULT WINAPI BaseRendererImpl_ClearPendingSample(BaseRenderer *iface); +HRESULT WINAPI BaseRendererImpl_BeginFlush(struct strmbase_renderer *filter); +HRESULT WINAPI BaseRendererImpl_ClearPendingSample(struct strmbase_renderer *filter); +HRESULT WINAPI BaseRendererImpl_EndOfStream(struct strmbase_renderer *filter); +HRESULT WINAPI BaseRendererImpl_EndFlush(struct strmbase_renderer *filter); +HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *filter, IMediaSample *sample);
-HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, IUnknown *outer, +HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown *outer, const CLSID *clsid, const WCHAR *sink_name, const BaseRendererFuncTable *func_table); -void strmbase_renderer_cleanup(BaseRenderer *filter); +void strmbase_renderer_cleanup(struct strmbase_renderer *filter);
/* Dll Functions */ BOOL WINAPI STRMBASE_DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv);