On 02/14/2015 07:52 PM, Anton Baskanov wrote:
- if ( IsEqualIID(riid, &IID_IUnknown)
|| IsEqualIID(riid, &IID_IPersist)
|| IsEqualIID(riid, &IID_IMediaFilter)
|| IsEqualIID(riid, &IID_IBaseFilter) )
*ppv = This;
- if ( IsEqualIID(riid, &IID_IAMStreamSelect) )
*ppv = &This->IAMStreamSelect_iface;
- if (*ppv)
- {
IBaseFilter_AddRef(&This->Parser.filter.IBaseFilter_iface);
return S_OK;
- }
Cleaner way is to use 'iface' when setting out pointer, and for AddRef. For AddRef() it just makes it shorter, for assignment you actually have to return interface pointer instead and not to rely on implementation struct layout.
- if (!IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IVideoWindow))
FIXME("No interface for %s!\n", qzdebugstr_guid(riid));
Do you really need to limit it like that?
On Sat, Feb 14, 2015 at 11:07 PM, Nikolay Sivov nsivov@codeweavers.com wrote:
- if (!IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid,
&IID_IVideoWindow))
FIXME("No interface for %s!\n", qzdebugstr_guid(riid));
Do you really need to limit it like that?
I don't know the exact purpose, but this code can be found in many filters. It was added by Maarten Lankhorst: - quartz: Silence requests for ipin on filters. - quartz: Silence requests for IVideoWindow.
On 15.02.2015 8:45, Anton Baskanov wrote:
On Sat, Feb 14, 2015 at 11:07 PM, Nikolay Sivov nsivov@codeweavers.com wrote:
- if (!IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid,
&IID_IVideoWindow))
FIXME("No interface for %s!\n", qzdebugstr_guid(riid));
Do you really need to limit it like that?
I don't know the exact purpose, but this code can be found in many filters. It was added by Maarten Lankhorst:
- quartz: Silence requests for ipin on filters.
- quartz: Silence requests for IVideoWindow.
I see, it's meant to make it spam less probably.