mfplat: Add per-method helpers for attributes, use them for media type.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2019-04-01 13:24:06 +03:00 committed by Alexandre Julliard
parent e92bf051f5
commit 7a13f42786
3 changed files with 381 additions and 163 deletions

View File

@ -1028,14 +1028,11 @@ static HRESULT attributes_get_item(struct attributes *attributes, const GUID *ke
return hr;
}
static HRESULT WINAPI mfattributes_GetItem(IMFAttributes *iface, REFGUID key, PROPVARIANT *value)
HRESULT attributes_GetItem(struct attributes *attributes, REFGUID key, PROPVARIANT *value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
struct attribute *attribute;
HRESULT hr;
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
EnterCriticalSection(&attributes->cs);
if ((attribute = attributes_find_item(attributes, key, NULL)))
@ -1048,14 +1045,11 @@ static HRESULT WINAPI mfattributes_GetItem(IMFAttributes *iface, REFGUID key, PR
return hr;
}
static HRESULT WINAPI mfattributes_GetItemType(IMFAttributes *iface, REFGUID key, MF_ATTRIBUTE_TYPE *type)
HRESULT attributes_GetItemType(struct attributes *attributes, REFGUID key, MF_ATTRIBUTE_TYPE *type)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
struct attribute *attribute;
HRESULT hr = S_OK;
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), type);
EnterCriticalSection(&attributes->cs);
if ((attribute = attributes_find_item(attributes, key, NULL)))
@ -1070,13 +1064,10 @@ static HRESULT WINAPI mfattributes_GetItemType(IMFAttributes *iface, REFGUID key
return hr;
}
static HRESULT WINAPI mfattributes_CompareItem(IMFAttributes *iface, REFGUID key, REFPROPVARIANT value, BOOL *result)
HRESULT attributes_CompareItem(struct attributes *attributes, REFGUID key, REFPROPVARIANT value, BOOL *result)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
struct attribute *attribute;
TRACE("%p, %s, %p, %p.\n", iface, debugstr_attr(key), value, result);
*result = FALSE;
EnterCriticalSection(&attributes->cs);
@ -1092,10 +1083,9 @@ static HRESULT WINAPI mfattributes_CompareItem(IMFAttributes *iface, REFGUID key
return S_OK;
}
static HRESULT WINAPI mfattributes_Compare(IMFAttributes *iface, IMFAttributes *theirs,
HRESULT attributes_Compare(struct attributes *attributes, IMFAttributes *theirs,
MF_ATTRIBUTES_MATCH_TYPE match_type, BOOL *ret)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
IMFAttributes *smaller, *other;
MF_ATTRIBUTE_TYPE type;
HRESULT hr = S_OK;
@ -1103,8 +1093,6 @@ static HRESULT WINAPI mfattributes_Compare(IMFAttributes *iface, IMFAttributes *
BOOL result;
size_t i;
TRACE("%p, %p, %d, %p.\n", iface, theirs, match_type, ret);
if (FAILED(hr = IMFAttributes_GetCount(theirs, &count)))
return hr;
@ -1125,7 +1113,7 @@ static HRESULT WINAPI mfattributes_Compare(IMFAttributes *iface, IMFAttributes *
}
break;
case MF_ATTRIBUTES_MATCH_THEIR_ITEMS:
hr = IMFAttributes_Compare(theirs, iface, MF_ATTRIBUTES_MATCH_OUR_ITEMS, &result);
hr = IMFAttributes_Compare(theirs, &attributes->IMFAttributes_iface, MF_ATTRIBUTES_MATCH_OUR_ITEMS, &result);
break;
case MF_ATTRIBUTES_MATCH_ALL_ITEMS:
if (count != attributes->count)
@ -1157,8 +1145,8 @@ static HRESULT WINAPI mfattributes_Compare(IMFAttributes *iface, IMFAttributes *
}
break;
case MF_ATTRIBUTES_MATCH_SMALLER:
smaller = attributes->count > count ? theirs : iface;
other = attributes->count > count ? iface : theirs;
smaller = attributes->count > count ? theirs : &attributes->IMFAttributes_iface;
other = attributes->count > count ? &attributes->IMFAttributes_iface : theirs;
hr = IMFAttributes_Compare(smaller, other, MF_ATTRIBUTES_MATCH_OUR_ITEMS, &result);
break;
default:
@ -1174,14 +1162,11 @@ static HRESULT WINAPI mfattributes_Compare(IMFAttributes *iface, IMFAttributes *
return hr;
}
static HRESULT WINAPI mfattributes_GetUINT32(IMFAttributes *iface, REFGUID key, UINT32 *value)
HRESULT attributes_GetUINT32(struct attributes *attributes, REFGUID key, UINT32 *value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
PROPVARIANT attrval;
HRESULT hr;
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
PropVariantInit(&attrval);
attrval.vt = VT_UI4;
hr = attributes_get_item(attributes, key, &attrval);
@ -1191,14 +1176,11 @@ static HRESULT WINAPI mfattributes_GetUINT32(IMFAttributes *iface, REFGUID key,
return hr;
}
static HRESULT WINAPI mfattributes_GetUINT64(IMFAttributes *iface, REFGUID key, UINT64 *value)
HRESULT attributes_GetUINT64(struct attributes *attributes, REFGUID key, UINT64 *value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
PROPVARIANT attrval;
HRESULT hr;
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
PropVariantInit(&attrval);
attrval.vt = VT_UI8;
hr = attributes_get_item(attributes, key, &attrval);
@ -1208,14 +1190,11 @@ static HRESULT WINAPI mfattributes_GetUINT64(IMFAttributes *iface, REFGUID key,
return hr;
}
static HRESULT WINAPI mfattributes_GetDouble(IMFAttributes *iface, REFGUID key, double *value)
HRESULT attributes_GetDouble(struct attributes *attributes, REFGUID key, double *value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
PROPVARIANT attrval;
HRESULT hr;
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
PropVariantInit(&attrval);
attrval.vt = VT_R8;
hr = attributes_get_item(attributes, key, &attrval);
@ -1225,14 +1204,11 @@ static HRESULT WINAPI mfattributes_GetDouble(IMFAttributes *iface, REFGUID key,
return hr;
}
static HRESULT WINAPI mfattributes_GetGUID(IMFAttributes *iface, REFGUID key, GUID *value)
HRESULT attributes_GetGUID(struct attributes *attributes, REFGUID key, GUID *value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
PROPVARIANT attrval;
HRESULT hr;
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
PropVariantInit(&attrval);
attrval.vt = VT_CLSID;
hr = attributes_get_item(attributes, key, &attrval);
@ -1242,14 +1218,11 @@ static HRESULT WINAPI mfattributes_GetGUID(IMFAttributes *iface, REFGUID key, GU
return hr;
}
static HRESULT WINAPI mfattributes_GetStringLength(IMFAttributes *iface, REFGUID key, UINT32 *length)
HRESULT attributes_GetStringLength(struct attributes *attributes, REFGUID key, UINT32 *length)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
struct attribute *attribute;
HRESULT hr = S_OK;
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), length);
EnterCriticalSection(&attributes->cs);
attribute = attributes_find_item(attributes, key, NULL);
@ -1268,15 +1241,12 @@ static HRESULT WINAPI mfattributes_GetStringLength(IMFAttributes *iface, REFGUID
return hr;
}
static HRESULT WINAPI mfattributes_GetString(IMFAttributes *iface, REFGUID key, WCHAR *value,
HRESULT attributes_GetString(struct attributes *attributes, REFGUID key, WCHAR *value,
UINT32 size, UINT32 *length)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
struct attribute *attribute;
HRESULT hr = S_OK;
TRACE("%p, %s, %p, %d, %p.\n", iface, debugstr_attr(key), value, size, length);
EnterCriticalSection(&attributes->cs);
attribute = attributes_find_item(attributes, key, NULL);
@ -1305,14 +1275,11 @@ static HRESULT WINAPI mfattributes_GetString(IMFAttributes *iface, REFGUID key,
return hr;
}
static HRESULT WINAPI mfattributes_GetAllocatedString(IMFAttributes *iface, REFGUID key, WCHAR **value, UINT32 *length)
HRESULT attributes_GetAllocatedString(struct attributes *attributes, REFGUID key, WCHAR **value, UINT32 *length)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
PROPVARIANT attrval;
HRESULT hr;
TRACE("%p, %s, %p, %p.\n", iface, debugstr_attr(key), value, length);
PropVariantInit(&attrval);
attrval.vt = VT_LPWSTR;
hr = attributes_get_item(attributes, key, &attrval);
@ -1325,14 +1292,11 @@ static HRESULT WINAPI mfattributes_GetAllocatedString(IMFAttributes *iface, REFG
return hr;
}
static HRESULT WINAPI mfattributes_GetBlobSize(IMFAttributes *iface, REFGUID key, UINT32 *size)
HRESULT attributes_GetBlobSize(struct attributes *attributes, REFGUID key, UINT32 *size)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
struct attribute *attribute;
HRESULT hr = S_OK;
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), size);
EnterCriticalSection(&attributes->cs);
attribute = attributes_find_item(attributes, key, NULL);
@ -1351,15 +1315,11 @@ static HRESULT WINAPI mfattributes_GetBlobSize(IMFAttributes *iface, REFGUID key
return hr;
}
static HRESULT WINAPI mfattributes_GetBlob(IMFAttributes *iface, REFGUID key, UINT8 *buf,
UINT32 bufsize, UINT32 *blobsize)
HRESULT attributes_GetBlob(struct attributes *attributes, REFGUID key, UINT8 *buf, UINT32 bufsize, UINT32 *blobsize)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
struct attribute *attribute;
HRESULT hr;
TRACE("%p, %s, %p, %d, %p.\n", iface, debugstr_attr(key), buf, bufsize, blobsize);
EnterCriticalSection(&attributes->cs);
attribute = attributes_find_item(attributes, key, NULL);
@ -1388,14 +1348,11 @@ static HRESULT WINAPI mfattributes_GetBlob(IMFAttributes *iface, REFGUID key, UI
return hr;
}
static HRESULT WINAPI mfattributes_GetAllocatedBlob(IMFAttributes *iface, REFGUID key, UINT8 **buf, UINT32 *size)
HRESULT attributes_GetAllocatedBlob(struct attributes *attributes, REFGUID key, UINT8 **buf, UINT32 *size)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
PROPVARIANT attrval;
HRESULT hr;
TRACE("%p, %s, %p, %p.\n", iface, debugstr_attr(key), buf, size);
attrval.vt = VT_VECTOR | VT_UI1;
hr = attributes_get_item(attributes, key, &attrval);
if (SUCCEEDED(hr))
@ -1407,19 +1364,16 @@ static HRESULT WINAPI mfattributes_GetAllocatedBlob(IMFAttributes *iface, REFGUI
return hr;
}
static HRESULT WINAPI mfattributes_GetUnknown(IMFAttributes *iface, REFGUID key, REFIID riid, void **ppv)
HRESULT attributes_GetUnknown(struct attributes *attributes, REFGUID key, REFIID riid, void **out)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
PROPVARIANT attrval;
HRESULT hr;
TRACE("%p, %s, %s, %p.\n", iface, debugstr_attr(key), debugstr_guid(riid), ppv);
PropVariantInit(&attrval);
attrval.vt = VT_UNKNOWN;
hr = attributes_get_item(attributes, key, &attrval);
if (SUCCEEDED(hr))
hr = IUnknown_QueryInterface(attrval.u.punkVal, riid, ppv);
hr = IUnknown_QueryInterface(attrval.u.punkVal, riid, out);
PropVariantClear(&attrval);
return hr;
}
@ -1452,13 +1406,10 @@ static HRESULT attributes_set_item(struct attributes *attributes, REFGUID key, R
return S_OK;
}
static HRESULT WINAPI mfattributes_SetItem(IMFAttributes *iface, REFGUID key, REFPROPVARIANT value)
HRESULT attributes_SetItem(struct attributes *attributes, REFGUID key, REFPROPVARIANT value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
PROPVARIANT empty;
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
switch (value->vt)
{
case MF_ATTRIBUTE_UINT32:
@ -1476,14 +1427,11 @@ static HRESULT WINAPI mfattributes_SetItem(IMFAttributes *iface, REFGUID key, RE
}
}
static HRESULT WINAPI mfattributes_DeleteItem(IMFAttributes *iface, REFGUID key)
HRESULT attributes_DeleteItem(struct attributes *attributes, REFGUID key)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
struct attribute *attribute;
size_t index = 0;
TRACE("%p, %s.\n", iface, debugstr_attr(key));
EnterCriticalSection(&attributes->cs);
if ((attribute = attributes_find_item(attributes, key, &index)))
@ -1503,12 +1451,8 @@ static HRESULT WINAPI mfattributes_DeleteItem(IMFAttributes *iface, REFGUID key)
return S_OK;
}
static HRESULT WINAPI mfattributes_DeleteAllItems(IMFAttributes *iface)
HRESULT attributes_DeleteAllItems(struct attributes *attributes)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p.\n", iface);
EnterCriticalSection(&attributes->cs);
while (attributes->count)
@ -1524,132 +1468,96 @@ static HRESULT WINAPI mfattributes_DeleteAllItems(IMFAttributes *iface)
return S_OK;
}
static HRESULT WINAPI mfattributes_SetUINT32(IMFAttributes *iface, REFGUID key, UINT32 value)
HRESULT attributes_SetUINT32(struct attributes *attributes, REFGUID key, UINT32 value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
PROPVARIANT attrval;
TRACE("%p, %s, %d.\n", iface, debugstr_attr(key), value);
attrval.vt = VT_UI4;
attrval.u.ulVal = value;
return attributes_set_item(attributes, key, &attrval);
}
static HRESULT WINAPI mfattributes_SetUINT64(IMFAttributes *iface, REFGUID key, UINT64 value)
HRESULT attributes_SetUINT64(struct attributes *attributes, REFGUID key, UINT64 value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
PROPVARIANT attrval;
TRACE("%p, %s, %s.\n", iface, debugstr_attr(key), wine_dbgstr_longlong(value));
attrval.vt = VT_UI8;
attrval.u.uhVal.QuadPart = value;
return attributes_set_item(attributes, key, &attrval);
}
static HRESULT WINAPI mfattributes_SetDouble(IMFAttributes *iface, REFGUID key, double value)
HRESULT attributes_SetDouble(struct attributes *attributes, REFGUID key, double value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
PROPVARIANT attrval;
TRACE("%p, %s, %f.\n", iface, debugstr_attr(key), value);
attrval.vt = VT_R8;
attrval.u.dblVal = value;
return attributes_set_item(attributes, key, &attrval);
}
static HRESULT WINAPI mfattributes_SetGUID(IMFAttributes *iface, REFGUID key, REFGUID value)
HRESULT attributes_SetGUID(struct attributes *attributes, REFGUID key, REFGUID value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
PROPVARIANT attrval;
TRACE("%p, %s, %s.\n", iface, debugstr_attr(key), debugstr_mf_guid(value));
InitPropVariantFromCLSID(value, &attrval);
return attributes_set_item(attributes, key, &attrval);
}
static HRESULT WINAPI mfattributes_SetString(IMFAttributes *iface, REFGUID key, const WCHAR *value)
HRESULT attributes_SetString(struct attributes *attributes, REFGUID key, const WCHAR *value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
PROPVARIANT attrval;
TRACE("%p, %s, %s.\n", iface, debugstr_attr(key), debugstr_w(value));
attrval.vt = VT_LPWSTR;
attrval.u.pwszVal = (WCHAR *)value;
return attributes_set_item(attributes, key, &attrval);
}
static HRESULT WINAPI mfattributes_SetBlob(IMFAttributes *iface, REFGUID key, const UINT8 *buf, UINT32 size)
HRESULT attributes_SetBlob(struct attributes *attributes, REFGUID key, const UINT8 *buf, UINT32 size)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
PROPVARIANT attrval;
TRACE("%p, %s, %p, %u.\n", iface, debugstr_attr(key), buf, size);
attrval.vt = VT_VECTOR | VT_UI1;
attrval.u.caub.cElems = size;
attrval.u.caub.pElems = (UINT8 *)buf;
return attributes_set_item(attributes, key, &attrval);
}
static HRESULT WINAPI mfattributes_SetUnknown(IMFAttributes *iface, REFGUID key, IUnknown *unknown)
HRESULT attributes_SetUnknown(struct attributes *attributes, REFGUID key, IUnknown *unknown)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
PROPVARIANT attrval;
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), unknown);
attrval.vt = VT_UNKNOWN;
attrval.u.punkVal = unknown;
return attributes_set_item(attributes, key, &attrval);
}
static HRESULT WINAPI mfattributes_LockStore(IMFAttributes *iface)
HRESULT attributes_LockStore(struct attributes *attributes)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p.\n", iface);
EnterCriticalSection(&attributes->cs);
return S_OK;
}
static HRESULT WINAPI mfattributes_UnlockStore(IMFAttributes *iface)
HRESULT attributes_UnlockStore(struct attributes *attributes)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p.\n", iface);
LeaveCriticalSection(&attributes->cs);
return S_OK;
}
static HRESULT WINAPI mfattributes_GetCount(IMFAttributes *iface, UINT32 *items)
HRESULT attributes_GetCount(struct attributes *attributes, UINT32 *count)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %p.\n", iface, items);
EnterCriticalSection(&attributes->cs);
*items = attributes->count;
*count = attributes->count;
LeaveCriticalSection(&attributes->cs);
return S_OK;
}
static HRESULT WINAPI mfattributes_GetItemByIndex(IMFAttributes *iface, UINT32 index, GUID *key, PROPVARIANT *value)
HRESULT attributes_GetItemByIndex(struct attributes *attributes, UINT32 index, GUID *key, PROPVARIANT *value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
HRESULT hr = S_OK;
TRACE("%p, %u, %p, %p.\n", iface, index, key, value);
EnterCriticalSection(&attributes->cs);
if (index < attributes->count)
@ -1666,14 +1574,11 @@ static HRESULT WINAPI mfattributes_GetItemByIndex(IMFAttributes *iface, UINT32 i
return hr;
}
static HRESULT WINAPI mfattributes_CopyAllItems(IMFAttributes *iface, IMFAttributes *dest)
HRESULT attributes_CopyAllItems(struct attributes *attributes, IMFAttributes *dest)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
HRESULT hr = S_OK;
size_t i;
TRACE("%p, %p.\n", iface, dest);
EnterCriticalSection(&attributes->cs);
IMFAttributes_LockStore(dest);
@ -1694,6 +1599,279 @@ static HRESULT WINAPI mfattributes_CopyAllItems(IMFAttributes *iface, IMFAttribu
return hr;
}
static HRESULT WINAPI mfattributes_GetItem(IMFAttributes *iface, REFGUID key, PROPVARIANT *value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
return attributes_GetItem(attributes, key, value);
}
static HRESULT WINAPI mfattributes_GetItemType(IMFAttributes *iface, REFGUID key, MF_ATTRIBUTE_TYPE *type)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), type);
return attributes_GetItemType(attributes, key, type);
}
static HRESULT WINAPI mfattributes_CompareItem(IMFAttributes *iface, REFGUID key, REFPROPVARIANT value, BOOL *result)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %p, %p.\n", iface, debugstr_attr(key), value, result);
return attributes_CompareItem(attributes, key, value, result);
}
static HRESULT WINAPI mfattributes_Compare(IMFAttributes *iface, IMFAttributes *theirs,
MF_ATTRIBUTES_MATCH_TYPE match_type, BOOL *ret)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %p, %d, %p.\n", iface, theirs, match_type, ret);
return attributes_Compare(attributes, theirs, match_type, ret);
}
static HRESULT WINAPI mfattributes_GetUINT32(IMFAttributes *iface, REFGUID key, UINT32 *value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
return attributes_GetUINT32(attributes, key, value);
}
static HRESULT WINAPI mfattributes_GetUINT64(IMFAttributes *iface, REFGUID key, UINT64 *value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
return attributes_GetUINT64(attributes, key, value);
}
static HRESULT WINAPI mfattributes_GetDouble(IMFAttributes *iface, REFGUID key, double *value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
return attributes_GetDouble(attributes, key, value);
}
static HRESULT WINAPI mfattributes_GetGUID(IMFAttributes *iface, REFGUID key, GUID *value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
return attributes_GetGUID(attributes, key, value);
}
static HRESULT WINAPI mfattributes_GetStringLength(IMFAttributes *iface, REFGUID key, UINT32 *length)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), length);
return attributes_GetStringLength(attributes, key, length);
}
static HRESULT WINAPI mfattributes_GetString(IMFAttributes *iface, REFGUID key, WCHAR *value,
UINT32 size, UINT32 *length)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %p, %d, %p.\n", iface, debugstr_attr(key), value, size, length);
return attributes_GetString(attributes, key, value, size, length);
}
static HRESULT WINAPI mfattributes_GetAllocatedString(IMFAttributes *iface, REFGUID key, WCHAR **value, UINT32 *length)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %p, %p.\n", iface, debugstr_attr(key), value, length);
return attributes_GetAllocatedString(attributes, key, value, length);
}
static HRESULT WINAPI mfattributes_GetBlobSize(IMFAttributes *iface, REFGUID key, UINT32 *size)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), size);
return attributes_GetBlobSize(attributes, key, size);
}
static HRESULT WINAPI mfattributes_GetBlob(IMFAttributes *iface, REFGUID key, UINT8 *buf,
UINT32 bufsize, UINT32 *blobsize)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %p, %d, %p.\n", iface, debugstr_attr(key), buf, bufsize, blobsize);
return attributes_GetBlob(attributes, key, buf, bufsize, blobsize);
}
static HRESULT WINAPI mfattributes_GetAllocatedBlob(IMFAttributes *iface, REFGUID key, UINT8 **buf, UINT32 *size)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %p, %p.\n", iface, debugstr_attr(key), buf, size);
return attributes_GetAllocatedBlob(attributes, key, buf, size);
}
static HRESULT WINAPI mfattributes_GetUnknown(IMFAttributes *iface, REFGUID key, REFIID riid, void **out)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %s, %p.\n", iface, debugstr_attr(key), debugstr_guid(riid), out);
return attributes_GetUnknown(attributes, key, riid, out);
}
static HRESULT WINAPI mfattributes_SetItem(IMFAttributes *iface, REFGUID key, REFPROPVARIANT value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
return attributes_SetItem(attributes, key, value);
}
static HRESULT WINAPI mfattributes_DeleteItem(IMFAttributes *iface, REFGUID key)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s.\n", iface, debugstr_attr(key));
return attributes_DeleteItem(attributes, key);
}
static HRESULT WINAPI mfattributes_DeleteAllItems(IMFAttributes *iface)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p.\n", iface);
return attributes_DeleteAllItems(attributes);
}
static HRESULT WINAPI mfattributes_SetUINT32(IMFAttributes *iface, REFGUID key, UINT32 value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %u.\n", iface, debugstr_attr(key), value);
return attributes_SetUINT32(attributes, key, value);
}
static HRESULT WINAPI mfattributes_SetUINT64(IMFAttributes *iface, REFGUID key, UINT64 value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %s.\n", iface, debugstr_attr(key), wine_dbgstr_longlong(value));
return attributes_SetUINT64(attributes, key, value);
}
static HRESULT WINAPI mfattributes_SetDouble(IMFAttributes *iface, REFGUID key, double value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %f.\n", iface, debugstr_attr(key), value);
return attributes_SetDouble(attributes, key, value);
}
static HRESULT WINAPI mfattributes_SetGUID(IMFAttributes *iface, REFGUID key, REFGUID value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %s.\n", iface, debugstr_attr(key), debugstr_mf_guid(value));
return attributes_SetGUID(attributes, key, value);
}
static HRESULT WINAPI mfattributes_SetString(IMFAttributes *iface, REFGUID key, const WCHAR *value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %s.\n", iface, debugstr_attr(key), debugstr_w(value));
return attributes_SetString(attributes, key, value);
}
static HRESULT WINAPI mfattributes_SetBlob(IMFAttributes *iface, REFGUID key, const UINT8 *buf, UINT32 size)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %p, %u.\n", iface, debugstr_attr(key), buf, size);
return attributes_SetBlob(attributes, key, buf, size);
}
static HRESULT WINAPI mfattributes_SetUnknown(IMFAttributes *iface, REFGUID key, IUnknown *unknown)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), unknown);
return attributes_SetUnknown(attributes, key, unknown);
}
static HRESULT WINAPI mfattributes_LockStore(IMFAttributes *iface)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p.\n", iface);
return attributes_LockStore(attributes);
}
static HRESULT WINAPI mfattributes_UnlockStore(IMFAttributes *iface)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p.\n", iface);
return attributes_UnlockStore(attributes);
}
static HRESULT WINAPI mfattributes_GetCount(IMFAttributes *iface, UINT32 *count)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %p.\n", iface, count);
return attributes_GetCount(attributes, count);
}
static HRESULT WINAPI mfattributes_GetItemByIndex(IMFAttributes *iface, UINT32 index, GUID *key, PROPVARIANT *value)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %u, %p, %p.\n", iface, index, key, value);
return attributes_GetItemByIndex(attributes, index, key, value);
}
static HRESULT WINAPI mfattributes_CopyAllItems(IMFAttributes *iface, IMFAttributes *dest)
{
struct attributes *attributes = impl_from_IMFAttributes(iface);
TRACE("%p, %p.\n", iface, dest);
return attributes_CopyAllItems(attributes, dest);
}
static const IMFAttributesVtbl mfattributes_vtbl =
{
mfattributes_QueryInterface,

View File

@ -133,7 +133,7 @@ static HRESULT WINAPI mediatype_GetItem(IMFMediaType *iface, REFGUID key, PROPVA
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
return IMFAttributes_GetItem(&media_type->attributes.IMFAttributes_iface, key, value);
return attributes_GetItem(&media_type->attributes, key, value);
}
static HRESULT WINAPI mediatype_GetItemType(IMFMediaType *iface, REFGUID key, MF_ATTRIBUTE_TYPE *type)
@ -142,7 +142,7 @@ static HRESULT WINAPI mediatype_GetItemType(IMFMediaType *iface, REFGUID key, MF
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), type);
return IMFAttributes_GetItemType(&media_type->attributes.IMFAttributes_iface, key, type);
return attributes_GetItemType(&media_type->attributes, key, type);
}
static HRESULT WINAPI mediatype_CompareItem(IMFMediaType *iface, REFGUID key, REFPROPVARIANT value, BOOL *result)
@ -151,7 +151,7 @@ static HRESULT WINAPI mediatype_CompareItem(IMFMediaType *iface, REFGUID key, RE
TRACE("%p, %s, %p, %p.\n", iface, debugstr_attr(key), value, result);
return IMFAttributes_CompareItem(&media_type->attributes.IMFAttributes_iface, key, value, result);
return attributes_CompareItem(&media_type->attributes, key, value, result);
}
static HRESULT WINAPI mediatype_Compare(IMFMediaType *iface, IMFAttributes *attrs, MF_ATTRIBUTES_MATCH_TYPE type,
@ -161,7 +161,7 @@ static HRESULT WINAPI mediatype_Compare(IMFMediaType *iface, IMFAttributes *attr
TRACE("%p, %p, %d, %p.\n", iface, attrs, type, result);
return IMFAttributes_Compare(&media_type->attributes.IMFAttributes_iface, attrs, type, result);
return attributes_Compare(&media_type->attributes, attrs, type, result);
}
static HRESULT WINAPI mediatype_GetUINT32(IMFMediaType *iface, REFGUID key, UINT32 *value)
@ -170,7 +170,7 @@ static HRESULT WINAPI mediatype_GetUINT32(IMFMediaType *iface, REFGUID key, UINT
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
return IMFAttributes_GetUINT32(&media_type->attributes.IMFAttributes_iface, key, value);
return attributes_GetUINT32(&media_type->attributes, key, value);
}
static HRESULT WINAPI mediatype_GetUINT64(IMFMediaType *iface, REFGUID key, UINT64 *value)
@ -179,7 +179,7 @@ static HRESULT WINAPI mediatype_GetUINT64(IMFMediaType *iface, REFGUID key, UINT
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
return IMFAttributes_GetUINT64(&media_type->attributes.IMFAttributes_iface, key, value);
return attributes_GetUINT64(&media_type->attributes, key, value);
}
static HRESULT WINAPI mediatype_GetDouble(IMFMediaType *iface, REFGUID key, double *value)
@ -188,7 +188,7 @@ static HRESULT WINAPI mediatype_GetDouble(IMFMediaType *iface, REFGUID key, doub
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
return IMFAttributes_GetDouble(&media_type->attributes.IMFAttributes_iface, key, value);
return attributes_GetDouble(&media_type->attributes, key, value);
}
static HRESULT WINAPI mediatype_GetGUID(IMFMediaType *iface, REFGUID key, GUID *value)
@ -197,7 +197,7 @@ static HRESULT WINAPI mediatype_GetGUID(IMFMediaType *iface, REFGUID key, GUID *
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
return IMFAttributes_GetGUID(&media_type->attributes.IMFAttributes_iface, key, value);
return attributes_GetGUID(&media_type->attributes, key, value);
}
static HRESULT WINAPI mediatype_GetStringLength(IMFMediaType *iface, REFGUID key, UINT32 *length)
@ -206,7 +206,7 @@ static HRESULT WINAPI mediatype_GetStringLength(IMFMediaType *iface, REFGUID key
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), length);
return IMFAttributes_GetStringLength(&media_type->attributes.IMFAttributes_iface, key, length);
return attributes_GetStringLength(&media_type->attributes, key, length);
}
static HRESULT WINAPI mediatype_GetString(IMFMediaType *iface, REFGUID key, WCHAR *value,
@ -216,7 +216,7 @@ static HRESULT WINAPI mediatype_GetString(IMFMediaType *iface, REFGUID key, WCHA
TRACE("%p, %s, %p, %u, %p.\n", iface, debugstr_attr(key), value, size, length);
return IMFAttributes_GetString(&media_type->attributes.IMFAttributes_iface, key, value, size, length);
return attributes_GetString(&media_type->attributes, key, value, size, length);
}
static HRESULT WINAPI mediatype_GetAllocatedString(IMFMediaType *iface, REFGUID key,
@ -226,7 +226,7 @@ static HRESULT WINAPI mediatype_GetAllocatedString(IMFMediaType *iface, REFGUID
TRACE("%p, %s, %p, %p.\n", iface, debugstr_attr(key), value, length);
return IMFAttributes_GetAllocatedString(&media_type->attributes.IMFAttributes_iface, key, value, length);
return attributes_GetAllocatedString(&media_type->attributes, key, value, length);
}
static HRESULT WINAPI mediatype_GetBlobSize(IMFMediaType *iface, REFGUID key, UINT32 *size)
@ -235,7 +235,7 @@ static HRESULT WINAPI mediatype_GetBlobSize(IMFMediaType *iface, REFGUID key, UI
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), size);
return IMFAttributes_GetBlobSize(&media_type->attributes.IMFAttributes_iface, key, size);
return attributes_GetBlobSize(&media_type->attributes, key, size);
}
static HRESULT WINAPI mediatype_GetBlob(IMFMediaType *iface, REFGUID key, UINT8 *buf,
@ -245,7 +245,7 @@ static HRESULT WINAPI mediatype_GetBlob(IMFMediaType *iface, REFGUID key, UINT8
TRACE("%p, %s, %p, %u, %p.\n", iface, debugstr_attr(key), buf, bufsize, blobsize);
return IMFAttributes_GetBlob(&media_type->attributes.IMFAttributes_iface, key, buf, bufsize, blobsize);
return attributes_GetBlob(&media_type->attributes, key, buf, bufsize, blobsize);
}
static HRESULT WINAPI mediatype_GetAllocatedBlob(IMFMediaType *iface, REFGUID key, UINT8 **buf, UINT32 *size)
@ -254,7 +254,7 @@ static HRESULT WINAPI mediatype_GetAllocatedBlob(IMFMediaType *iface, REFGUID ke
TRACE("%p, %s, %p, %p.\n", iface, debugstr_attr(key), buf, size);
return IMFAttributes_GetAllocatedBlob(&media_type->attributes.IMFAttributes_iface, key, buf, size);
return attributes_GetAllocatedBlob(&media_type->attributes, key, buf, size);
}
static HRESULT WINAPI mediatype_GetUnknown(IMFMediaType *iface, REFGUID key, REFIID riid, void **obj)
@ -263,7 +263,7 @@ static HRESULT WINAPI mediatype_GetUnknown(IMFMediaType *iface, REFGUID key, REF
TRACE("%p, %s, %s, %p.\n", iface, debugstr_attr(key), debugstr_guid(riid), obj);
return IMFAttributes_GetUnknown(&media_type->attributes.IMFAttributes_iface, key, riid, obj);
return attributes_GetUnknown(&media_type->attributes, key, riid, obj);
}
static HRESULT WINAPI mediatype_SetItem(IMFMediaType *iface, REFGUID key, REFPROPVARIANT value)
@ -272,7 +272,7 @@ static HRESULT WINAPI mediatype_SetItem(IMFMediaType *iface, REFGUID key, REFPRO
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
return IMFAttributes_SetItem(&media_type->attributes.IMFAttributes_iface, key, value);
return attributes_SetItem(&media_type->attributes, key, value);
}
static HRESULT WINAPI mediatype_DeleteItem(IMFMediaType *iface, REFGUID key)
@ -281,7 +281,7 @@ static HRESULT WINAPI mediatype_DeleteItem(IMFMediaType *iface, REFGUID key)
TRACE("%p, %s.\n", iface, debugstr_attr(key));
return IMFAttributes_DeleteItem(&media_type->attributes.IMFAttributes_iface, key);
return attributes_DeleteItem(&media_type->attributes, key);
}
static HRESULT WINAPI mediatype_DeleteAllItems(IMFMediaType *iface)
@ -290,7 +290,7 @@ static HRESULT WINAPI mediatype_DeleteAllItems(IMFMediaType *iface)
TRACE("%p.\n", iface);
return IMFAttributes_DeleteAllItems(&media_type->attributes.IMFAttributes_iface);
return attributes_DeleteAllItems(&media_type->attributes);
}
static HRESULT WINAPI mediatype_SetUINT32(IMFMediaType *iface, REFGUID key, UINT32 value)
@ -299,7 +299,7 @@ static HRESULT WINAPI mediatype_SetUINT32(IMFMediaType *iface, REFGUID key, UINT
TRACE("%p, %s, %u.\n", iface, debugstr_attr(key), value);
return IMFAttributes_SetUINT32(&media_type->attributes.IMFAttributes_iface, key, value);
return attributes_SetUINT32(&media_type->attributes, key, value);
}
static HRESULT WINAPI mediatype_SetUINT64(IMFMediaType *iface, REFGUID key, UINT64 value)
@ -308,7 +308,7 @@ static HRESULT WINAPI mediatype_SetUINT64(IMFMediaType *iface, REFGUID key, UINT
TRACE("%p, %s, %s.\n", iface, debugstr_attr(key), wine_dbgstr_longlong(value));
return IMFAttributes_SetUINT64(&media_type->attributes.IMFAttributes_iface, key, value);
return attributes_SetUINT64(&media_type->attributes, key, value);
}
static HRESULT WINAPI mediatype_SetDouble(IMFMediaType *iface, REFGUID key, double value)
@ -317,7 +317,7 @@ static HRESULT WINAPI mediatype_SetDouble(IMFMediaType *iface, REFGUID key, doub
TRACE("%p, %s, %f.\n", iface, debugstr_attr(key), value);
return IMFAttributes_SetDouble(&media_type->attributes.IMFAttributes_iface, key, value);
return attributes_SetDouble(&media_type->attributes, key, value);
}
static HRESULT WINAPI mediatype_SetGUID(IMFMediaType *iface, REFGUID key, REFGUID value)
@ -326,7 +326,7 @@ static HRESULT WINAPI mediatype_SetGUID(IMFMediaType *iface, REFGUID key, REFGUI
TRACE("%p, %s, %s.\n", iface, debugstr_attr(key), debugstr_guid(value));
return IMFAttributes_SetGUID(&media_type->attributes.IMFAttributes_iface, key, value);
return attributes_SetGUID(&media_type->attributes, key, value);
}
static HRESULT WINAPI mediatype_SetString(IMFMediaType *iface, REFGUID key, const WCHAR *value)
@ -335,7 +335,7 @@ static HRESULT WINAPI mediatype_SetString(IMFMediaType *iface, REFGUID key, cons
TRACE("%p, %s, %s.\n", iface, debugstr_attr(key), debugstr_w(value));
return IMFAttributes_SetString(&media_type->attributes.IMFAttributes_iface, key, value);
return attributes_SetString(&media_type->attributes, key, value);
}
static HRESULT WINAPI mediatype_SetBlob(IMFMediaType *iface, REFGUID key, const UINT8 *buf, UINT32 size)
@ -344,7 +344,7 @@ static HRESULT WINAPI mediatype_SetBlob(IMFMediaType *iface, REFGUID key, const
TRACE("%p, %s, %p, %u.\n", iface, debugstr_attr(key), buf, size);
return IMFAttributes_SetBlob(&media_type->attributes.IMFAttributes_iface, key, buf, size);
return attributes_SetBlob(&media_type->attributes, key, buf, size);
}
static HRESULT WINAPI mediatype_SetUnknown(IMFMediaType *iface, REFGUID key, IUnknown *unknown)
@ -353,7 +353,7 @@ static HRESULT WINAPI mediatype_SetUnknown(IMFMediaType *iface, REFGUID key, IUn
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), unknown);
return IMFAttributes_SetUnknown(&media_type->attributes.IMFAttributes_iface, key, unknown);
return attributes_SetUnknown(&media_type->attributes, key, unknown);
}
static HRESULT WINAPI mediatype_LockStore(IMFMediaType *iface)
@ -362,7 +362,7 @@ static HRESULT WINAPI mediatype_LockStore(IMFMediaType *iface)
TRACE("%p.\n", iface);
return IMFAttributes_LockStore(&media_type->attributes.IMFAttributes_iface);
return attributes_LockStore(&media_type->attributes);
}
static HRESULT WINAPI mediatype_UnlockStore(IMFMediaType *iface)
@ -371,7 +371,7 @@ static HRESULT WINAPI mediatype_UnlockStore(IMFMediaType *iface)
TRACE("%p.\n", iface);
return IMFAttributes_UnlockStore(&media_type->attributes.IMFAttributes_iface);
return attributes_UnlockStore(&media_type->attributes);
}
static HRESULT WINAPI mediatype_GetCount(IMFMediaType *iface, UINT32 *count)
@ -380,7 +380,7 @@ static HRESULT WINAPI mediatype_GetCount(IMFMediaType *iface, UINT32 *count)
TRACE("%p, %p.\n", iface, count);
return IMFAttributes_GetCount(&media_type->attributes.IMFAttributes_iface, count);
return attributes_GetCount(&media_type->attributes, count);
}
static HRESULT WINAPI mediatype_GetItemByIndex(IMFMediaType *iface, UINT32 index, GUID *key, PROPVARIANT *value)
@ -389,7 +389,7 @@ static HRESULT WINAPI mediatype_GetItemByIndex(IMFMediaType *iface, UINT32 index
TRACE("%p, %u, %p, %p.\n", iface, index, key, value);
return IMFAttributes_GetItemByIndex(&media_type->attributes.IMFAttributes_iface, index, key, value);
return attributes_GetItemByIndex(&media_type->attributes, index, key, value);
}
static HRESULT WINAPI mediatype_CopyAllItems(IMFMediaType *iface, IMFAttributes *dest)
@ -398,14 +398,16 @@ static HRESULT WINAPI mediatype_CopyAllItems(IMFMediaType *iface, IMFAttributes
TRACE("%p, %p.\n", iface, dest);
return IMFAttributes_CopyAllItems(&media_type->attributes.IMFAttributes_iface, dest);
return attributes_CopyAllItems(&media_type->attributes, dest);
}
static HRESULT WINAPI mediatype_GetMajorType(IMFMediaType *iface, GUID *guid)
{
struct media_type *media_type = impl_from_IMFMediaType(iface);
TRACE("%p, %p.\n", iface, guid);
return IMFAttributes_GetGUID(&media_type->attributes.IMFAttributes_iface, &MF_MT_MAJOR_TYPE, guid);
return attributes_GetGUID(&media_type->attributes, &MF_MT_MAJOR_TYPE, guid);
}
static HRESULT WINAPI mediatype_IsCompressedFormat(IMFMediaType *iface, BOOL *compressed)
@ -415,8 +417,7 @@ static HRESULT WINAPI mediatype_IsCompressedFormat(IMFMediaType *iface, BOOL *co
TRACE("%p, %p.\n", iface, compressed);
if (FAILED(IMFAttributes_GetUINT32(&media_type->attributes.IMFAttributes_iface,
&MF_MT_ALL_SAMPLES_INDEPENDENT, &value)))
if (FAILED(attributes_GetUINT32(&media_type->attributes, &MF_MT_ALL_SAMPLES_INDEPENDENT, &value)))
{
value = 0;
}

View File

@ -44,6 +44,45 @@ extern HRESULT init_attributes_object(struct attributes *object, UINT32 size) DE
extern void clear_attributes_object(struct attributes *object) DECLSPEC_HIDDEN;
extern const char *debugstr_attr(const GUID *guid) DECLSPEC_HIDDEN;
extern HRESULT attributes_GetItem(struct attributes *object, REFGUID key, PROPVARIANT *value) DECLSPEC_HIDDEN;
extern HRESULT attributes_GetItemType(struct attributes *object, REFGUID key, MF_ATTRIBUTE_TYPE *type) DECLSPEC_HIDDEN;
extern HRESULT attributes_CompareItem(struct attributes *object, REFGUID key, REFPROPVARIANT value,
BOOL *result) DECLSPEC_HIDDEN;
extern HRESULT attributes_Compare(struct attributes *object, IMFAttributes *theirs,
MF_ATTRIBUTES_MATCH_TYPE match_type, BOOL *ret) DECLSPEC_HIDDEN;
extern HRESULT attributes_GetUINT32(struct attributes *object, REFGUID key, UINT32 *value) DECLSPEC_HIDDEN;
extern HRESULT attributes_GetUINT64(struct attributes *object, REFGUID key, UINT64 *value) DECLSPEC_HIDDEN;
extern HRESULT attributes_GetDouble(struct attributes *object, REFGUID key, double *value) DECLSPEC_HIDDEN;
extern HRESULT attributes_GetGUID(struct attributes *object, REFGUID key, GUID *value) DECLSPEC_HIDDEN;
extern HRESULT attributes_GetStringLength(struct attributes *object, REFGUID key, UINT32 *length) DECLSPEC_HIDDEN;
extern HRESULT attributes_GetString(struct attributes *object, REFGUID key, WCHAR *value, UINT32 size,
UINT32 *length) DECLSPEC_HIDDEN;
extern HRESULT attributes_GetAllocatedString(struct attributes *object, REFGUID key, WCHAR **value,
UINT32 *length) DECLSPEC_HIDDEN;
extern HRESULT attributes_GetBlobSize(struct attributes *object, REFGUID key, UINT32 *size) DECLSPEC_HIDDEN;
extern HRESULT attributes_GetBlob(struct attributes *object, REFGUID key, UINT8 *buf, UINT32 bufsize,
UINT32 *blobsize) DECLSPEC_HIDDEN;
extern HRESULT attributes_GetAllocatedBlob(struct attributes *object, REFGUID key, UINT8 **buf,
UINT32 *size) DECLSPEC_HIDDEN;
extern HRESULT attributes_GetUnknown(struct attributes *object, REFGUID key, REFIID riid, void **out) DECLSPEC_HIDDEN;
extern HRESULT attributes_SetItem(struct attributes *object, REFGUID key, REFPROPVARIANT value) DECLSPEC_HIDDEN;
extern HRESULT attributes_DeleteItem(struct attributes *object, REFGUID key) DECLSPEC_HIDDEN;
extern HRESULT attributes_DeleteAllItems(struct attributes *object) DECLSPEC_HIDDEN;
extern HRESULT attributes_SetUINT32(struct attributes *object, REFGUID key, UINT32 value) DECLSPEC_HIDDEN;
extern HRESULT attributes_SetUINT64(struct attributes *object, REFGUID key, UINT64 value) DECLSPEC_HIDDEN;
extern HRESULT attributes_SetDouble(struct attributes *object, REFGUID key, double value) DECLSPEC_HIDDEN;
extern HRESULT attributes_SetGUID(struct attributes *object, REFGUID key, REFGUID value) DECLSPEC_HIDDEN;
extern HRESULT attributes_SetString(struct attributes *object, REFGUID key, const WCHAR *value) DECLSPEC_HIDDEN;
extern HRESULT attributes_SetBlob(struct attributes *object, REFGUID key, const UINT8 *buf,
UINT32 size) DECLSPEC_HIDDEN;
extern HRESULT attributes_SetUnknown(struct attributes *object, REFGUID key, IUnknown *unknown) DECLSPEC_HIDDEN;
extern HRESULT attributes_LockStore(struct attributes *object) DECLSPEC_HIDDEN;
extern HRESULT attributes_UnlockStore(struct attributes *object) DECLSPEC_HIDDEN;
extern HRESULT attributes_GetCount(struct attributes *object, UINT32 *items) DECLSPEC_HIDDEN;
extern HRESULT attributes_GetItemByIndex(struct attributes *object, UINT32 index, GUID *key,
PROPVARIANT *value) DECLSPEC_HIDDEN;
extern HRESULT attributes_CopyAllItems(struct attributes *object, IMFAttributes *dest) DECLSPEC_HIDDEN;
extern void init_system_queues(void) DECLSPEC_HIDDEN;
extern void shutdown_system_queues(void) DECLSPEC_HIDDEN;
extern BOOL is_platform_locked(void) DECLSPEC_HIDDEN;