Add bindings for MediaFoundation
Summary of the PR
Adds support for MediaFoundation from the Windows SDK, which according to MSDN:
...enables the development of applications and components for using digital media on Windows Vista and later.
Related issues, Discord discussions, or proposals
As discussed in Discord, this is part of the ongoing effort to port the Stride Game Engine away from SharpDX and towards Silk.NET.
There's still work to do. I've succesfully created a dev environment where I can build Silk.NET very similar to what the GitHub Actions workflow does.
The bindings still have missing parts:
- It can't found the namespace
Mathsfor some of the files. I suspect in those that needBox2D<int>, that appears to be one of the types it can't resolve. - It can't resolve several types that are not defined in the original header:
IMFAsyncCallback IMFAsyncResult IMFAttributes IMFByteStream IMFContentProtectionManager IMFMediaSource IPropertyStore MFMediaKeyStatus MF_MEDIAKEYSESSION_MESSAGETYPE MF_MEDIAKEYSESSION_TYPE MF_OBJECT_TYPE IMFByteStream IMFMediaSource _MF3DVideoOutputType _MFARGB tagPROPVARIANT
I remember having read that another PR that added WIC (#1674) mentioned something about tagPROPVARIANT and IPropertyStore. I need to investigate this.
Wrt to the other types, I need to verify if I can import only some of them without bringing all the types defined in their respective headers. And _MFARGB sounds like some kind of color. Maybe it can be type-mapped?
Any suggestions?
It can't found the namespace Maths for some of the files. I suspect in those that need Box2D
, that appears to be one of the types it can't resolve.
Interesting, might need a ProjectReference.
Wrt to the other types, I need to verify if I can import only some of them without bringing all the types defined in their respective headers.
To be honest, all of those seem like MediaFoundation APIs, so provided that those aren't in a non-MediaFoundation header (or otherwise pull in non-MediaFoundation APIs) I'd say just bring them all in.
Btw feel free to ping in our Discord, GitHub tends to have a lot of noise (didn't realise this had outstanding questions!)