[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: [PATCH 05/11] mfplat: Implement IMFattributes::{SetUInt32,SetUInt64,GetUInt32,GetUInt64}.
From: Nikolay Sivov <nsivov () codeweavers ! com>
Date: 2018-12-28 19:27:33
Message-ID: 1715d144-4fb2-59f7-b12f-208f929c18f7 () codeweavers ! com
[Download RAW message or body]
On 12/28/18 6:43 PM, Jactry Zeng wrote:
> static HRESULT WINAPI mfattributes_GetUINT32(IMFAttributes *iface, REFGUID key, UINT32 *value)
> {
> mfattributes *This = impl_from_IMFAttributes(iface);
> + PROPVARIANT attrval;
> + HRESULT hres;
>
> - FIXME("%p, %s, %p\n", This, debugstr_guid(key), value);
> + TRACE("(%p, %s, %p)\n", This, debugstr_guid(key), value);
>
> - return E_NOTIMPL;
> + PropVariantInit(&attrval);
> + attrval.vt = MF_ATTRIBUTE_UINT32;
> + hres = mfattributes_getitem(This, key, &attrval, TRUE);
> + if(SUCCEEDED(hres))
> + hres = PropVariantToUInt32(&attrval, value);
> + return hres;
> }
I think it's better to use VT_* naming.
Last argument of getitem helper is supposed to trigger type validation,
so successful path implies that types are matching and you probably
don't need additional coercion call.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic