sharpdx / SharpDX

SharpDX GitHub Repository
http://sharpdx.org
MIT License
1.7k stars 638 forks source link

Media Foundation VideoFormatsGuids gone #909

Closed mrvux closed 6 years ago

mrvux commented 7 years ago

After upgrading to 4.0, I noticed that (most) video formats guids are gone.

From what I've tested in debug, seems like castxml does not resolve some those, whereas gcc-xml did.

For example : DEFINE_MEDIATYPE_GUID( MFVideoFormat_RGB24, D3DFMT_R8G8B8 ); Is resolved in both

CastXml:

guid name="MFVideoFormat_RGB24" guid="00000014-0000-0010-8000-00aa00389b71"

GCC Xml:

Variable id="_15193" name="MFVideoFormat_RGB24" type="_495c" init="{20, 0, 16, {128, 0, 0, 170, 0, 56, 155, 113}}" context="_1" location="f168:2008" file="f168" line="2008" mangled="?MFVideoFormat_RGB24@@3U_GUID@@B" attributes="annotate(selectany)"

But the following: DEFINE_MEDIATYPE_GUID( MFVideoFormat_AI44, FCC('AI44') );

Are not resolved in castxml output (they also have different value in gcc xml see:

Variable id="_15200" name="MFVideoFormat_AI44" type="_495c" init="{((((DWORD)('\U41493434') & 255) << 24) | (((DWORD)('\U41493434') & 65280) << 8) | (((DWORD)('\U41493434') & 16711680) >> 8) | (((DWORD)('\U41493434') & 4278190080U) >> 24)), 0, 16, {128, 0, 0, 170, 0, 56, 155, 113}}" context="_1" location="f168:2015" file="f168" line="2015" mangled="?MFVideoFormat_AI44@@3U_GUID@@B" attributes="annotate(selectany)"

So it seems CastXMl fails to pick the ones with FCC macro.

Not sure if it's worth spending a lot of time trying to fix castxml for this (very unusual and specific) case, otherwise I'm happy to add those manually instead.

xoofx commented 7 years ago

yeah, if it is a couple of GUID, maybe better to just add them manually...

though, hope that this regression didn't have other side effects somewhere else...

mrvux commented 6 years ago

Those are added from last pull request, closing for now