strmbase/renderer: Add a destructor callback.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-05-27 23:09:55 -05:00 committed by Alexandre Julliard
parent e2194b93b5
commit 1296526450
2 changed files with 13 additions and 4 deletions

View File

@ -194,6 +194,18 @@ static IPin *renderer_get_pin(BaseFilter *iface, unsigned int index)
return &This->pInputPin->pin.IPin_iface;
}
static void renderer_destroy(BaseFilter *iface)
{
BaseRenderer *filter = impl_from_BaseFilter(iface);
filter->pFuncsTable->renderer_destroy(filter);
}
static const BaseFilterFuncTable RendererBaseFilterFuncTable =
{
.filter_get_pin = renderer_get_pin,
.filter_destroy = renderer_destroy,
};
static HRESULT WINAPI BaseRenderer_Input_CheckMediaType(BasePin *pin, const AM_MEDIA_TYPE * pmt)
{
BaseRenderer *This = impl_from_IBaseFilter(pin->pinInfo.pFilter);
@ -206,10 +218,6 @@ static HRESULT WINAPI BaseRenderer_Receive(BaseInputPin *pin, IMediaSample * pSa
return BaseRendererImpl_Receive(This, pSample);
}
static const BaseFilterFuncTable RendererBaseFilterFuncTable = {
.filter_get_pin = renderer_get_pin,
};
static const BaseInputPinFuncTable input_BaseInputFuncTable = {
{
BaseRenderer_Input_CheckMediaType,

View File

@ -604,6 +604,7 @@ typedef struct BaseRendererFuncTable {
BaseRenderer_EndOfStream pfnEndOfStream;
BaseRenderer_BeginFlush pfnBeginFlush;
BaseRenderer_EndFlush pfnEndFlush;
void (*renderer_destroy)(BaseRenderer *iface);
} BaseRendererFuncTable;
HRESULT WINAPI BaseRendererImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv);