I'm trying to port the key parts of the MFCaptureToFile Windows classic sample to windows-rs. So far I have successfully ported several of the initial aspects such as enumerating devices (with MFEnumDeviceSources) and activating them.
My issue: if I try to generate the bindings for the constant Windows::Win32::Media::MediaFoundation::MF_SOURCE_READER_FIRST_VIDEO_STREAM, I get an error at compile time. I find this strange because the documentation for this constant is automatically generated and thus it must be in the metadata. So how do I generate the binding?
For example, with the following code (using windows = "0.11" in Cargo.toml)
error: `Windows.Win32.Media.MediaFoundation.MF_SOURCE_READER_FIRST_VIDEO_STREAM` not found in metadata
--> src\main.rs:6:13
|
6 | MF_SOURCE_READER_FIRST_VIDEO_STREAM,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
error: could not compile `winplay`
(If I remove MF_SOURCE_READER_FIRST_VIDEO_STREAM, this compiles without error and the bindings for MF_SOURCE_READER_ASYNC_CALLBACK are generated.)
(I suspect I'll have to wait for COM interfaces to be finished #81 before I can complete this port, but I don't understand why this example doesn't compile.)
I'm trying to port the key parts of the
MFCaptureToFile Windows classic sample
towindows-rs
. So far I have successfully ported several of the initial aspects such as enumerating devices (withMFEnumDeviceSources
) and activating them.My issue: if I try to generate the bindings for the constant
Windows::Win32::Media::MediaFoundation::MF_SOURCE_READER_FIRST_VIDEO_STREAM
, I get an error at compile time. I find this strange because the documentation for this constant is automatically generated and thus it must be in the metadata. So how do I generate the binding?For example, with the following code (using
windows = "0.11"
in Cargo.toml)I get this error
(If I remove
MF_SOURCE_READER_FIRST_VIDEO_STREAM
, this compiles without error and the bindings forMF_SOURCE_READER_ASYNC_CALLBACK
are generated.)(I suspect I'll have to wait for COM interfaces to be finished #81 before I can complete this port, but I don't understand why this example doesn't compile.)