Skip to content

Add bindings for MediaFoundation #2466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Ethereal77
Copy link

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.

@Ethereal77
Copy link
Author

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 Maths for some of the files. I suspect in those that need Box2D<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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

1 participant