mfplat/tests: Add MFCreateAttributes tests.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
465feb7a9e
commit
a324786b9e
|
@ -32,11 +32,14 @@
|
||||||
#include "mfapi.h"
|
#include "mfapi.h"
|
||||||
#include "mfidl.h"
|
#include "mfidl.h"
|
||||||
#include "mferror.h"
|
#include "mferror.h"
|
||||||
|
#include "mfreadwrite.h"
|
||||||
|
|
||||||
#include "wine/test.h"
|
#include "wine/test.h"
|
||||||
|
|
||||||
static HRESULT (WINAPI *pMFCreateSourceResolver)(IMFSourceResolver **resolver);
|
static HRESULT (WINAPI *pMFCreateSourceResolver)(IMFSourceResolver **resolver);
|
||||||
|
|
||||||
|
DEFINE_GUID(MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, 0xa634a91c, 0x822b, 0x41b9, 0xa4, 0x94, 0x4d, 0xe4, 0x64, 0x36, 0x12, 0xb0);
|
||||||
|
|
||||||
DEFINE_GUID(MFT_CATEGORY_OTHER, 0x90175d57,0xb7ea,0x4901,0xae,0xb3,0x93,0x3a,0x87,0x47,0x75,0x6f);
|
DEFINE_GUID(MFT_CATEGORY_OTHER, 0x90175d57,0xb7ea,0x4901,0xae,0xb3,0x93,0x3a,0x87,0x47,0x75,0x6f);
|
||||||
|
|
||||||
DEFINE_GUID(DUMMY_CLSID, 0x12345678,0x1234,0x1234,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19);
|
DEFINE_GUID(DUMMY_CLSID, 0x12345678,0x1234,0x1234,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19);
|
||||||
|
@ -217,6 +220,30 @@ if(0)
|
||||||
MFShutdown();
|
MFShutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_MFCreateAttributes(void)
|
||||||
|
{
|
||||||
|
IMFAttributes *attributes;
|
||||||
|
HRESULT hr;
|
||||||
|
UINT32 count;
|
||||||
|
|
||||||
|
hr = MFCreateAttributes( &attributes, 3 );
|
||||||
|
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||||
|
|
||||||
|
count = 88;
|
||||||
|
hr = IMFAttributes_GetCount(attributes, &count);
|
||||||
|
todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||||
|
ok(count == 0, "got %d\n", count);
|
||||||
|
|
||||||
|
hr = IMFAttributes_SetUINT32(attributes, &MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, 0);
|
||||||
|
todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||||
|
|
||||||
|
hr = IMFAttributes_GetCount(attributes, &count);
|
||||||
|
todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||||
|
todo_wine ok(count == 1, "got %d\n", count);
|
||||||
|
|
||||||
|
IMFAttributes_Release(attributes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
START_TEST(mfplat)
|
START_TEST(mfplat)
|
||||||
{
|
{
|
||||||
|
@ -227,6 +254,7 @@ START_TEST(mfplat)
|
||||||
test_register();
|
test_register();
|
||||||
test_source_resolver();
|
test_source_resolver();
|
||||||
test_MFCreateMediaType();
|
test_MFCreateMediaType();
|
||||||
|
test_MFCreateAttributes();
|
||||||
|
|
||||||
CoUninitialize();
|
CoUninitialize();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue