"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dlls/strmbase/renderer.c" between
wine-5.12.tar.xz and wine-5.13.tar.xz

About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs. Development release.

renderer.c  (wine-5.12.tar.xz):renderer.c  (wine-5.13.tar.xz)
skipping to change at line 30 skipping to change at line 30
#include "strmbase_private.h" #include "strmbase_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(strmbase); WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
static inline struct strmbase_renderer *impl_from_strmbase_filter(struct strmbas e_filter *iface) static inline struct strmbase_renderer *impl_from_strmbase_filter(struct strmbas e_filter *iface)
{ {
return CONTAINING_RECORD(iface, struct strmbase_renderer, filter); return CONTAINING_RECORD(iface, struct strmbase_renderer, filter);
} }
static const IQualityControlVtbl Renderer_QualityControl_Vtbl = {
QualityControlImpl_QueryInterface,
QualityControlImpl_AddRef,
QualityControlImpl_Release,
QualityControlImpl_Notify,
QualityControlImpl_SetSink
};
static inline struct strmbase_renderer *impl_from_IPin(IPin *iface) static inline struct strmbase_renderer *impl_from_IPin(IPin *iface)
{ {
return CONTAINING_RECORD(iface, struct strmbase_renderer, sink.pin.IPin_ifac e); return CONTAINING_RECORD(iface, struct strmbase_renderer, sink.pin.IPin_ifac e);
} }
static struct strmbase_pin *renderer_get_pin(struct strmbase_filter *iface, unsi gned int index) static struct strmbase_pin *renderer_get_pin(struct strmbase_filter *iface, unsi gned int index)
{ {
struct strmbase_renderer *filter = impl_from_strmbase_filter(iface); struct strmbase_renderer *filter = impl_from_strmbase_filter(iface);
if (index == 0) if (index == 0)
skipping to change at line 74 skipping to change at line 66
&& SUCCEEDED(hr = filter->pFuncsTable->renderer_query_interface(filt er, iid, out))) && SUCCEEDED(hr = filter->pFuncsTable->renderer_query_interface(filt er, iid, out)))
{ {
return hr; return hr;
} }
if (IsEqualGUID(iid, &IID_IMediaPosition)) if (IsEqualGUID(iid, &IID_IMediaPosition))
*out = &filter->passthrough.IMediaPosition_iface; *out = &filter->passthrough.IMediaPosition_iface;
else if (IsEqualGUID(iid, &IID_IMediaSeeking)) else if (IsEqualGUID(iid, &IID_IMediaSeeking))
*out = &filter->passthrough.IMediaSeeking_iface; *out = &filter->passthrough.IMediaSeeking_iface;
else if (IsEqualGUID(iid, &IID_IQualityControl)) else if (IsEqualGUID(iid, &IID_IQualityControl))
*out = &filter->qcimpl->IQualityControl_iface; *out = &filter->qc.IQualityControl_iface;
else else
return E_NOINTERFACE; return E_NOINTERFACE;
IUnknown_AddRef((IUnknown *)*out); IUnknown_AddRef((IUnknown *)*out);
return S_OK; return S_OK;
} }
static HRESULT renderer_init_stream(struct strmbase_filter *iface) static HRESULT renderer_init_stream(struct strmbase_filter *iface)
{ {
struct strmbase_renderer *filter = impl_from_strmbase_filter(iface); struct strmbase_renderer *filter = impl_from_strmbase_filter(iface);
skipping to change at line 104 skipping to change at line 96
} }
static HRESULT renderer_start_stream(struct strmbase_filter *iface, REFERENCE_TI ME start) static HRESULT renderer_start_stream(struct strmbase_filter *iface, REFERENCE_TI ME start)
{ {
struct strmbase_renderer *filter = impl_from_strmbase_filter(iface); struct strmbase_renderer *filter = impl_from_strmbase_filter(iface);
filter->stream_start = start; filter->stream_start = start;
SetEvent(filter->state_event); SetEvent(filter->state_event);
if (filter->sink.pin.peer) if (filter->sink.pin.peer)
filter->eos = FALSE; filter->eos = FALSE;
QualityControlRender_Start(filter->qcimpl, filter->stream_start); QualityControlRender_Start(&filter->qc, filter->stream_start);
if (filter->sink.pin.peer && filter->pFuncsTable->renderer_start_stream) if (filter->sink.pin.peer && filter->pFuncsTable->renderer_start_stream)
filter->pFuncsTable->renderer_start_stream(filter); filter->pFuncsTable->renderer_start_stream(filter);
return S_OK; return S_OK;
} }
static HRESULT renderer_stop_stream(struct strmbase_filter *iface) static HRESULT renderer_stop_stream(struct strmbase_filter *iface)
{ {
struct strmbase_renderer *filter = impl_from_strmbase_filter(iface); struct strmbase_renderer *filter = impl_from_strmbase_filter(iface);
skipping to change at line 245 skipping to change at line 237
} }
static HRESULT sink_end_flush(struct strmbase_sink *iface) static HRESULT sink_end_flush(struct strmbase_sink *iface)
{ {
struct strmbase_renderer *filter = impl_from_IPin(&iface->pin.IPin_iface); struct strmbase_renderer *filter = impl_from_IPin(&iface->pin.IPin_iface);
HRESULT hr = S_OK; HRESULT hr = S_OK;
EnterCriticalSection(&filter->csRenderLock); EnterCriticalSection(&filter->csRenderLock);
filter->eos = FALSE; filter->eos = FALSE;
QualityControlRender_Start(filter->qcimpl, filter->stream_start); QualityControlRender_Start(&filter->qc, filter->stream_start);
strmbase_passthrough_invalidate_time(&filter->passthrough); strmbase_passthrough_invalidate_time(&filter->passthrough);
ResetEvent(filter->flush_event); ResetEvent(filter->flush_event);
if (filter->pFuncsTable->pfnEndFlush) if (filter->pFuncsTable->pfnEndFlush)
hr = filter->pFuncsTable->pfnEndFlush(filter); hr = filter->pFuncsTable->pfnEndFlush(filter);
LeaveCriticalSection(&filter->csRenderLock); LeaveCriticalSection(&filter->csRenderLock);
return hr; return hr;
} }
skipping to change at line 283 skipping to change at line 275
strmbase_sink_cleanup(&filter->sink); strmbase_sink_cleanup(&filter->sink);
strmbase_passthrough_cleanup(&filter->passthrough); strmbase_passthrough_cleanup(&filter->passthrough);
filter->csRenderLock.DebugInfo->Spare[0] = 0; filter->csRenderLock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&filter->csRenderLock); DeleteCriticalSection(&filter->csRenderLock);
CloseHandle(filter->state_event); CloseHandle(filter->state_event);
CloseHandle(filter->advise_event); CloseHandle(filter->advise_event);
CloseHandle(filter->flush_event); CloseHandle(filter->flush_event);
QualityControlImpl_Destroy(filter->qcimpl);
strmbase_filter_cleanup(&filter->filter); strmbase_filter_cleanup(&filter->filter);
} }
HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa mple *pSample) HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa mple *pSample)
{ {
HRESULT hr = S_OK; HRESULT hr = S_OK;
REFERENCE_TIME start, stop; REFERENCE_TIME start, stop;
AM_MEDIA_TYPE *pmt; AM_MEDIA_TYPE *pmt;
TRACE("(%p)->%p\n", This, pSample); TRACE("(%p)->%p\n", This, pSample);
skipping to change at line 378 skipping to change at line 369
LeaveCriticalSection(&This->csRenderLock); LeaveCriticalSection(&This->csRenderLock);
/* Drop Sample */ /* Drop Sample */
return S_OK; return S_OK;
} }
} }
else else
start = stop = -1; start = stop = -1;
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
QualityControlRender_BeginRender(This->qcimpl, start, stop); QualityControlRender_BeginRender(&This->qc, start, stop);
hr = This->pFuncsTable->pfnDoRenderSample(This, pSample); hr = This->pFuncsTable->pfnDoRenderSample(This, pSample);
QualityControlRender_EndRender(This->qcimpl); QualityControlRender_EndRender(&This->qc);
} }
QualityControlRender_DoQOS(This->qcimpl); QualityControlRender_DoQOS(&This->qc);
LeaveCriticalSection(&This->csRenderLock); LeaveCriticalSection(&This->csRenderLock);
return hr; return hr;
} }
void strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown *outer, void strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown *outer,
const CLSID *clsid, const WCHAR *sink_name, const struct strmbase_render er_ops *ops) const CLSID *clsid, const WCHAR *sink_name, const struct strmbase_render er_ops *ops)
{ {
memset(filter, 0, sizeof(*filter)); memset(filter, 0, sizeof(*filter));
strmbase_filter_init(&filter->filter, outer, clsid, &filter_ops); strmbase_filter_init(&filter->filter, outer, clsid, &filter_ops);
strmbase_passthrough_init(&filter->passthrough, (IUnknown *)&filter->filter. IBaseFilter_iface); strmbase_passthrough_init(&filter->passthrough, (IUnknown *)&filter->filter. IBaseFilter_iface);
ISeekingPassThru_Init(&filter->passthrough.ISeekingPassThru_iface, TRUE, &fi lter->sink.pin.IPin_iface); ISeekingPassThru_Init(&filter->passthrough.ISeekingPassThru_iface, TRUE, &fi lter->sink.pin.IPin_iface);
strmbase_qc_init(&filter->qc, &filter->sink.pin);
filter->pFuncsTable = ops; filter->pFuncsTable = ops;
strmbase_sink_init(&filter->sink, &filter->filter, sink_name, &sink_ops, NUL L); strmbase_sink_init(&filter->sink, &filter->filter, sink_name, &sink_ops, NUL L);
InitializeCriticalSection(&filter->csRenderLock); InitializeCriticalSection(&filter->csRenderLock);
filter->csRenderLock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": strmbase_r enderer.csRenderLock"); filter->csRenderLock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": strmbase_r enderer.csRenderLock");
filter->state_event = CreateEventW(NULL, TRUE, TRUE, NULL); filter->state_event = CreateEventW(NULL, TRUE, TRUE, NULL);
filter->advise_event = CreateEventW(NULL, FALSE, FALSE, NULL); filter->advise_event = CreateEventW(NULL, FALSE, FALSE, NULL);
filter->flush_event = CreateEventW(NULL, TRUE, TRUE, NULL); filter->flush_event = CreateEventW(NULL, TRUE, TRUE, NULL);
QualityControlImpl_Create(&filter->sink.pin, &filter->qcimpl);
filter->qcimpl->IQualityControl_iface.lpVtbl = &Renderer_QualityControl_Vtbl
;
} }
 End of changes. 10 change blocks. 
19 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)