qcap: COM cleanup for the IKsPropertySet iface.
This commit is contained in:
parent
2284835973
commit
487472b3f6
@ -44,9 +44,6 @@
|
|||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(qcap);
|
WINE_DEFAULT_DEBUG_CHANNEL(qcap);
|
||||||
|
|
||||||
#define ICOM_THIS_MULTI(impl,field,iface) \
|
|
||||||
impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
|
|
||||||
|
|
||||||
static const IBaseFilterVtbl VfwCapture_Vtbl;
|
static const IBaseFilterVtbl VfwCapture_Vtbl;
|
||||||
static const IAMStreamConfigVtbl IAMStreamConfig_VTable;
|
static const IAMStreamConfigVtbl IAMStreamConfig_VTable;
|
||||||
static const IAMVideoProcAmpVtbl IAMVideoProcAmp_VTable;
|
static const IAMVideoProcAmpVtbl IAMVideoProcAmp_VTable;
|
||||||
@ -103,8 +100,8 @@ static inline VfwCapture *impl_from_IPersistPropertyBag(IPersistPropertyBag *ifa
|
|||||||
typedef struct VfwPinImpl
|
typedef struct VfwPinImpl
|
||||||
{
|
{
|
||||||
BaseOutputPin pin;
|
BaseOutputPin pin;
|
||||||
|
IKsPropertySet IKsPropertySet_iface;
|
||||||
VfwCapture *parent;
|
VfwCapture *parent;
|
||||||
const IKsPropertySetVtbl * KSP_VT;
|
|
||||||
} VfwPinImpl;
|
} VfwPinImpl;
|
||||||
|
|
||||||
|
|
||||||
@ -585,37 +582,30 @@ static const IPersistPropertyBagVtbl IPersistPropertyBag_VTable =
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* IKsPropertySet interface */
|
/* IKsPropertySet interface */
|
||||||
static HRESULT WINAPI
|
static inline VfwPinImpl *impl_from_IKsPropertySet(IKsPropertySet *iface)
|
||||||
KSP_QueryInterface( IKsPropertySet * iface, REFIID riid, LPVOID * ppv )
|
|
||||||
{
|
{
|
||||||
if (IsEqualIID(riid, &IID_IUnknown) ||
|
return CONTAINING_RECORD(iface, VfwPinImpl, IKsPropertySet_iface);
|
||||||
IsEqualIID(riid, &IID_IKsPropertySet))
|
}
|
||||||
{
|
|
||||||
*ppv = iface;
|
|
||||||
IKsPropertySet_AddRef( iface );
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
FIXME("No interface for iid %s\n", debugstr_guid(riid));
|
static HRESULT WINAPI KSP_QueryInterface(IKsPropertySet * iface, REFIID riid, void **ret_iface)
|
||||||
return E_NOINTERFACE;
|
{
|
||||||
|
VfwPinImpl *This = impl_from_IKsPropertySet(iface);
|
||||||
|
|
||||||
|
return IPin_QueryInterface(&This->pin.pin.IPin_iface, riid, ret_iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI KSP_AddRef(IKsPropertySet * iface)
|
static ULONG WINAPI KSP_AddRef(IKsPropertySet * iface)
|
||||||
{
|
{
|
||||||
ICOM_THIS_MULTI(VfwPinImpl, KSP_VT, iface);
|
VfwPinImpl *This = impl_from_IKsPropertySet(iface);
|
||||||
|
|
||||||
TRACE("%p --> Forwarding to VfwPin (%p)\n", iface, This);
|
return IPin_AddRef(&This->pin.pin.IPin_iface);
|
||||||
|
|
||||||
return IUnknown_AddRef((IUnknown *)This);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI KSP_Release(IKsPropertySet * iface)
|
static ULONG WINAPI KSP_Release(IKsPropertySet * iface)
|
||||||
{
|
{
|
||||||
ICOM_THIS_MULTI(VfwPinImpl, KSP_VT, iface);
|
VfwPinImpl *This = impl_from_IKsPropertySet(iface);
|
||||||
|
|
||||||
TRACE("%p --> Forwarding to VfwPin (%p)\n", iface, This);
|
return IPin_Release(&This->pin.pin.IPin_iface);
|
||||||
|
|
||||||
return IUnknown_Release((IUnknown *)This);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI
|
static HRESULT WINAPI
|
||||||
@ -660,7 +650,7 @@ KSP_QuerySupported( IKsPropertySet * iface, REFGUID guidPropSet,
|
|||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const IKsPropertySetVtbl KSP_VTable =
|
static const IKsPropertySetVtbl IKsPropertySet_VTable =
|
||||||
{
|
{
|
||||||
KSP_QueryInterface,
|
KSP_QueryInterface,
|
||||||
KSP_AddRef,
|
KSP_AddRef,
|
||||||
@ -746,7 +736,7 @@ VfwPin_Construct( IBaseFilter * pBaseFilter, LPCRITICAL_SECTION pCritSec,
|
|||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
VfwPinImpl *pPinImpl = (VfwPinImpl*)*ppPin;
|
VfwPinImpl *pPinImpl = (VfwPinImpl*)*ppPin;
|
||||||
pPinImpl->KSP_VT = &KSP_VTable;
|
pPinImpl->IKsPropertySet_iface.lpVtbl = &IKsPropertySet_VTable;
|
||||||
ObjectRefCount(TRUE);
|
ObjectRefCount(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -768,7 +758,7 @@ static HRESULT WINAPI VfwPin_QueryInterface(IPin * iface, REFIID riid, LPVOID *
|
|||||||
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPin))
|
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPin))
|
||||||
*ppv = This;
|
*ppv = This;
|
||||||
else if (IsEqualIID(riid, &IID_IKsPropertySet))
|
else if (IsEqualIID(riid, &IID_IKsPropertySet))
|
||||||
*ppv = &(This->KSP_VT);
|
*ppv = &This->IKsPropertySet_iface;
|
||||||
else if (IsEqualIID(riid, &IID_IAMStreamConfig))
|
else if (IsEqualIID(riid, &IID_IAMStreamConfig))
|
||||||
return IUnknown_QueryInterface((IUnknown *)This->parent, riid, ppv);
|
return IUnknown_QueryInterface((IUnknown *)This->parent, riid, ppv);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user