Get 0xc00d36e6(MF_E_ATTRIBUTENOTFOUND) error via "MFSampleExtension_CaptureMetadata" attribute

wilber19881222 11 Reputation points
2020-12-16T03:47:32.553+00:00

I wish my application can get Metadata from UVC image based on windows media foundation.
My image capture card had fill in timestamp information in the metadata field.

And my application development environment is win10, vs2015, and set "target platform version" as "10.0.14393.0"
the following is my testing code:

IMFAttributes *spMetadata;
hr = pSample->GetUnknown(MFSampleExtension_CaptureMetadata, IID_PPV_ARGS(&spMetadata));

It always return 0xc00d36e6(MF_E_ATTRIBUTENOTFOUND)

How can I do to fix the error and get correctly metedata?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,523 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,636 questions
{count} votes