Media Foundation Team Blog でMFMediaPropDump が公開された。これはMFでサポートされているメディアファイルのフォーマットのプロパティをテキストで出力してくれるコマンドラインツール。ソースコード付き。
DirectShow でいうところの DisplayType 関数に近いと思う。
MFFriendlyErrors.h を開いてみると MF で返される HRESULT 値と、その文字列 (MF_????) の対応テーブルが定義されている。また、Helper.cpp にも メディアタイプの GUID とその文字列が定義されている。
MFFriendlyError.h
// Array sorted with a binary-search-tree order based on error numbers (treated as UINT32)
// (recursive pattern: [Pivot] [errors less than Pivot] [errors greater than Pivot] )
extern const __declspec(selectany) ErrorNameMappingEntry g_hrMappingTable[] =
{
{ 0x80073B04L, "ERROR_MUI_INTLSETTINGS_INVALID_LOCALE_NAME" },
{ 0x8007055AL, "ERROR_RXACT_COMMIT_FAILURE" },
{ 0x80070048L, "ERROR_REDIR_PAUSED" },
{ 0x8002802AL, "TYPE_E_WRONGTYPEKIND" },
{ 0x400D2F04L, "NS_I_MANUAL_PROXY" },
{ 0x000D1067L, "NS_S_WMG_ADVISE_DROP_TO_KEYFRAME" },
{ 0x0004131CL, "SCHED_S_BATCH_LOGON_PROBLEM" },
...
Helper.cpp
static struct tag_KnownGUID
{
GUID guid;
LPCWSTR lpstrName;
} g_KnownGUIDs[] =
{
// From mfapi.h
{MFVideoFormat_Base, L"MFVideoFormat_Base"},
{MFVideoFormat_RGB32, L"MFVideoFormat_RGB32"},
{MFVideoFormat_ARGB32, L"MFVideoFormat_ARGB32"},
{MFVideoFormat_RGB24, L"MFVideoFormat_RGB24"},
{MFVideoFormat_RGB555, L"MFVideoFormat_RGB555"},
...
作成中のMFアプリケーションに取り込んで使えば、デバッグに役立ちそうだ。
0 コメント:
コメントを投稿