mfplat: Write flags when registering MFT.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Nikolay Sivov 2019-05-07 15:25:43 +03:00 committed by Alexandre Julliard
parent b0bd57f953
commit ea96db6557
2 changed files with 25 additions and 5 deletions

View File

@ -71,6 +71,7 @@ static const WCHAR categories_keyW[] = {'M','e','d','i','a','F','o','u','n','d',
static const WCHAR inputtypesW[] = {'I','n','p','u','t','T','y','p','e','s',0};
static const WCHAR outputtypesW[] = {'O','u','t','p','u','t','T','y','p','e','s',0};
static const WCHAR attributesW[] = {'A','t','t','r','i','b','u','t','e','s',0};
static const WCHAR mftflagsW[] = {'M','F','T','F','l','a','g','s',0};
static const WCHAR szGUIDFmt[] =
{
'%','0','8','x','-','%','0','4','x','-','%','0','4','x','-','%','0',
@ -167,7 +168,7 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
return TRUE;
}
static HRESULT register_transform(const CLSID *clsid, const WCHAR *name,
static HRESULT register_transform(const CLSID *clsid, const WCHAR *name, UINT32 flags,
UINT32 cinput, const MFT_REGISTER_TYPE_INFO *input_types, UINT32 coutput,
const MFT_REGISTER_TYPE_INFO *output_types, IMFAttributes *attributes)
{
@ -224,6 +225,12 @@ static HRESULT register_transform(const CLSID *clsid, const WCHAR *name,
}
}
if (SUCCEEDED(hr) && flags)
{
if ((ret = RegSetValueExW(hclsid, mftflagsW, 0, REG_DWORD, (BYTE *)&flags, sizeof(flags))))
hr = HRESULT_FROM_WIN32(ret);
}
RegCloseKey(hclsid);
return hr;
}
@ -259,10 +266,7 @@ HRESULT WINAPI MFTRegister(CLSID clsid, GUID category, LPWSTR name, UINT32 flags
TRACE("%s, %s, %s, %#x, %u, %p, %u, %p, %p.\n", debugstr_guid(&clsid), debugstr_guid(&category),
debugstr_w(name), flags, cinput, input_types, coutput, output_types, attributes);
if (flags)
FIXME("flags not yet supported.\n");
hr = register_transform(&clsid, name, cinput, input_types, coutput, output_types, attributes);
hr = register_transform(&clsid, name, flags, cinput, input_types, coutput, output_types, attributes);
if(FAILED(hr))
ERR("Failed to write register transform\n");

View File

@ -350,6 +350,22 @@ typedef enum _MFWaveFormatExConvertFlags
MFWaveFormatExConvertFlag_ForceExtensible = 1,
} MFWaveFormatExConvertFlags;
enum _MFT_ENUM_FLAG
{
MFT_ENUM_FLAG_SYNCMFT = 0x00000001,
MFT_ENUM_FLAG_ASYNCMFT = 0x00000002,
MFT_ENUM_FLAG_HARDWARE = 0x00000004,
MFT_ENUM_FLAG_FIELDOFUSE = 0x00000008,
MFT_ENUM_FLAG_LOCALMFT = 0x00000010,
MFT_ENUM_FLAG_TRANSCODE_ONLY = 0x00000020,
MFT_ENUM_FLAG_ALL = 0x0000003f,
MFT_ENUM_FLAG_SORTANDFILTER = 0x00000040,
MFT_ENUM_FLAG_SORTANDFILTER_APPROVED_ONLY = 0x000000c0,
MFT_ENUM_FLAG_SORTANDFILTER_WEB_ONLY = 0x00000140,
MFT_ENUM_FLAG_SORTANDFILTER_WEB_ONLY_EDGEMODE = 0x00000240,
MFT_ENUM_FLAG_UNTRUSTED_STOREMFT = 0x00000400,
};
HRESULT WINAPI MFAddPeriodicCallback(MFPERIODICCALLBACK callback, IUnknown *context, DWORD *key);
HRESULT WINAPI MFAllocateWorkQueue(DWORD *queue);
HRESULT WINAPI MFAllocateWorkQueueEx(MFASYNC_WORKQUEUE_TYPE queue_type, DWORD *queue);