On 12/10/19 12:10 PM, Liu Hao wrote:
在 2019/12/10 18:42, Eric Hassold 写道:
Hi all,

Tracking issue with one small program using Media Foundation was
failing at runtime only if compiled with Mingw, I found out that
definitions for some GUID in mfidl.h are incorrect (or mixed, with one
ID getting the value of another).

Namely, at mfidl.h:3407, GUID:
   MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_GUID
is defined as:
   0xc60ac5fe, 0x252a, 0x478f, 0xa0, 0xef, 0xbc, 0x8f, 0xa5, 0xf7, 0xca, 0xd3
but this is actually the UUID for MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE
(while definition for MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE itself is
missing).

Correct values should be:
EXTERN_GUID( MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE, 0xc60ac5fe, 0x252a,
0x478f, 0xa0, 0xef, 0xbc, 0x8f, 0xa5, 0xf7, 0xca, 0xd3);
EXTERN_GUID(MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_GUID,
0x8ac3587a, 0x4ae7, 0x42d8, 0x99, 0xe0, 0x0a, 0x60, 0x13, 0xee, 0xf9,
0x0f);

Attached is patch for mfidl.idl (need to regenerate mfidl.h, not
included in patch).


Thanks. Pushed this one.

Side note: WIDL 4.19 doesn't seem to like `WINBOOL` and reports syntax
errors likes this:
```
WIDL mediaobj.idl:20: error: syntax error, unexpected aIDENTIFIER
```

I replaced all `BOOL` with `WINBOOL` to generate the header. I also had
to be careful not to commit such changes by accident. I hope someone is
going to fix this issue.


You could just use make include/mfidl.h if you use configure with --with-widl. This uses -DBOOL=WINBOOL when generating headers. IDL files should use BOOL, not WINBOOL, and leave it for widl to generate correct headers.


Jacek



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to