On 18.08.2017 4:25, Fabian Maurer wrote:
+static const IBaseFilterVtbl IBaseFilter_Vtbl = +{
- /*** IUnknown methods ***/
- EnhancedVideoRendererImpl_QueryInterface,
- EnhancedVideoRendererImpl_AddRef,
- EnhancedVideoRendererImpl_Release,
- /*** IPersist methods ***/
- EnhancedVideoRendererImpl_GetClassID,
- /*** IMediaFilter methods ***/
- EnhancedVideoRendererImpl_Stop,
- EnhancedVideoRendererImpl_Pause,
- EnhancedVideoRendererImpl_Run,
- EnhancedVideoRendererImpl_GetState,
- EnhancedVideoRendererImpl_SetSyncSource,
- EnhancedVideoRendererImpl_GetSyncSource,
- /*** IBaseFilter methods ***/
- EnhancedVideoRendererImpl_EnumPins,
- EnhancedVideoRendererImpl_FindPin,
- EnhancedVideoRendererImpl_QueryFilterInfo,
- EnhancedVideoRendererImpl_JoinFilterGraph,
- EnhancedVideoRendererImpl_QueryVendorInfo
+};
Shouldn't it use strmbase?
+HRESULT EnhancedVideoRendererImpl_Create(IUnknown *pUnkOuter, void **ppObj) +{
- EnhancedVideoRendererImpl *object;
- TRACE("(%p,%p)\n", pUnkOuter, ppObj);
- object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(EnhancedVideoRendererImpl));
- if (!object)
return E_OUTOFMEMORY;
- object->IBaseFilter_iface.lpVtbl = &IBaseFilter_Vtbl;
- object->ref = 1;
- *ppObj = &object->IBaseFilter_iface;
- return S_OK;
+}
This needs at test for aggregation support.
+typedef struct {
- IBaseFilter IBaseFilter_iface;
- LONG ref;
+} EnhancedVideoRendererImpl;
Does this need to be exposed?
- TRACE("(0x%p, %d, %p)\n", instance, reason, reserved);
Format looks wrong.
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
It still doesn't do anything.
+static HRESULT WINAPI XFCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid, void **ppobj) +{
What does XF prefix stand for? Also please use consistent type names and formatting.
+/*******************************************************************************
- Retrieves class object from a DLL object
- NOTES
- Docs say returns STDAPI
- PARAMS
- rclsid [I] CLSID for the class object
- riid [I] Reference to identifier of interface for class object
- ppv [O] Address of variable to receive interface pointer for riid
- RETURNS
- Success: S_OK
- Failure: CLASS_E_CLASSNOTAVAILABLE, E_OUTOFMEMORY, E_INVALIDARG,
E_UNEXPECTED
- */
+HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
I personally don't think this export needs a documentation header.
- if ( !IsEqualGUID( &IID_IClassFactory, riid )
&& ! IsEqualGUID( &IID_IUnknown, riid) )
return E_NOINTERFACE;
I think it's better to let QueryInterface handle this.
- for (i=0; i < sizeof(object_creation)/sizeof(object_creation[0]); i++)
- {
if (IsEqualGUID(object_creation[i].clsid, rclsid))
break;
- }
- if (i == sizeof(object_creation)/sizeof(object_creation[0]))
- {
FIXME("%s: no class found.\n", debugstr_guid(rclsid));
return CLASS_E_CLASSNOTAVAILABLE;
- }
Does it support any other CLSIDs? This seems like too much. Static factory instance will work too I suppose.