Commit 7e6ab5e5 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Move "AttemptConnection" to the base source pin function table.

parent e48559b2
...@@ -591,7 +591,6 @@ static const BaseInputPinFuncTable DirectDrawMediaStreamInputPin_FuncTable = ...@@ -591,7 +591,6 @@ static const BaseInputPinFuncTable DirectDrawMediaStreamInputPin_FuncTable =
{ {
{ {
DirectDrawMediaStreamInputPin_CheckMediaType, DirectDrawMediaStreamInputPin_CheckMediaType,
NULL,
DirectDrawMediaStreamInputPin_GetMediaTypeVersion, DirectDrawMediaStreamInputPin_GetMediaTypeVersion,
DirectDrawMediaStreamInputPin_GetMediaType, DirectDrawMediaStreamInputPin_GetMediaType,
}, },
...@@ -1135,7 +1134,6 @@ static const BaseInputPinFuncTable AudioMediaStreamInputPin_FuncTable = ...@@ -1135,7 +1134,6 @@ static const BaseInputPinFuncTable AudioMediaStreamInputPin_FuncTable =
{ {
{ {
AudioMediaStreamInputPin_CheckMediaType, AudioMediaStreamInputPin_CheckMediaType,
NULL,
AudioMediaStreamInputPin_GetMediaTypeVersion, AudioMediaStreamInputPin_GetMediaTypeVersion,
AudioMediaStreamInputPin_GetMediaType, AudioMediaStreamInputPin_GetMediaType,
}, },
......
...@@ -574,7 +574,6 @@ static HRESULT WINAPI AVICompressorIn_Receive(BaseInputPin *base, IMediaSample * ...@@ -574,7 +574,6 @@ static HRESULT WINAPI AVICompressorIn_Receive(BaseInputPin *base, IMediaSample *
static const BaseInputPinFuncTable AVICompressorBaseInputPinVtbl = { static const BaseInputPinFuncTable AVICompressorBaseInputPinVtbl = {
{ {
AVICompressorIn_CheckMediaType, AVICompressorIn_CheckMediaType,
NULL,
AVICompressorIn_GetMediaTypeVersion, AVICompressorIn_GetMediaTypeVersion,
AVICompressorIn_GetMediaType AVICompressorIn_GetMediaType
}, },
...@@ -679,10 +678,10 @@ static HRESULT WINAPI AVICompressorOut_BreakConnect(BaseOutputPin *base) ...@@ -679,10 +678,10 @@ static HRESULT WINAPI AVICompressorOut_BreakConnect(BaseOutputPin *base)
static const BaseOutputPinFuncTable AVICompressorBaseOutputPinVtbl = { static const BaseOutputPinFuncTable AVICompressorBaseOutputPinVtbl = {
{ {
NULL, NULL,
BaseOutputPinImpl_AttemptConnection,
AVICompressorOut_GetMediaTypeVersion, AVICompressorOut_GetMediaTypeVersion,
AVICompressorOut_GetMediaType AVICompressorOut_GetMediaType
}, },
BaseOutputPinImpl_AttemptConnection,
AVICompressorOut_DecideBufferSize, AVICompressorOut_DecideBufferSize,
AVICompressorOut_DecideAllocator, AVICompressorOut_DecideAllocator,
AVICompressorOut_BreakConnect AVICompressorOut_BreakConnect
......
...@@ -1229,7 +1229,7 @@ static HRESULT WINAPI AviMuxOut_CheckMediaType(BasePin *base, const AM_MEDIA_TYP ...@@ -1229,7 +1229,7 @@ static HRESULT WINAPI AviMuxOut_CheckMediaType(BasePin *base, const AM_MEDIA_TYP
return S_OK; return S_OK;
} }
static HRESULT WINAPI AviMuxOut_AttemptConnection(BasePin *base, static HRESULT WINAPI AviMuxOut_AttemptConnection(BaseOutputPin *base,
IPin *pReceivePin, const AM_MEDIA_TYPE *pmt) IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
{ {
PIN_DIRECTION dir; PIN_DIRECTION dir;
...@@ -1306,10 +1306,10 @@ static HRESULT WINAPI AviMuxOut_BreakConnect(BaseOutputPin *base) ...@@ -1306,10 +1306,10 @@ static HRESULT WINAPI AviMuxOut_BreakConnect(BaseOutputPin *base)
static const BaseOutputPinFuncTable AviMuxOut_BaseOutputFuncTable = { static const BaseOutputPinFuncTable AviMuxOut_BaseOutputFuncTable = {
{ {
AviMuxOut_CheckMediaType, AviMuxOut_CheckMediaType,
AviMuxOut_AttemptConnection,
AviMuxOut_GetMediaTypeVersion, AviMuxOut_GetMediaTypeVersion,
AviMuxOut_GetMediaType AviMuxOut_GetMediaType
}, },
AviMuxOut_AttemptConnection,
NULL, NULL,
AviMuxOut_DecideAllocator, AviMuxOut_DecideAllocator,
AviMuxOut_BreakConnect AviMuxOut_BreakConnect
...@@ -1701,7 +1701,6 @@ static HRESULT WINAPI AviMuxIn_Receive(BaseInputPin *base, IMediaSample *pSample ...@@ -1701,7 +1701,6 @@ static HRESULT WINAPI AviMuxIn_Receive(BaseInputPin *base, IMediaSample *pSample
static const BaseInputPinFuncTable AviMuxIn_BaseInputFuncTable = { static const BaseInputPinFuncTable AviMuxIn_BaseInputFuncTable = {
{ {
AviMuxIn_CheckMediaType, AviMuxIn_CheckMediaType,
NULL,
AviMuxIn_GetMediaTypeVersion, AviMuxIn_GetMediaTypeVersion,
AviMuxIn_GetMediaType AviMuxIn_GetMediaType
}, },
......
...@@ -425,7 +425,6 @@ static HRESULT WINAPI SmartTeeFilterInput_Receive(BaseInputPin *base, IMediaSamp ...@@ -425,7 +425,6 @@ static HRESULT WINAPI SmartTeeFilterInput_Receive(BaseInputPin *base, IMediaSamp
static const BaseInputPinFuncTable SmartTeeFilterInputFuncs = { static const BaseInputPinFuncTable SmartTeeFilterInputFuncs = {
{ {
SmartTeeFilterInput_CheckMediaType, SmartTeeFilterInput_CheckMediaType,
NULL,
SmartTeeFilterInput_GetMediaTypeVersion, SmartTeeFilterInput_GetMediaTypeVersion,
SmartTeeFilterInput_GetMediaType SmartTeeFilterInput_GetMediaType
}, },
...@@ -522,10 +521,10 @@ static HRESULT WINAPI SmartTeeFilterCapture_BreakConnect(BaseOutputPin *base) ...@@ -522,10 +521,10 @@ static HRESULT WINAPI SmartTeeFilterCapture_BreakConnect(BaseOutputPin *base)
static const BaseOutputPinFuncTable SmartTeeFilterCaptureFuncs = { static const BaseOutputPinFuncTable SmartTeeFilterCaptureFuncs = {
{ {
SmartTeeFilterCapture_CheckMediaType, SmartTeeFilterCapture_CheckMediaType,
BaseOutputPinImpl_AttemptConnection,
SmartTeeFilterCapture_GetMediaTypeVersion, SmartTeeFilterCapture_GetMediaTypeVersion,
SmartTeeFilterCapture_GetMediaType SmartTeeFilterCapture_GetMediaType
}, },
BaseOutputPinImpl_AttemptConnection,
NULL, NULL,
SmartTeeFilterCapture_DecideAllocator, SmartTeeFilterCapture_DecideAllocator,
SmartTeeFilterCapture_BreakConnect SmartTeeFilterCapture_BreakConnect
...@@ -621,10 +620,10 @@ static HRESULT WINAPI SmartTeeFilterPreview_BreakConnect(BaseOutputPin *base) ...@@ -621,10 +620,10 @@ static HRESULT WINAPI SmartTeeFilterPreview_BreakConnect(BaseOutputPin *base)
static const BaseOutputPinFuncTable SmartTeeFilterPreviewFuncs = { static const BaseOutputPinFuncTable SmartTeeFilterPreviewFuncs = {
{ {
SmartTeeFilterPreview_CheckMediaType, SmartTeeFilterPreview_CheckMediaType,
BaseOutputPinImpl_AttemptConnection,
SmartTeeFilterPreview_GetMediaTypeVersion, SmartTeeFilterPreview_GetMediaTypeVersion,
SmartTeeFilterPreview_GetMediaType SmartTeeFilterPreview_GetMediaType
}, },
BaseOutputPinImpl_AttemptConnection,
NULL, NULL,
SmartTeeFilterPreview_DecideAllocator, SmartTeeFilterPreview_DecideAllocator,
SmartTeeFilterPreview_BreakConnect SmartTeeFilterPreview_BreakConnect
......
...@@ -707,10 +707,10 @@ static HRESULT WINAPI VfwPin_DecideBufferSize(BaseOutputPin *iface, IMemAllocato ...@@ -707,10 +707,10 @@ static HRESULT WINAPI VfwPin_DecideBufferSize(BaseOutputPin *iface, IMemAllocato
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = { static const BaseOutputPinFuncTable output_BaseOutputFuncTable = {
{ {
VfwPin_CheckMediaType, VfwPin_CheckMediaType,
BaseOutputPinImpl_AttemptConnection,
VfwPin_GetMediaTypeVersion, VfwPin_GetMediaTypeVersion,
VfwPin_GetMediaType VfwPin_GetMediaType
}, },
BaseOutputPinImpl_AttemptConnection,
VfwPin_DecideBufferSize, VfwPin_DecideBufferSize,
BaseOutputPinImpl_DecideAllocator, BaseOutputPinImpl_DecideAllocator,
BaseOutputPinImpl_BreakConnect BaseOutputPinImpl_BreakConnect
......
...@@ -862,9 +862,9 @@ static const IPinVtbl FileAsyncReaderPin_Vtbl = ...@@ -862,9 +862,9 @@ static const IPinVtbl FileAsyncReaderPin_Vtbl =
/* specific AM_MEDIA_TYPE - it cannot be NULL */ /* specific AM_MEDIA_TYPE - it cannot be NULL */
/* this differs from standard OutputPin_AttemptConnection only in that it /* this differs from standard OutputPin_AttemptConnection only in that it
* doesn't need the IMemInputPin interface on the receiving pin */ * doesn't need the IMemInputPin interface on the receiving pin */
static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(BasePin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(BaseOutputPin *This,
IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
{ {
BaseOutputPin *This = impl_BaseOutputPin_from_BasePin(iface);
HRESULT hr; HRESULT hr;
TRACE("%p->(%p, %p)\n", This, pReceivePin, pmt); TRACE("%p->(%p, %p)\n", This, pReceivePin, pmt);
...@@ -876,7 +876,7 @@ static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(BasePin * iface, IPin ...@@ -876,7 +876,7 @@ static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(BasePin * iface, IPin
IPin_AddRef(pReceivePin); IPin_AddRef(pReceivePin);
CopyMediaType(&This->pin.mtCurrent, pmt); CopyMediaType(&This->pin.mtCurrent, pmt);
hr = IPin_ReceiveConnection(pReceivePin, &iface->IPin_iface, pmt); hr = IPin_ReceiveConnection(pReceivePin, &This->pin.IPin_iface, pmt);
if (FAILED(hr)) if (FAILED(hr))
{ {
...@@ -909,10 +909,10 @@ static HRESULT WINAPI FileAsyncReaderPin_DecideBufferSize(BaseOutputPin *iface, ...@@ -909,10 +909,10 @@ static HRESULT WINAPI FileAsyncReaderPin_DecideBufferSize(BaseOutputPin *iface,
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = { static const BaseOutputPinFuncTable output_BaseOutputFuncTable = {
{ {
FileAsyncReaderPin_CheckMediaType, FileAsyncReaderPin_CheckMediaType,
FileAsyncReaderPin_AttemptConnection,
BasePinImpl_GetMediaTypeVersion, BasePinImpl_GetMediaTypeVersion,
FileAsyncReaderPin_GetMediaType FileAsyncReaderPin_GetMediaType
}, },
FileAsyncReaderPin_AttemptConnection,
FileAsyncReaderPin_DecideBufferSize, FileAsyncReaderPin_DecideBufferSize,
BaseOutputPinImpl_DecideAllocator, BaseOutputPinImpl_DecideAllocator,
BaseOutputPinImpl_BreakConnect BaseOutputPinImpl_BreakConnect
......
...@@ -424,10 +424,10 @@ HRESULT WINAPI Parser_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo) ...@@ -424,10 +424,10 @@ HRESULT WINAPI Parser_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo)
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = { static const BaseOutputPinFuncTable output_BaseOutputFuncTable = {
{ {
Parser_OutputPin_CheckMediaType, Parser_OutputPin_CheckMediaType,
BaseOutputPinImpl_AttemptConnection,
BasePinImpl_GetMediaTypeVersion, BasePinImpl_GetMediaTypeVersion,
Parser_OutputPin_GetMediaType Parser_OutputPin_GetMediaType
}, },
BaseOutputPinImpl_AttemptConnection,
Parser_OutputPin_DecideBufferSize, Parser_OutputPin_DecideBufferSize,
Parser_OutputPin_DecideAllocator, Parser_OutputPin_DecideAllocator,
Parser_OutputPin_BreakConnect Parser_OutputPin_BreakConnect
......
...@@ -414,7 +414,7 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const ...@@ -414,7 +414,7 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
/* if we have been a specific type to connect with, then we can either connect /* if we have been a specific type to connect with, then we can either connect
* with that or fail. We cannot choose different AM_MEDIA_TYPE */ * with that or fail. We cannot choose different AM_MEDIA_TYPE */
if (pmt && !IsEqualGUID(&pmt->majortype, &GUID_NULL) && !IsEqualGUID(&pmt->subtype, &GUID_NULL)) if (pmt && !IsEqualGUID(&pmt->majortype, &GUID_NULL) && !IsEqualGUID(&pmt->subtype, &GUID_NULL))
hr = This->pin.pFuncsTable->pfnAttemptConnection(&This->pin, pReceivePin, pmt); hr = This->pFuncsTable->pfnAttemptConnection(This, pReceivePin, pmt);
else else
{ {
/* negotiate media type */ /* negotiate media type */
...@@ -434,8 +434,8 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const ...@@ -434,8 +434,8 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
if (!IsEqualGUID(&FORMAT_None, &pmtCandidate->formattype) if (!IsEqualGUID(&FORMAT_None, &pmtCandidate->formattype)
&& !IsEqualGUID(&GUID_NULL, &pmtCandidate->formattype)) && !IsEqualGUID(&GUID_NULL, &pmtCandidate->formattype))
assert(pmtCandidate->pbFormat); assert(pmtCandidate->pbFormat);
if (( !pmt || CompareMediaTypes(pmt, pmtCandidate, TRUE) ) && if ((!pmt || CompareMediaTypes(pmt, pmtCandidate, TRUE))
(This->pin.pFuncsTable->pfnAttemptConnection(&This->pin, pReceivePin, pmtCandidate) == S_OK)) && This->pFuncsTable->pfnAttemptConnection(This, pReceivePin, pmtCandidate) == S_OK)
{ {
hr = S_OK; hr = S_OK;
DeleteMediaType(pmtCandidate); DeleteMediaType(pmtCandidate);
...@@ -458,8 +458,8 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const ...@@ -458,8 +458,8 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
{ {
assert(pmtCandidate); assert(pmtCandidate);
dump_AM_MEDIA_TYPE(pmtCandidate); dump_AM_MEDIA_TYPE(pmtCandidate);
if (( !pmt || CompareMediaTypes(pmt, pmtCandidate, TRUE) ) && if ((!pmt || CompareMediaTypes(pmt, pmtCandidate, TRUE))
(This->pin.pFuncsTable->pfnAttemptConnection(&This->pin, pReceivePin, pmtCandidate) == S_OK)) && This->pFuncsTable->pfnAttemptConnection(This, pReceivePin, pmtCandidate) == S_OK)
{ {
hr = S_OK; hr = S_OK;
DeleteMediaType(pmtCandidate); DeleteMediaType(pmtCandidate);
...@@ -699,9 +699,8 @@ HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputP ...@@ -699,9 +699,8 @@ HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputP
/* Function called as a helper to IPin_Connect */ /* Function called as a helper to IPin_Connect */
/* specific AM_MEDIA_TYPE - it cannot be NULL */ /* specific AM_MEDIA_TYPE - it cannot be NULL */
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin* iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BaseOutputPin *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
{ {
BaseOutputPin *This = impl_BaseOutputPin_from_BasePin(iface);
HRESULT hr; HRESULT hr;
IMemAllocator * pMemAlloc = NULL; IMemAllocator * pMemAlloc = NULL;
...@@ -715,7 +714,7 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin* iface, IPin * pRecei ...@@ -715,7 +714,7 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin* iface, IPin * pRecei
IPin_AddRef(pReceivePin); IPin_AddRef(pReceivePin);
CopyMediaType(&This->pin.mtCurrent, pmt); CopyMediaType(&This->pin.mtCurrent, pmt);
hr = IPin_ReceiveConnection(pReceivePin, &iface->IPin_iface, pmt); hr = IPin_ReceiveConnection(pReceivePin, &This->pin.IPin_iface, pmt);
/* get the IMemInputPin interface we will use to deliver samples to the /* get the IMemInputPin interface we will use to deliver samples to the
* connected pin */ * connected pin */
...@@ -792,7 +791,7 @@ HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outp ...@@ -792,7 +791,7 @@ HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outp
} }
assert(outputpin_size >= sizeof(BaseOutputPin)); assert(outputpin_size >= sizeof(BaseOutputPin));
assert(vtbl->base.pfnAttemptConnection); assert(vtbl->pfnAttemptConnection);
pPinImpl = CoTaskMemAlloc(outputpin_size); pPinImpl = CoTaskMemAlloc(outputpin_size);
......
...@@ -219,7 +219,6 @@ static const BaseFilterFuncTable RendererBaseFilterFuncTable = { ...@@ -219,7 +219,6 @@ static const BaseFilterFuncTable RendererBaseFilterFuncTable = {
static const BaseInputPinFuncTable input_BaseInputFuncTable = { static const BaseInputPinFuncTable input_BaseInputFuncTable = {
{ {
BaseRenderer_Input_CheckMediaType, BaseRenderer_Input_CheckMediaType,
NULL,
BasePinImpl_GetMediaTypeVersion, BasePinImpl_GetMediaTypeVersion,
BasePinImpl_GetMediaType BasePinImpl_GetMediaType
}, },
......
...@@ -152,7 +152,6 @@ static const BaseFilterFuncTable tfBaseFuncTable = { ...@@ -152,7 +152,6 @@ static const BaseFilterFuncTable tfBaseFuncTable = {
static const BaseInputPinFuncTable tf_input_BaseInputFuncTable = { static const BaseInputPinFuncTable tf_input_BaseInputFuncTable = {
{ {
TransformFilter_Input_CheckMediaType, TransformFilter_Input_CheckMediaType,
NULL,
BasePinImpl_GetMediaTypeVersion, BasePinImpl_GetMediaTypeVersion,
BasePinImpl_GetMediaType BasePinImpl_GetMediaType
}, },
...@@ -162,10 +161,10 @@ static const BaseInputPinFuncTable tf_input_BaseInputFuncTable = { ...@@ -162,10 +161,10 @@ static const BaseInputPinFuncTable tf_input_BaseInputFuncTable = {
static const BaseOutputPinFuncTable tf_output_BaseOutputFuncTable = { static const BaseOutputPinFuncTable tf_output_BaseOutputFuncTable = {
{ {
TransformFilter_Output_CheckMediaType, TransformFilter_Output_CheckMediaType,
BaseOutputPinImpl_AttemptConnection,
BasePinImpl_GetMediaTypeVersion, BasePinImpl_GetMediaTypeVersion,
TransformFilter_Output_GetMediaType TransformFilter_Output_GetMediaType
}, },
BaseOutputPinImpl_AttemptConnection,
TransformFilter_Output_DecideBufferSize, TransformFilter_Output_DecideBufferSize,
BaseOutputPinImpl_DecideAllocator, BaseOutputPinImpl_DecideAllocator,
BaseOutputPinImpl_BreakConnect BaseOutputPinImpl_BreakConnect
......
...@@ -1872,10 +1872,10 @@ static const IPinVtbl GST_OutputPin_Vtbl = { ...@@ -1872,10 +1872,10 @@ static const IPinVtbl GST_OutputPin_Vtbl = {
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = { static const BaseOutputPinFuncTable output_BaseOutputFuncTable = {
{ {
GSTOutPin_CheckMediaType, GSTOutPin_CheckMediaType,
BaseOutputPinImpl_AttemptConnection,
BasePinImpl_GetMediaTypeVersion, BasePinImpl_GetMediaTypeVersion,
GSTOutPin_GetMediaType GSTOutPin_GetMediaType
}, },
BaseOutputPinImpl_AttemptConnection,
GSTOutPin_DecideBufferSize, GSTOutPin_DecideBufferSize,
GSTOutPin_DecideAllocator, GSTOutPin_DecideAllocator,
GSTOutPin_BreakConnect GSTOutPin_BreakConnect
......
...@@ -1515,10 +1515,10 @@ static const IQualityControlVtbl QTOutPin_QualityControl_Vtbl = { ...@@ -1515,10 +1515,10 @@ static const IQualityControlVtbl QTOutPin_QualityControl_Vtbl = {
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = { static const BaseOutputPinFuncTable output_BaseOutputFuncTable = {
{ {
QTOutPin_CheckMediaType, QTOutPin_CheckMediaType,
BaseOutputPinImpl_AttemptConnection,
BasePinImpl_GetMediaTypeVersion, BasePinImpl_GetMediaTypeVersion,
QTOutPin_GetMediaType QTOutPin_GetMediaType
}, },
BaseOutputPinImpl_AttemptConnection,
QTOutPin_DecideBufferSize, QTOutPin_DecideBufferSize,
QTOutPin_DecideAllocator, QTOutPin_DecideAllocator,
QTOutPin_BreakConnect QTOutPin_BreakConnect
......
...@@ -44,15 +44,12 @@ typedef struct BasePin ...@@ -44,15 +44,12 @@ typedef struct BasePin
} BasePin; } BasePin;
typedef HRESULT (WINAPI *BasePin_CheckMediaType)(BasePin *This, const AM_MEDIA_TYPE *pmt); typedef HRESULT (WINAPI *BasePin_CheckMediaType)(BasePin *This, const AM_MEDIA_TYPE *pmt);
typedef HRESULT (WINAPI *BasePin_AttemptConnection)(BasePin *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt);
typedef LONG (WINAPI *BasePin_GetMediaTypeVersion)(BasePin *This); typedef LONG (WINAPI *BasePin_GetMediaTypeVersion)(BasePin *This);
typedef HRESULT (WINAPI *BasePin_GetMediaType)(BasePin *This, int iPosition, AM_MEDIA_TYPE *amt); typedef HRESULT (WINAPI *BasePin_GetMediaType)(BasePin *This, int iPosition, AM_MEDIA_TYPE *amt);
typedef struct BasePinFuncTable { typedef struct BasePinFuncTable {
/* Required for Input Pins*/ /* Required for QueryAccept(), Connect(), ReceiveConnection(). */
BasePin_CheckMediaType pfnCheckMediaType; BasePin_CheckMediaType pfnCheckMediaType;
/* Required for Output Pins*/
BasePin_AttemptConnection pfnAttemptConnection;
/* Required for BasePinImpl_EnumMediaTypes */ /* Required for BasePinImpl_EnumMediaTypes */
BasePin_GetMediaTypeVersion pfnGetMediaTypeVersion; BasePin_GetMediaTypeVersion pfnGetMediaTypeVersion;
BasePin_GetMediaType pfnGetMediaType; BasePin_GetMediaType pfnGetMediaType;
...@@ -68,6 +65,7 @@ typedef struct BaseOutputPin ...@@ -68,6 +65,7 @@ typedef struct BaseOutputPin
const struct BaseOutputPinFuncTable* pFuncsTable; const struct BaseOutputPinFuncTable* pFuncsTable;
} BaseOutputPin; } BaseOutputPin;
typedef HRESULT (WINAPI *BaseOutputPin_AttemptConnection)(BaseOutputPin *pin, IPin *peer, const AM_MEDIA_TYPE *mt);
typedef HRESULT (WINAPI *BaseOutputPin_DecideBufferSize)(BaseOutputPin *This, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest); typedef HRESULT (WINAPI *BaseOutputPin_DecideBufferSize)(BaseOutputPin *This, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest);
typedef HRESULT (WINAPI *BaseOutputPin_DecideAllocator)(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc); typedef HRESULT (WINAPI *BaseOutputPin_DecideAllocator)(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc);
typedef HRESULT (WINAPI *BaseOutputPin_BreakConnect)(BaseOutputPin * This); typedef HRESULT (WINAPI *BaseOutputPin_BreakConnect)(BaseOutputPin * This);
...@@ -75,6 +73,8 @@ typedef HRESULT (WINAPI *BaseOutputPin_BreakConnect)(BaseOutputPin * This); ...@@ -75,6 +73,8 @@ typedef HRESULT (WINAPI *BaseOutputPin_BreakConnect)(BaseOutputPin * This);
typedef struct BaseOutputPinFuncTable { typedef struct BaseOutputPinFuncTable {
BasePinFuncTable base; BasePinFuncTable base;
/* Required for Connect(). */
BaseOutputPin_AttemptConnection pfnAttemptConnection;
/* Required for BaseOutputPinImpl_DecideAllocator */ /* Required for BaseOutputPinImpl_DecideAllocator */
BaseOutputPin_DecideBufferSize pfnDecideBufferSize; BaseOutputPin_DecideBufferSize pfnDecideBufferSize;
/* Required for BaseOutputPinImpl_AttemptConnection */ /* Required for BaseOutputPinImpl_AttemptConnection */
...@@ -135,7 +135,7 @@ HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin * This); ...@@ -135,7 +135,7 @@ HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin * This);
HRESULT WINAPI BaseOutputPinImpl_Inactive(BaseOutputPin * This); HRESULT WINAPI BaseOutputPinImpl_Inactive(BaseOutputPin * This);
HRESULT WINAPI BaseOutputPinImpl_InitAllocator(BaseOutputPin *This, IMemAllocator **pMemAlloc); HRESULT WINAPI BaseOutputPinImpl_InitAllocator(BaseOutputPin *This, IMemAllocator **pMemAlloc);
HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc); HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc);
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin *This, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt); HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BaseOutputPin *pin, IPin *peer, const AM_MEDIA_TYPE *mt);
HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO * pPinInfo, const BaseOutputPinFuncTable* pBaseOutputFuncsTable, LPCRITICAL_SECTION pCritSec, IPin ** ppPin); HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO * pPinInfo, const BaseOutputPinFuncTable* pBaseOutputFuncsTable, LPCRITICAL_SECTION pCritSec, IPin ** ppPin);
HRESULT WINAPI BaseOutputPin_Destroy(BaseOutputPin *This); HRESULT WINAPI BaseOutputPin_Destroy(BaseOutputPin *This);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment