quartz: Add stub IAMStreamSelect to MPEG-1 Stream Splitter.

Nikolay Sivov nsivov at codeweavers.com
Sat Feb 14 11:07:52 CST 2015


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?



More information about the wine-devel mailing list